提交 9c6f68fd 编写于 作者: JEECG低代码平台's avatar JEECG低代码平台

JeecgBoot 2.1.1 版本发布

上级 fd57f233
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
}, },
"dependencies": { "dependencies": {
"@antv/data-set": "^0.10.2", "@antv/data-set": "^0.10.2",
"@jeecg/antd-online": "^1.2.0", "@jeecg/antd-online": "1.2.0",
"@tinymce/tinymce-vue": "^2.0.0", "@tinymce/tinymce-vue": "^2.0.0",
"ant-design-vue": "^1.4.0", "ant-design-vue": "^1.4.0",
"apexcharts": "^3.6.5", "apexcharts": "^3.6.5",
......
...@@ -32,15 +32,23 @@ ...@@ -32,15 +32,23 @@
tagType:"" tagType:""
} }
}, },
watch:{
dictCode:{
immediate:true,
handler() {
this.initDictData()
},
}
},
created() { created() {
console.log(this.dictCode); // console.log(this.dictCode);
if(!this.type || this.type==="list"){ if(!this.type || this.type==="list"){
this.tagType = "select" this.tagType = "select"
}else{ }else{
this.tagType = this.type this.tagType = this.type
} }
//获取字典数据 //获取字典数据
this.initDictData(); // this.initDictData();
}, },
methods: { methods: {
initDictData() { initDictData() {
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<a-col :span="8"> <a-col :span="8">
<a-select placeholder="选择查询字段" v-model="item.field" @select="(val,option)=>handleSelected(option,item)"> <a-select placeholder="选择查询字段" v-model="item.field" @select="(val,option)=>handleSelected(option,item)">
<a-select-option v-for="(f,fIndex) in fieldList" :key=" 'field'+fIndex" :value="f.value" :data-type="f.type">{{ f.text }}</a-select-option> <a-select-option v-for="(f,fIndex) in fieldList" :key=" 'field'+fIndex" :value="f.value" :data-idx="fIndex">{{ f.text }}</a-select-option>
</a-select> </a-select>
</a-col> </a-col>
...@@ -63,8 +63,9 @@ ...@@ -63,8 +63,9 @@
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<j-date v-if=" item.type=='date' " v-model="item.val" placeholder="请选择日期"></j-date> <j-dict-select-tag v-if="item.dictCode" v-model="item.val" :dictCode="item.dictCode" placeholder="请选择"/>
<j-date v-else-if=" item.type=='datetime' " v-model="item.val" placeholder="请选择时间" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss"></j-date> <j-date v-else-if=" item.type=='date' " v-model="item.val" placeholder="请选择日期" style="width: 100%"></j-date>
<j-date v-else-if=" item.type=='datetime' " v-model="item.val" placeholder="请选择时间" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"></j-date>
<a-input-number v-else-if=" item.type=='int'||item.type=='number' " style="width: 100%" placeholder="请输入数值" v-model="item.val"/> <a-input-number v-else-if=" item.type=='int'||item.type=='number' " style="width: 100%" placeholder="请输入数值" v-model="item.val"/>
<a-input v-else v-model="item.val" placeholder="请输入值"/> <a-input v-else v-model="item.val" placeholder="请输入值"/>
</a-col> </a-col>
...@@ -117,8 +118,14 @@ ...@@ -117,8 +118,14 @@
name: 'JSuperQuery', name: 'JSuperQuery',
components: { JDate }, components: { JDate },
props: { props: {
/* fieldList:[{value:'',text:'',type:''}] /*
* type:date datetime int number string fieldList: [{
value:'',
text:'',
type:'',
dictCode:'' // 只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
}]
type:date datetime int number string
* */ * */
fieldList: { fieldList: {
type: Array, type: Array,
...@@ -213,7 +220,11 @@ ...@@ -213,7 +220,11 @@
this.queryParamsModel.splice(index, 1) this.queryParamsModel.splice(index, 1)
}, },
handleSelected(option, item) { handleSelected(option, item) {
item['type'] = option.data.attrs['data-type'] let index = option.data.attrs['data-idx']
let { type, dictCode } = this.fieldList[index]
item['type'] = type
item['dictCode'] = dictCode
}, },
handleReset() { handleReset() {
this.queryParamsModel = [{}] this.queryParamsModel = [{}]
......
...@@ -2,6 +2,11 @@ import Vue from 'vue' ...@@ -2,6 +2,11 @@ import Vue from 'vue'
import Router from 'vue-router' import Router from 'vue-router'
import { constantRouterMap } from '@/config/router.config' import { constantRouterMap } from '@/config/router.config'
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
Vue.use(Router) Vue.use(Router)
export default new Router({ export default new Router({
......
...@@ -129,7 +129,6 @@ ...@@ -129,7 +129,6 @@
import Clipboard from 'clipboard' import Clipboard from 'clipboard'
import { filterObj } from '@/utils/util'; import { filterObj } from '@/utils/util';
export default { export default {
name: 'OnlCgformHeadList', name: 'OnlCgformHeadList',
mixins: [JeecgListMixin], mixins: [JeecgListMixin],
......
...@@ -177,14 +177,13 @@ ...@@ -177,14 +177,13 @@
import JDictSelectTag from '../../../../components/dict/JDictSelectTag.vue' import JDictSelectTag from '../../../../components/dict/JDictSelectTag.vue'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import Clipboard from 'clipboard' import Clipboard from 'clipboard'
import { filterObj } from '@/utils/util'; import { filterObj } from '@/utils/util';
export default { export default {
name: 'OnlCgformHeadList', name: 'OnlCgformHeadList',
mixins: [JeecgListMixin], mixins: [JeecgListMixin],
components: { components: {
JDictSelectTag, JDictSelectTag
}, },
data() { data() {
return { return {
......
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
</span> </span>
</a-table> </a-table>
<cgform-auto-modal @success="handleFormSuccess" ref="modal" :code="code"></cgform-auto-modal> <onl-cgform-auto-modal @success="handleFormSuccess" ref="modal" :code="code"></onl-cgform-auto-modal>
<j-import-modal ref="importModal" :url="getImportUrl()" @ok="importOk"></j-import-modal> <j-import-modal ref="importModal" :url="getImportUrl()" @ok="importOk"></j-import-modal>
......
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
</a-table> </a-table>
<cgform-auto-modal @success="handleFormSuccess" ref="modal" :code="code"></cgform-auto-modal> <onl-cgform-auto-modal @success="handleFormSuccess" ref="modal" :code="code"></onl-cgform-auto-modal>
<j-import-modal ref="importModal" :url="getImportUrl()" @ok="importOk"></j-import-modal> <j-import-modal ref="importModal" :url="getImportUrl()" @ok="importOk"></j-import-modal>
......
*.js linguist-language=Java
*.css linguist-language=Java
*.html linguist-language=Java
*.vue linguist-language=Java
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册