فهرست منبع

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-vue

魏志佳 4 سال پیش
والد
کامیت
7f7be0516f

+ 127 - 126
package.json

@@ -1,130 +1,131 @@
 {
-    "name": "ant-design-vue-jeecg",
-    "version": "2.0.2",
-    "private": true,
-    "scripts": {
-      "serve": "vue-cli-service serve --open",
-      "build": "vue-cli-service build",
-      "lint": "vue-cli-service lint",
-      "test:unit": "vue-cli-service test:unit",
-      "test:e2e": "vue-cli-service test:e2e"
+  "name": "ant-design-vue-jeecg",
+  "version": "2.0.2",
+  "private": true,
+  "scripts": {
+    "serve": "vue-cli-service serve --open",
+    "build": "vue-cli-service build",
+    "lint": "vue-cli-service lint",
+    "test:unit": "vue-cli-service test:unit",
+    "test:e2e": "vue-cli-service test:e2e"
+  },
+  "dependencies": {
+    "@antv/data-set": "^0.10.2",
+    "@femessage/upload-to-ali": "^1.8.1",
+    "@riophae/vue-treeselect": "^0.4.0",
+    "@tinymce/tinymce-vue": "^2.0.0",
+    "ali-oss": "^6.1.1",
+    "ant-design-vue": "^1.3.9",
+    "apexcharts": "^3.6.5",
+    "axios": "^0.18.0",
+    "babel-loader": "^8.0.6",
+    "blueimp-md5": "^2.11.0",
+    "browser-md5-file": "^1.1.1",
+    "clipboard": "^2.0.4",
+    "codemirror": "^5.46.0",
+    "cos-js-sdk-v5": "^0.5.26",
+    "dayjs": "^1.8.0",
+    "echarts": "^4.3.0",
+    "element-ui": "^2.13.0",
+    "enquire.js": "^2.1.6",
+    "html2canvas": "^1.0.0-rc.3",
+    "iview": "2.0.0-rc.17",
+    "jquery": "^3.4.1",
+    "js-cookie": "^2.2.0",
+    "k-form-design": "^3.6.1",
+    "lodash.get": "^4.4.2",
+    "lodash.pick": "^4.4.0",
+    "mcanvas": "^1.3.9",
+    "md5": "^2.2.1",
+    "nprogress": "^0.2.0",
+    "promise.prototype.finally": "^3.1.1",
+    "tinymce": "^5.0.2",
+    "viser-vue": "^2.4.4",
+    "vue": "^2.6.10",
+    "vue-apexcharts": "^1.3.2",
+    "vue-class-component": "^6.0.0",
+    "vue-count-to": "^1.0.13",
+    "vue-cropper": "^0.4.8",
+    "vue-i18n": "^8.7.0",
+    "vue-layer": "^1.0.2",
+    "vue-loader": "^15.7.0",
+    "vue-ls": "^3.2.0",
+    "vue-oss-uploader": "^0.1.10",
+    "vue-photo-preview": "^1.1.3",
+    "vue-preview": "^1.1.3",
+    "vue-print-nb-jeecg": "^1.0.8",
+    "vue-property-decorator": "^7.3.0",
+    "vue-router": "^3.0.1",
+    "vue-splitpane": "^1.0.4",
+    "vue-video-player": "^5.0.2",
+    "vue-waterfall-easy": "^2.4.3",
+    "vuedraggable": "^2.20.0",
+    "vuex": "^3.0.1",
+    "vuex-class": "^0.3.1"
+  },
+  "devDependencies": {
+    "@babel/polyfill": "^7.2.5",
+    "@vue/cli-plugin-babel": "^3.3.0",
+    "@vue/cli-plugin-eslint": "^3.3.0",
+    "@vue/cli-service": "^3.3.0",
+    "@vue/eslint-config-standard": "^4.0.0",
+    "babel-eslint": "^10.0.1",
+    "babel-plugin-component": "^1.1.1",
+    "eslint": "^5.16.0",
+    "eslint-plugin-vue": "^5.1.0",
+    "html-webpack-plugin": "^3.2.0",
+    "less": "^3.9.0",
+    "less-loader": "^4.1.0",
+    "node-sass": "^4.11.0",
+    "sass-loader": "^7.0.1",
+    "vue-template-compiler": "^2.6.10"
+  },
+  "eslintConfig": {
+    "root": true,
+    "env": {
+      "node": true
     },
-    "dependencies": {
-      "@antv/data-set": "^0.10.2",
-      "@femessage/upload-to-ali": "^1.8.1",
-      "@riophae/vue-treeselect": "^0.4.0",
-      "@tinymce/tinymce-vue": "^2.0.0",
-      "ali-oss": "^6.1.1",
-      "ant-design-vue": "^1.3.9",
-      "apexcharts": "^3.6.5",
-      "axios": "^0.18.0",
-      "babel-loader": "^8.0.6",
-      "blueimp-md5": "^2.11.0",
-      "browser-md5-file": "^1.1.1",
-      "clipboard": "^2.0.4",
-      "codemirror": "^5.46.0",
-      "cos-js-sdk-v5": "^0.5.26",
-      "dayjs": "^1.8.0",
-      "echarts": "^4.3.0",
-      "element-ui": "^2.13.0",
-      "enquire.js": "^2.1.6",
-      "html2canvas": "^1.0.0-rc.3",
-      "iview": "2.0.0-rc.17",
-      "jquery": "^3.4.1",
-      "js-cookie": "^2.2.0",
-      "lodash.get": "^4.4.2",
-      "lodash.pick": "^4.4.0",
-      "mcanvas": "^1.3.9",
-      "md5": "^2.2.1",
-      "nprogress": "^0.2.0",
-      "promise.prototype.finally": "^3.1.1",
-      "tinymce": "^5.0.2",
-      "viser-vue": "^2.4.4",
-      "vue": "^2.6.10",
-      "vue-apexcharts": "^1.3.2",
-      "vue-class-component": "^6.0.0",
-      "vue-count-to": "^1.0.13",
-      "vue-cropper": "^0.4.8",
-      "vue-i18n": "^8.7.0",
-      "vue-layer": "^1.0.2",
-      "vue-loader": "^15.7.0",
-      "vue-ls": "^3.2.0",
-      "vue-oss-uploader": "^0.1.10",
-      "vue-photo-preview": "^1.1.3",
-      "vue-preview": "^1.1.3",
-      "vue-print-nb-jeecg": "^1.0.8",
-      "vue-property-decorator": "^7.3.0",
-      "vue-router": "^3.0.1",
-      "vue-splitpane": "^1.0.4",
-      "vue-video-player": "^5.0.2",
-      "vue-waterfall-easy": "^2.4.3",
-      "vuedraggable": "^2.20.0",
-      "vuex": "^3.0.1",
-      "vuex-class": "^0.3.1"
+    "extends": [
+      "plugin:vue/strongly-recommended",
+      "eslint:recommended"
+    ],
+    "parserOptions": {
+      "parser": "babel-eslint"
     },
-    "devDependencies": {
-      "@babel/polyfill": "^7.2.5",
-      "@vue/cli-plugin-babel": "^3.3.0",
-      "@vue/cli-plugin-eslint": "^3.3.0",
-      "@vue/cli-service": "^3.3.0",
-      "@vue/eslint-config-standard": "^4.0.0",
-      "babel-eslint": "^10.0.1",
-      "babel-plugin-component": "^1.1.1",
-      "eslint": "^5.16.0",
-      "eslint-plugin-vue": "^5.1.0",
-      "html-webpack-plugin": "^3.2.0",
-      "less": "^3.9.0",
-      "less-loader": "^4.1.0",
-      "node-sass": "^4.11.0",
-      "sass-loader": "^7.0.1",
-      "vue-template-compiler": "^2.6.10"
-    },
-    "eslintConfig": {
-      "root": true,
-      "env": {
-        "node": true
-      },
-      "extends": [
-        "plugin:vue/strongly-recommended",
-        "eslint:recommended"
-      ],
-      "parserOptions": {
-        "parser": "babel-eslint"
-      },
-      "rules": {
-        "generator-star-spacing": "off",
-        "no-mixed-operators": 0,
-        "vue/max-attributes-per-line": [
-          2,
-          {
-            "singleline": 5,
-            "multiline": {
-              "max": 1,
-              "allowFirstLine": false
-            }
+    "rules": {
+      "generator-star-spacing": "off",
+      "no-mixed-operators": 0,
+      "vue/max-attributes-per-line": [
+        2,
+        {
+          "singleline": 5,
+          "multiline": {
+            "max": 1,
+            "allowFirstLine": false
           }
-        ],
-        "vue/attribute-hyphenation": 0,
-        "vue/html-self-closing": 0,
-        "vue/component-name-in-template-casing": 0,
-        "vue/html-closing-bracket-spacing": 0,
-        "vue/singleline-html-element-content-newline": 0,
-        "vue/no-unused-components": 0,
-        "vue/multiline-html-element-content-newline": 0,
-        "vue/no-use-v-if-with-v-for": 0,
-        "vue/html-closing-bracket-newline": 0,
-        "vue/no-parsing-error": 0,
-        "no-console": 0
-      }
-    },
-    "postcss": {
-      "plugins": {
-        "autoprefixer": {}
-      }
-    },
-    "browserslist": [
-      "> 1%",
-      "last 2 versions",
-      "not ie <= 8"
-    ]
-  }
+        }
+      ],
+      "vue/attribute-hyphenation": 0,
+      "vue/html-self-closing": 0,
+      "vue/component-name-in-template-casing": 0,
+      "vue/html-closing-bracket-spacing": 0,
+      "vue/singleline-html-element-content-newline": 0,
+      "vue/no-unused-components": 0,
+      "vue/multiline-html-element-content-newline": 0,
+      "vue/no-use-v-if-with-v-for": 0,
+      "vue/html-closing-bracket-newline": 0,
+      "vue/no-parsing-error": 0,
+      "no-console": 0
+    }
+  },
+  "postcss": {
+    "plugins": {
+      "autoprefixer": {}
+    }
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions",
+    "not ie <= 8"
+  ]
+}

+ 1 - 1
public/color.less

@@ -1,4 +1,4 @@
-@primary-color: #1890ff;
+@primary-color: #1890ff !important;
 /* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
 /* stylelint-disable no-duplicate-selectors */
 /* stylelint-disable */

+ 1 - 0
public/index.html

@@ -8,6 +8,7 @@
   <meta name="viewport" content="width=device-width,initial-scale=1.0">
   <title>汇创投放助手</title>
   <link rel="icon" href="<%= BASE_URL %>logo.png">
+  <link href="<%= BASE_URL %>color.less">
   <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.2.5/polyfill.js"></script>
   <script src="<%= BASE_URL %>web-office-sdk-v1.1.1.umd.js"></script>
   <style>

+ 14 - 3
src/components/layouts/TabLayout.vue

@@ -242,8 +242,13 @@
         // index = index >= this.linkList.length ? this.linkList.length - 1 : index
         // this.activePage = this.linkList[index]
         if (key == "/account/advertisingGroup") {
-          localStorage.removeItem("advertisingGroup")
-          localStorage.removeItem("advertisingGroupKey")
+          if (this.linkList.includes("/account/stepForm") || this.linkList.includes("/account/originality")) {
+            this.$message.error('已开启创意或创建页面,不可关闭组页面')
+            return
+          } else {
+            localStorage.removeItem("advertisingGroup")
+            localStorage.removeItem("advertisingGroupKey")
+          }
         }
         if (key == "/account/stepForm") {
           localStorage.removeItem("step")
@@ -258,7 +263,13 @@
           localStorage.removeItem("key")
         }
         if (key == "/account/accountIndex") {
-          this.routeReload()
+          if (this.linkList.includes("/account/stepForm") || this.linkList.includes("/account/originality") || this
+            .linkList.includes("/account/advertisingGroup")) {
+            this.$message.error('正在操作,不可关闭计划列表')
+            return
+          } else {
+            this.routeReload()
+          }
         }
 
         if (key == '/modules/BatchCreate/TouTiaoBatch' && !(this.linkList.includes('/modules/BatchCreate/newCreate') ||

+ 3 - 3
src/components/setting/SettingDrawer.vue

@@ -192,9 +192,9 @@
         vm.visible = false
       }, 16)
       // 当主题色不是默认色时,才进行主题编译
-      if (this.primaryColor !== config.primaryColor) {
-        updateTheme(this.primaryColor)
-      }
+    //   if (this.primaryColor !== config.primaryColor) {
+    //     updateTheme(this.primaryColor)
+    //   }
       if (this.colorWeak !== config.colorWeak) {
         updateColorWeak(this.colorWeak)
       }

+ 3 - 1
src/components/uploadFile.vue

@@ -227,12 +227,14 @@
         let d = date.getDate()
         d = d < 10 ? '0' + d : d
         var timeElse = new Date().getTime()
+        var arr = file.name.split('.')
+        console.log(arr[0] + '-' + timeElse + '.' + arr[1])
         cos.putObject({
           Bucket: 'media-1301855440',
           /* 必须 */
           Region: 'ap-chongqing',
           /* 存储桶所在地域,必须字段 */
-          Key: that.uploadType + '/' + y + '-' + MM + '-' + d + '/' + timeElse + '-' + file.name,
+          Key: that.uploadType + '/' + y + '-' + MM + '-' + d + '/' + arr[0] + '-' + timeElse + '.' + arr[1],
           /* 必须 */
           StorageClass: 'STANDARD',
           Body: file, // 上传文件对象

+ 8 - 0
src/main.js

@@ -30,6 +30,14 @@ import promiseFinally from 'promise.prototype.finally';
 promiseFinally.shim();
 
 import md5 from 'blueimp-md5';
+
+// import KFormDesign from 'k-form-design'
+import KFormDesign from 'k-form-design/lib/k-form-design-mini.umd.min'
+import 'k-form-design/styles/k-form-design.less'
+// import 'k-form-design/lib/k-form-design.css'
+Vue.use(KFormDesign)
+import 'ant-design-vue/dist/antd.less';
+
 Vue.prototype.$md5 = md5;
 import {
   ACCESS_TOKEN,

+ 93 - 66
src/views/activiti/applyHome.vue

@@ -2,80 +2,99 @@
   <a-card :bordered="false">
     <!--流程申请选择-->
     <a-input-search style="margin-bottom: 10px;margin-right:10px;width: 200px" v-model="searchProcessKey"
-                    placeholder="输入流程名称" @search="onSearchProcess" />
+      placeholder="输入流程名称" @search="onSearchProcess" />
     <a-button @click="onSearchProcess(searchProcessKey)" type="primary">查询</a-button>
     <a-button @click="onSearchProcess('')">重置</a-button>
     <a-button @click="handleToApplyList" type="primary" style="float: right;">前往我的申请列表</a-button>
-      <a-empty description="无流程可供选择" v-if="activeKeyAll.length==0" />
-      <div v-else>
-        <a-collapse v-model="activeKey">
-          <a-collapse-panel v-for="(value, index)  in activeKeyAll" :header="filterDictText(dictOptions,value)||'未分类'" :key="value">
-            <a-list :grid="{ gutter: 10,column:4}" :dataSource="processDataMap[value]">
-              <a-list-item slot="renderItem" slot-scope="item">
-                <a-card>
-                  <div slot="title">
-                    <a-row>
-                      <a-col span="12" :title="item.name">{{item.name}} </a-col>
-                      <a-col span="12" style="text-align: right;">
-                        <a href="javascript:void (0)" @click="chooseProcess(item)">发起申请</a>
-                      </a-col>
-                    </a-row>
-                  </div>
-                  <b>版本:</b>v.{{item.version}}
-                  <br/>
-                  <b>说明:</b>{{item.description}}
-                </a-card>
-              </a-list-item>
-            </a-list>
-          </a-collapse-panel>
-        </a-collapse>
-      </div>
+    <a-empty description="无流程可供选择" v-if="activeKeyAll.length==0" />
+    <div v-else>
+      <a-collapse v-model="activeKey">
+        <a-collapse-panel v-for="(value, index)  in activeKeyAll" :header="filterDictText(dictOptions,value)||'未分类'"
+          :key="value">
+          <a-list :grid="{ gutter: 10,column:4}" :dataSource="processDataMap[value]">
+            <a-list-item slot="renderItem" slot-scope="item">
+              <a-card>
+                <div slot="title">
+                  <a-row>
+                    <a-col span="12" :title="item.name">{{item.name}} </a-col>
+                    <a-col span="12" style="text-align: right;">
+                      <a href="javascript:void (0)" @click="chooseProcess(item)">发起申请</a>
+                    </a-col>
+                  </a-row>
+                </div>
+                <b>版本:</b>v.{{item.version}}
+                <br />
+                <b>说明:</b>{{item.description}}
+              </a-card>
+            </a-list-item>
+          </a-list>
+        </a-collapse-panel>
+      </a-collapse>
+      <k-form-design style="border:2px solid #ccc" :fields="typeList" :toolbars="['save', 'preview', 'reset', 'close' ]"
+        :showHead="false" toolbarsTop showToolbarsText @save="saveJson" />
+    </div>
     <!--流程表单-->
     <a-modal :title="lcModa.title" v-model="lcModa.visible" :footer="null" :maskClosable="false" width="80%">
       <component :disabled="lcModa.disabled" v-if="lcModa.visible" :is="lcModa.formComponent"
-                 :processData="lcModa.processData" :isNew = "lcModa.isNew"
-                 @afterSubmit="afterSub" @close="lcModa.visible=false,lcModa.disabled = false"></component>
+        :processData="lcModa.processData" :isNew="lcModa.isNew" @afterSubmit="afterSub"
+        @close="lcModa.visible=false,lcModa.disabled = false"></component>
     </a-modal>
   </a-card>
 
 </template>
 
 <script>
-  import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
+  import {
+    activitiMixin
+  } from '@/views/activiti/mixins/activitiMixin'
   import JEllipsis from '@/components/jeecg/JEllipsis'
   import JTreeSelect from '@/components/jeecg/JTreeSelect'
-  import {initDictOptions, filterDictText} from '@/components/dict/JDictSelectUtil'
+  import {
+    initDictOptions,
+    filterDictText
+  } from '@/components/dict/JDictSelectUtil'
   import historicDetail from '@/views/activiti/historicDetail'
   export default {
     name: "applyHome",
-    mixins:[activitiMixin],
+    mixins: [activitiMixin],
     components: {
-      JEllipsis
-      ,JTreeSelect
-      ,historicDetail
+      JEllipsis,
+      JTreeSelect,
+      historicDetail
     },
-    data () {
+    data() {
       return {
+        typeList: ["input", "textarea", "number", "select", "checkbox", "radio", "date", "time", "rate", "slider",
+          "uploadFile", "uploadImg", "switch", "button",  "text",  "card", "grid", "table"
+        ],//"alert","html", "divider",
         description: '所有',
-        dictOptions:[],
+        dictOptions: [],
         url: {
           getProcessDataList: "/activiti_process/listData",
-          getFirstNode:'/actProcessIns/getFirstNode',
-          applyBusiness:'/actBusiness/apply',
+          getFirstNode: '/actProcessIns/getFirstNode',
+          applyBusiness: '/actBusiness/apply',
         },
         // 查询条件
         queryParam: {
-          createTimeRange:[],
-          keyWord:'',
+          createTimeRange: [],
+          keyWord: '',
         },
         // 表头
         labelCol: {
-          xs: { span: 4 },
-          sm: { span: 4 },
+          xs: {
+            span: 4
+          },
+          sm: {
+            span: 4
+          },
         },
         wrapperCol: {
-          xs: { span: 20 },
-          sm: { span: 20 },
+          xs: {
+            span: 20
+          },
+          sm: {
+            span: 20
+          },
         },
         processModalVisible: null,
         activeKeyAll: [],
@@ -84,22 +103,23 @@
         searchProcessKey: null,
         addApplyLoading: false,
         lcModa: {
-          title:'',
-          disabled:false,
-          visible:false,
-          formComponent : null,
-          isNew : false
+          title: '',
+          disabled: false,
+          visible: false,
+          formComponent: null,
+          isNew: false
         },
       }
     },
-    computed:{
-    },
+    computed: {},
     mounted() {
       this.initDictConfig()
       this.getProcessList()
     },
     methods: {
-
+      saveJson(json) {
+        console.log(json)
+      },
       initDictConfig() {
         //初始化字典 - 流程分类
         initDictOptions('bpm_process_type').then((res) => {
@@ -116,31 +136,36 @@
             }
           }
         }
-        return text||text=='null'?'':text
+        return text || text == 'null' ? '' : text
       },
       /*加载流程列表*/
       getProcessList() {
         this.addApplyLoading = true;
-        this.getAction(this.url.getProcessDataList,{status:1,roles:true}).then(res => {
+        this.getAction(this.url.getProcessDataList, {
+          status: 1,
+          roles: true
+        }).then(res => {
           this.activeKeyAll = [];
           if (res.success) {
-            var result = res.result||[];
-            if (result.length>0){
+            var result = res.result || [];
+            if (result.length > 0) {
               let searchProcessKey = this.searchProcessKey;
-              if (searchProcessKey){ //过滤条件
-                result = _.filter(result, function(o) { return o.name.indexOf(searchProcessKey)>-1; });
+              if (searchProcessKey) { //过滤条件
+                result = _.filter(result, function (o) {
+                  return o.name.indexOf(searchProcessKey) > -1;
+                });
               }
-              this.processDataMap = _.groupBy(result,'categoryId');
+              this.processDataMap = _.groupBy(result, 'categoryId');
               for (const categoryId in this.processDataMap) {
                 this.activeKeyAll.push(categoryId)
               }
               this.activeKey = this.activeKeyAll;
             }
             this.processModalVisible = true;
-          }else {
+          } else {
             this.$message.warning(res.message)
           }
-        }).finally(()=>this.addApplyLoading = false);
+        }).finally(() => this.addApplyLoading = false);
       },
       onSearchProcess(value) {
         this.searchProcessKey = value;
@@ -154,20 +179,22 @@
           return;
         }
         this.lcModa.formComponent = this.getFormComponent(v.routeName).component;
-        this.lcModa.title = '发起流程:'+v.name;
+        this.lcModa.title = '发起流程:' + v.name;
         this.lcModa.isNew = true;
         this.lcModa.processData = v;
         this.lcModa.visible = true;
-        console.log("发起",v)
+        console.log("发起", v)
       },
       /*提交成功申请后*/
-      afterSub(formData){
-          this.lcModa.visible = false;
-          this.$message("请前往我的申请列表提交审批!")
+      afterSub(formData) {
+        this.lcModa.visible = false;
+        this.$message("请前往我的申请列表提交审批!")
       },
       /*前往我的申请页面*/
       handleToApplyList() {
-        this.$router.push({path:'/activiti/applyList'})
+        this.$router.push({
+          path: '/activiti/applyList'
+        })
       }
     }
   }

+ 1 - 1
src/views/modules/kuaishouapp/account/editGroup.vue

@@ -904,7 +904,7 @@
         })
       },
     },
-    mounted: function () {
+    activated: function () {
       this.getAppList()
       this.getCampaignList()
       this.getMould()

+ 1 - 1
src/views/modules/kuaishouapp/account/editGroupNew.vue

@@ -942,7 +942,7 @@
         })
       },
     },
-    mounted: function () {
+    activated: function () {
       this.getAppList()
       this.getCampaignList()
       this.getMould()