Переглянути джерело

JeecgBoot 2.1.1 版本发布

zhangdaihao 5 роки тому
батько
коміт
9c6f68fd4a

+ 1 - 1
ant-design-vue-jeecg/package.json

@@ -10,7 +10,7 @@
   },
   "dependencies": {
     "@antv/data-set": "^0.10.2",
-    "@jeecg/antd-online": "^1.2.0",
+    "@jeecg/antd-online": "1.2.0",
     "@tinymce/tinymce-vue": "^2.0.0",
     "ant-design-vue": "^1.4.0",
     "apexcharts": "^3.6.5",

+ 10 - 2
ant-design-vue-jeecg/src/components/dict/JDictSelectTag.vue

@@ -32,15 +32,23 @@
         tagType:""
       }
     },
+    watch:{
+      dictCode:{
+        immediate:true,
+        handler() {
+          this.initDictData()
+        },
+      }
+    },
     created() {
-      console.log(this.dictCode);
+      // console.log(this.dictCode);
       if(!this.type || this.type==="list"){
         this.tagType = "select"
       }else{
         this.tagType = this.type
       }
       //获取字典数据
-      this.initDictData();
+      // this.initDictData();
     },
     methods: {
       initDictData() {

+ 17 - 6
ant-design-vue-jeecg/src/components/jeecg/JSuperQuery.vue

@@ -43,7 +43,7 @@
 
               <a-col :span="8">
                 <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-col>
 
@@ -63,8 +63,9 @@
               </a-col>
 
               <a-col :span="8">
-                <j-date v-if=" item.type=='date' " v-model="item.val" placeholder="请选择日期"></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"></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=='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 v-else v-model="item.val" placeholder="请输入值"/>
               </a-col>
@@ -117,8 +118,14 @@
     name: 'JSuperQuery',
     components: { JDate },
     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: {
         type: Array,
@@ -213,7 +220,11 @@
         this.queryParamsModel.splice(index, 1)
       },
       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() {
         this.queryParamsModel = [{}]

+ 5 - 0
ant-design-vue-jeecg/src/router/index.js

@@ -2,6 +2,11 @@ import Vue from 'vue'
 import Router from 'vue-router'
 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)
 
 export default new Router({

+ 0 - 1
ant-design-vue-jeecg/src/views/modules/online/cgform/OnlCgformCopyList.vue

@@ -129,7 +129,6 @@
   import Clipboard from 'clipboard'
   import { filterObj } from '@/utils/util';
 
-
   export default {
     name: 'OnlCgformHeadList',
     mixins: [JeecgListMixin],

+ 1 - 2
ant-design-vue-jeecg/src/views/modules/online/cgform/OnlCgformHeadList.vue

@@ -177,14 +177,13 @@
   import JDictSelectTag from '../../../../components/dict/JDictSelectTag.vue'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import Clipboard from 'clipboard'
-
   import { filterObj } from '@/utils/util';
 
   export default {
     name: 'OnlCgformHeadList',
     mixins: [JeecgListMixin],
     components: {
-      JDictSelectTag,
+      JDictSelectTag
     },
     data() {
       return {

+ 1 - 1
ant-design-vue-jeecg/src/views/modules/online/cgform/auto/OnlCgformAutoList.vue

@@ -179,7 +179,7 @@
         </span>
       </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>
 

+ 1 - 1
ant-design-vue-jeecg/src/views/modules/online/cgform/auto/OnlCgformTreeList.vue

@@ -128,7 +128,7 @@
 
       </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>
 

jeecg-boot/jeecg-boot-base-common/.gitattributes → jeecg-boot/.gitattributes


+ 0 - 4
jeecg-boot/jeecg-boot-module-system/.gitattributes

@@ -1,4 +0,0 @@
-*.js linguist-language=Java
-*.css linguist-language=Java
-*.html linguist-language=Java
-*.vue linguist-language=Java