Browse Source

'修改冲突'

魏志佳 4 năm trước cách đây
mục cha
commit
03c89a2f73

+ 1 - 1
src/main.js

@@ -93,7 +93,7 @@ Vue.use(preview)
 Vue.use(vueBus);
 Vue.use(JeecgComponents);
 Vue.use(VuePreview);
-Vue.prototype.doMian = "/jeecg-boot/";
+Vue.prototype.doMian = "http://139.186.31.213:8804/jeecg-boot";
 Vue.prototype.postFormAction = postFormAction;
 Vue.prototype.postDataAction = postAction;
 Vue.prototype.getAction = getAction;

+ 2 - 0
src/mixins/JeecgListMixin.js

@@ -12,6 +12,7 @@ import { transformTozTreeFormat } from '@/utils/util.js'
 export const JeecgListMixin = {
   data() {
     return {
+      spinning:true,
       //token header
       tokenHeader: {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)},
       /* 查询条件-请不要在queryParam中声明非字符串值的属性 */
@@ -93,6 +94,7 @@ export const JeecgListMixin = {
         }
     },
     async loadData(arg) {
+      this.spinning= true
       this.dataSource = []
       if (!this.url.list) {
         this.$message.error("请设置url.list属性!")

+ 2 - 2
src/utils/request.js

@@ -13,8 +13,8 @@ if (process.env.NODE_ENV == 'development') {
 else if (process.env.NODE_ENV == 'debug') { 
 } 
 else if (process.env.NODE_ENV == 'production') { 
-    // axios.defaults.baseURL = 'http://192.168.1.251/jeecg-boot';
-axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot';
+    axios.defaults.baseURL = 'http://192.168.1.251/jeecg-boot';
+// axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot';
 }
 const service = axios.create({
 //   baseURL: '/jeecg-boot', // api base_url

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 589 - 484
src/views/activiti/ProcessModelList.vue


+ 220 - 147
src/views/activiti/applyHome.vue

@@ -1,30 +1,39 @@
 <template>
   <a-card :bordered="false">
     <!--流程申请选择-->
-    <a-input-search style="margin-bottom: 10px;margin-right:10px;width: 200px" v-model="searchProcessKey"
-      placeholder="输入流程名称" @search="onSearchProcess" />
+    <a-input-search
+      style="margin-bottom: 10px;margin-right:10px;width: 200px"
+      v-model="searchProcessKey"
+      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-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" :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}}
+                <b>版本:</b>
+                v.{{item.version}}
                 <br />
-                <b>说明:</b>{{item.description}}
+                <b>说明:</b>
+                {{item.description}}
               </a-card>
             </a-list-item>
           </a-list>
@@ -32,171 +41,235 @@
       </a-collapse>
     </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>
+    <a-modal :title="lcModa.title" v-model="lcModa.visible" :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>-->
+      <template slot="footer">
+        <a-button @click="lcModa.visible=false">关闭</a-button>
+        <a-button key="back" @click="close">重置</a-button>
+        <a-button key="submit" type="primary" @click="handleOkAll" :loading="loadingElse">提交</a-button>
+      </template>
+      <k-form-build v-if="lcModa.visible" :defaultValue="defaultValue" :value="jsonData" ref="kfb" />
     </a-modal>
   </a-card>
-
 </template>
 
 <script>
-  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 historicDetail from '@/views/activiti/historicDetail'
-  export default {
-    name: "applyHome",
-    mixins: [activitiMixin],
-    components: {
-      JEllipsis,
-      JTreeSelect,
-      historicDetail
-    },
-    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: [],
-        url: {
-          getProcessDataList: "/activiti_process/listData",
-          getFirstNode: '/actProcessIns/getFirstNode',
-          applyBusiness: '/actBusiness/apply',
-        },
-        // 查询条件
-        queryParam: {
-          createTimeRange: [],
-          keyWord: '',
+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 historicDetail from '@/views/activiti/historicDetail'
+import { deleteAction, getAction, downFile,postAction } from '@/api/manage'
+export default {
+  name: 'applyHome',
+  mixins: [activitiMixin],
+  components: {
+    JEllipsis,
+    JTreeSelect,
+    historicDetail,
+  },
+  data() {
+    return {
+      loadingElse: false,
+      typeList: [
+        'input',
+        'textarea',
+        'number',
+        'select',
+        'checkbox',
+        'radio',
+        'date',
+        'time',
+        'rate',
+        'slider',
+        'uploadFile',
+        'uploadImg',
+        'switch',
+        'button',
+        'text',
+        'card',
+        'grid',
+        'table',
+      ], //"alert","html", "divider",
+      description: '所有',
+      dictOptions: [],
+      url: {
+        getProcessDataList: '/activiti_process/listData',
+        getFirstNode: '/actProcessIns/getFirstNode',
+        applyBusiness: '/actBusiness/apply',
+      },
+      // 查询条件
+      queryParam: {
+        createTimeRange: [],
+        keyWord: '',
+      },
+      // 表头
+      labelCol: {
+        xs: {
+          span: 4,
         },
-        // 表头
-        labelCol: {
-          xs: {
-            span: 4
-          },
-          sm: {
-            span: 4
-          },
+        sm: {
+          span: 4,
         },
-        wrapperCol: {
-          xs: {
-            span: 20
-          },
-          sm: {
-            span: 20
-          },
+      },
+      wrapperCol: {
+        xs: {
+          span: 20,
         },
-        processModalVisible: null,
-        activeKeyAll: [],
-        activeKey: [],
-        processDataMap: {},
-        searchProcessKey: null,
-        addApplyLoading: false,
-        lcModa: {
-          title: '',
-          disabled: false,
-          visible: false,
-          formComponent: null,
-          isNew: false
+        sm: {
+          span: 20,
         },
-      }
-    },
-    computed: {},
-    mounted() {
-      this.initDictConfig()
-      this.getProcessList()
-    },
-    methods: {
-      saveJson(json) {
-        console.log(json)
       },
-      initDictConfig() {
-        //初始化字典 - 流程分类
-        initDictOptions('bpm_process_type').then((res) => {
-          if (res.success) {
-            this.dictOptions = res.result;
-          }
-        });
+      processModalVisible: null,
+      activeKeyAll: [],
+      activeKey: [],
+      processDataMap: {},
+      searchProcessKey: null,
+      addApplyLoading: false,
+      lcModa: {
+        title: '',
+        disabled: false,
+        visible: false,
+        formComponent: null,
+        isNew: false,
       },
-      filterDictText(dictOptions, text) {
-        if (dictOptions instanceof Array) {
-          for (let dictItem of dictOptions) {
-            if (text === dictItem.value) {
-              return dictItem.text
-            }
+      jsonData: {},
+      defaultValue: {},
+    }
+  },
+  computed: {},
+  mounted() {
+    this.initDictConfig()
+    this.getProcessList()
+  },
+  methods: {
+    handleOkAll() {
+      this.loadingElse = true
+      var that = this
+      this.$refs.kfb
+        .getData()
+        .then((values) => {
+          console.log('验证通过', values,this.lcModa.processData)
+          var formData = {}
+          formData.tableId = this.lcModa.processData.customTableId
+          formData.procDefId = this.lcModa.processData.id
+          formData.procDeTitle = this.lcModa.processData.name
+          formData.formText = JSON.stringify(values)
+          postAction('/actBusiness/add', formData)
+            .then((res) => {
+              if (res.success) {
+                that.lcModa.visible=false
+                that.$message.success('保存成功!')
+                that.loadingElse = false
+              } else {
+                that.$message.error(res.message)
+                that.loadingElse = false
+              }
+            })
+            .finally(() => {
+              that.loadingElse = false
+            })
+        })
+    },
+    close() {
+      this.$refs.kfb.reset()
+    },
+    saveJson(json) {
+      console.log(json)
+    },
+    initDictConfig() {
+      //初始化字典 - 流程分类
+      initDictOptions('bpm_process_type').then((res) => {
+        if (res.success) {
+          this.dictOptions = res.result
+        }
+      })
+    },
+    filterDictText(dictOptions, text) {
+      if (dictOptions instanceof Array) {
+        for (let dictItem of dictOptions) {
+          if (text === dictItem.value) {
+            return dictItem.text
           }
         }
-        return text || text == 'null' ? '' : text
-      },
-      /*加载流程列表*/
-      getProcessList() {
-        this.addApplyLoading = true;
-        this.getAction(this.url.getProcessDataList, {
-          status: 1,
-          roles: true
-        }).then(res => {
-          this.activeKeyAll = [];
+      }
+      return text || text == 'null' ? '' : text
+    },
+    /*加载流程列表*/
+    getProcessList() {
+      this.addApplyLoading = true
+      this.getAction(this.url.getProcessDataList, {
+        status: 1,
+        roles: true,
+      })
+        .then((res) => {
+          this.activeKeyAll = []
           if (res.success) {
-            var result = res.result || [];
+            var result = res.result || []
             if (result.length > 0) {
-              let searchProcessKey = this.searchProcessKey;
-              if (searchProcessKey) { //过滤条件
+              let searchProcessKey = this.searchProcessKey
+              if (searchProcessKey) {
+                //过滤条件
                 result = _.filter(result, function (o) {
-                  return o.name.indexOf(searchProcessKey) > -1;
-                });
+                  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.activeKey = this.activeKeyAll
             }
-            this.processModalVisible = true;
+            this.processModalVisible = true
           } else {
             this.$message.warning(res.message)
           }
-        }).finally(() => this.addApplyLoading = false);
-      },
-      onSearchProcess(value) {
-        this.searchProcessKey = value;
-        this.getProcessList()
-      },
-      chooseProcess(v) {
-        if (!v.routeName) {
-          this.$message.warning(
-            "该流程信息未配置表单,请联系开发人员!"
-          );
-          return;
-        }
-        this.lcModa.formComponent = this.getFormComponent(v.routeName).component;
-        this.lcModa.title = '发起流程:' + v.name;
-        this.lcModa.isNew = true;
-        this.lcModa.processData = v;
-        this.lcModa.visible = true;
-        console.log("发起", v)
-      },
-      /*提交成功申请后*/
-      afterSub(formData) {
-        this.lcModa.visible = false;
-        this.$message("请前往我的申请列表提交审批!")
-      },
-      /*前往我的申请页面*/
-      handleToApplyList() {
-        this.$router.push({
-          path: '/activiti/applyList'
         })
-      }
-    }
-  }
+        .finally(() => (this.addApplyLoading = false))
+    },
+    onSearchProcess(value) {
+      this.searchProcessKey = value
+      this.getProcessList()
+    },
+    chooseProcess(v) {
+      getAction('/ctop/actCustomForm/queryById', { id: v.customTableId }).then((res) => {
+        if (res.success) {
+          this.jsonData = JSON.parse(res.result.text)
+        } else {
+          this.$message.warning('该流程信息未配置表单,请联系开发人员!')
+          return
+        }
+      })
+      this.loadingElse = false
+      // this.lcModa.formComponent = this.getFormComponent(v.routeName).component
+      this.lcModa.title = '发起流程:' + v.name
+      this.lcModa.isNew = true
+      this.lcModa.processData = v
+      this.lcModa.visible = true
+      console.log('发起', v)
+    },
+    /*提交成功申请后*/
+    afterSub(formData) {
+      this.lcModa.visible = false
+      this.$message('请前往我的申请列表提交审批!')
+    },
+    /*前往我的申请页面*/
+    handleToApplyList() {
+      this.$router.push({
+        path: '/activiti/applyList',
+      })
+    },
+  },
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less';
+@import '~@assets/less/common.less';
 </style>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 504 - 387
src/views/activiti/applyList.vue


+ 143 - 110
src/views/activiti/doneManage.vue

@@ -1,5 +1,5 @@
 <style lang="less">
-  @import '~@assets/less/common.less';
+@import '~@assets/less/common.less';
 </style>
 <template>
   <div class="search">
@@ -9,26 +9,23 @@
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-item label="任务名称" prop="name">
-                <a-input
-                  type="text"
-                  v-model="searchForm.name"
-                  placeholder="请输入"
-                  clearable
-                />
+                <a-input type="text" v-model="searchForm.name" placeholder="请输入" clearable />
               </a-form-item>
             </a-col>
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-            <a-col :md="6" :sm="12" >
+              <a-col :md="6" :sm="12">
                 <a-button @click="handleSearch" type="primary" icon="search">搜索</a-button>
                 <a-button @click="handleReset" style="margin-left: 10px;">重置</a-button>
-            </a-col>
-          </span>
+              </a-col>
+            </span>
           </a-row>
         </a-form>
       </div>
 
       <a-row>
-        <a-table :scroll="scroll" bordered
+        <a-table
+          :scroll="scroll"
+          bordered
           :loading="loading"
           rowKey="id"
           :dataSource="data"
@@ -36,68 +33,78 @@
           @change="handleTableChange"
           ref="table"
         >
-          <a-table-column title="#"  :width="50">
-            <template slot-scope="t,r,i" >
-              <span> {{i+1}} </span>
+          <a-table-column title="#" :width="50">
+            <template slot-scope="t,r,i">
+              <span>{{i+1}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="任务名称" dataIndex="name"  :width="150" align="center">
+          <a-table-column title="任务名称" data-index="name" :width="150" align="center">
             <template slot-scope="t,r,i">
-              <span> {{t}} </span>
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="所属流程" dataIndex="processName"  :width="150" align="center">
+          <a-table-column title="所属流程" data-index="processName" :width="150" align="center">
             <template slot-scope="t,r,i">
-              <span> {{t}} </span>
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="委托代办人" dataIndex="owner"  :width="130" align="center">
+          <a-table-column title="委托代办人" data-index="owner" :width="130" align="center">
             <template slot-scope="t,r,i">
-              <span> {{t}} </span>
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="流程发起人" dataIndex="applyer"  :width="130" align="center">
+          <a-table-column title="流程发起人" data-index="applyer" :width="130" align="center">
             <template slot-scope="t,r,i">
-              <span> {{t}} </span>
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="优先级" dataIndex="priority"  :width="100" align="center"
-                          key="priority" :sorter="(a,b)=>a.priority - b.priority"
+          <a-table-column
+            title="优先级"
+            data-index="priority"
+            :width="100"
+            align="center"
+            key="priority"
+            :sorter="(a,b)=>a.priority - b.priority"
           >
             <template slot-scope="t">
-              <span v-if="t==0" style="color: green;"> 普通 </span>
-              <span v-else-if="t==1" style="color: orange;"> 重要 </span>
-              <span v-else-if="t==2" style="color: red;"> 紧急 </span>
-              <span v-else style="color: #999;">  </span>
+              <span v-if="t==0" style="color: green;">普通</span>
+              <span v-else-if="t==1" style="color: orange;">重要</span>
+              <span v-else-if="t==2" style="color: red;">紧急</span>
+              <span v-else style="color: #999;">无</span>
             </template>
           </a-table-column>
-          <a-table-column title="审批操作" dataIndex="deleteReason"  :width="100" align="center">
+          <a-table-column title="审批操作" data-index="deleteReason" :width="100" align="center">
             <template slot-scope="t">
-              <span> {{t}} </span>
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="审批意见" dataIndex="comment"  :width="100" align="center">
+          <a-table-column title="审批意见" data-index="comment" :width="100" align="center">
             <template slot-scope="t">
-              <j-ellipsis :value="t" :length="10"/>
+              <j-ellipsis :value="t" :length="10" />
             </template>
           </a-table-column>
-          <a-table-column title="耗时" dataIndex="duration"  :width="100" align="center"
-                          key="duration" :sorter="(a,b)=>a.duration - b.duration"
-                          >
+          <a-table-column
+            title="耗时"
+            data-index="duration"
+            :width="100"
+            align="center"
+            key="duration"
+            :sorter="(a,b)=>a.duration - b.duration"
+          >
             <template slot-scope="t">
-              <span> {{millsToTime(t)}} </span>
+              <span>{{millsToTime(t)}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="创建时间" dataIndex="createTime"  :width="150" align="center">
+          <a-table-column title="创建时间" data-index="createTime" :width="150" align="center">
             <template slot-scope="t">
-              <span> {{t}} </span>
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="操作" dataIndex="action"   align="center">
+          <a-table-column title="操作" data-index="action" align="center">
             <template slot-scope="t,r,i">
-              <a href="javascript:void(0);" @click="detail(r)" >表单数据</a>
+              <a href="javascript:void(0);" @click="detail(r)">表单数据</a>
               <a-divider type="vertical" />
-              <a href="javascript:void(0);" @click="history(r)" >审批历史</a>
+              <a href="javascript:void(0);" @click="history(r)">审批历史</a>
               <a-divider type="vertical" />
               <a-popconfirm title="确定删除吗?" @confirm="() => remove(r)">
                 <a style="color: red;">删除</a>
@@ -108,28 +115,46 @@
       </a-row>
     </a-card>
     <!---->
-    <a-modal title="审批历史" v-model="modalLsVisible" :mask-closable="false" :width="'80%'" :footer="null">
+    <a-modal
+      title="审批历史"
+      v-model="modalLsVisible"
+      :mask-closable="false"
+      :width="'80%'"
+      :footer="null"
+    >
       <div v-if="modalLsVisible">
         <component :is="historicDetail" :procInstId="procInstId"></component>
       </div>
     </a-modal>
     <!--流程表单-->
-    <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"
-                 @close="lcModa.visible=false,lcModa.disabled = false"></component>
+    <a-modal
+      :title="lcModa.title"
+      v-model="lcModa.visible"
+      :footer="null"
+      :maskClosable="false"
+      width="80%"
+    >
+      <k-form-build
+        v-if="lcModa.visible"
+        :defaultValue="defaultValue"
+        :value="jsonData"
+        ref="kfb"
+        disabled
+      />
     </a-modal>
   </div>
 </template>
 
 <script>
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-  import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
 export default {
-  name: "done-manage",
-  mixins:[activitiMixin,JeecgListMixin],
+  name: 'done-manage',
+  mixins: [activitiMixin, JeecgListMixin],
   data() {
     return {
+      jsonData: {},
+      defaultValue: {},
       openSearch: true,
       openTip: true,
       loading: true, // 表单加载状态
@@ -137,18 +162,18 @@ export default {
       selectList: [], // 多选数据
       searchForm: {
         // 搜索框对应data对象
-        name: "",
+        name: '',
         pageNumber: 1, // 当前页数
         pageSize: 10, // 页面大小
-        sort: "createTime", // 默认排序字段
-        order: "desc" // 默认排序方式
+        sort: 'createTime', // 默认排序字段
+        order: 'desc', // 默认排序方式
       },
       modalType: 0, // 添加或编辑标识
       modalVisible: false, // 添加或编辑显示
-      modalTitle: "", // 添加或编辑标题
+      modalTitle: '', // 添加或编辑标题
       form: {
         // 添加或编辑表单对象初始化数据
-        reason: ""
+        reason: '',
       },
       formValidate: {
         // 表单验证规则
@@ -156,100 +181,108 @@ export default {
       submitLoading: false, // 添加或编辑提交状态
       data: [], // 表数据
       total: 0, // 表数据总数
-      deleteId: "",
-      url:{
-        doneList:'/actTask/doneList',
-        deleteHistoricTask:'/actTask/deleteHistoric/'
+      deleteId: '',
+      url: {
+        doneList: '/actTask/doneList',
+        deleteHistoricTask: '/actTask/deleteHistoric/',
       },
       modalLsVisible: false,
       procInstId: '',
       lcModa: {
-        title:'',
-        disabled:false,
-        visible:false,
-        formComponent : null,
-        isNew : false
+        title: '',
+        disabled: false,
+        visible: false,
+        formComponent: null,
+        isNew: false,
       },
-    };
+    }
   },
   mounted() {
-    this.init();
+    this.init()
   },
   methods: {
-    loadData(){},
+    loadData() {},
     init() {
-      this.getDataList();
+      this.getDataList()
     },
     getDataList() {
-      this.loading = true;
-      this.postFormAction(this.url.doneList,this.searchForm).then(res => {
-        this.loading = false;
+      this.loading = true
+      this.postFormAction(this.url.doneList, this.searchForm).then((res) => {
+        this.loading = false
         if (res.success) {
-          this.data = res.result||[];
-        }else {
+          this.data = res.result || []
+        } else {
           this.$message.error(res.message)
         }
-      });
+      })
     },
     handleSearch() {
-      this.searchForm.pageNumber = 1;
-      this.searchForm.pageSize = 10;
-      this.getDataList();
+      this.searchForm.pageNumber = 1
+      this.searchForm.pageSize = 10
+      this.getDataList()
     },
     handleReset() {
-      this.searchForm={};
-      this.searchForm.pageNumber = 1;
-      this.searchForm.pageSize = 10;
+      this.searchForm = {}
+      this.searchForm.pageNumber = 1
+      this.searchForm.pageSize = 10
       // 重新加载数据
-      this.getDataList();
+      this.getDataList()
     },
     handelCancel() {
-      this.modalVisible = false;
+      this.modalVisible = false
     },
     detail(r) {
-      if (!r.routeName) {
-        this.$message.warning(
-          "该流程信息未配置表单,请联系开发人员!"
-        );
-        return;
-      }
-      this.lcModa.disabled = true;
-      this.lcModa.title = '查看流程业务信息:'+r.processName;
-      this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
-      this.lcModa.processData = r;
-      this.lcModa.isNew = false;
-      this.lcModa.visible = true;
+      this.getAction('/ctop/actCustomForm/queryById', { id: r.tableId }).then((res) => {
+        if (res.success) {
+          this.jsonData = JSON.parse(res.result.text)
+          if (this.jsonData) {
+            this.$nextTick(() => {
+              this.defaultValue = JSON.parse(r.tableName)
+              this.$refs.kfb.setData(this.defaultValue)
+            })
+          }
+        } else {
+          this.jsonData = {}
+          this.$message.warning('该流程信息未配置表单,请联系开发人员!')
+          return
+        }
+      })
+      this.lcModa.disabled = true
+      this.lcModa.title = '查看流程业务信息:' + r.processName
+      this.lcModa.formComponent = this.getFormComponent(r.routeName).component
+      this.lcModa.processData = r
+      this.lcModa.isNew = false
+      this.lcModa.visible = true
     },
     history(v) {
       if (!v.procInstId) {
-        this.$message.error("流程实例ID不存在");
-        return;
+        this.$message.error('流程实例ID不存在')
+        return
       }
-      this.procInstId = v.procInstId;
-      this.modalLsVisible = true;
+      this.procInstId = v.procInstId
+      this.modalLsVisible = true
     },
     remove(v) {
-      this.postFormAction(this.url.deleteHistoricTask+v.id).then(res => {
+      this.postFormAction(this.url.deleteHistoricTask + v.id).then((res) => {
         if (res.success) {
-          this.$message.success("操作成功");
-          this.getDataList();
-        }else {
-          this.$message.error(res.message);
+          this.$message.success('操作成功')
+          this.getDataList()
+        } else {
+          this.$message.error(res.message)
         }
-      });
+      })
     },
     handleTableChange(pagination, filters, sorter) {
       //分页、排序、筛选变化时触发
       //TODO 筛选
       if (Object.keys(sorter).length > 0) {
-        this.isorter.column = sorter.field;
-        this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
+        this.isorter.column = sorter.field
+        this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc'
       }
-      this.ipagination = pagination;
+      this.ipagination = pagination
       // this.loadData();
     },
   },
-  watch: {
-  }
-};
+  watch: {},
+}
 </script>

+ 169 - 133
src/views/activiti/processFinishManage.vue

@@ -1,6 +1,5 @@
 <style lang="less">
-  @import '~@assets/less/common.less';
-
+@import '~@assets/less/common.less';
 </style>
 <template>
   <div class="search">
@@ -10,22 +9,12 @@
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-item label="流程名称" prop="name">
-                <a-input
-                  type="text"
-                  v-model="searchForm.name"
-                  placeholder="请输入"
-                  clearable
-                />
+                <a-input type="text" v-model="searchForm.name" placeholder="请输入" clearable />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="8">
               <a-form-item label="标识Key" prop="name">
-                <a-input
-                  type="text"
-                  v-model="searchForm.key"
-                  placeholder="请输入"
-                  clearable
-                />
+                <a-input type="text" v-model="searchForm.key" placeholder="请输入" clearable />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="8">
@@ -39,16 +28,18 @@
               </a-form-item>
             </a-col>
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-            <a-col :md="6" :sm="12" >
-              <a-button @click="handleSearch" type="primary" icon="search">搜索</a-button>
-              <a-button @click="handleReset" style="margin-left: 10px;">重置</a-button>
-            </a-col>
-          </span>
+              <a-col :md="6" :sm="12">
+                <a-button @click="handleSearch" type="primary" icon="search">搜索</a-button>
+                <a-button @click="handleReset" style="margin-left: 10px;">重置</a-button>
+              </a-col>
+            </span>
           </a-row>
         </a-form>
       </div>
       <a-row>
-        <a-table :scroll="{x:1680,y:innerHeight/2}" bordered
+        <a-table
+          :scroll="{x:1680}"
+          bordered
           :loading="loading"
           rowKey="id"
           :dataSource="data"
@@ -56,74 +47,88 @@
           @change="handleTableChange"
           ref="table"
         >
-          <a-table-column title="#"  :width="50" fixed="left">
-            <template slot-scope="t,r,i" >
-              <span> {{i+1}} </span>
+          <a-table-column title="#" :width="50" fixed="left">
+            <template slot-scope="t,r,i">
+              <span>{{i+1}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="流程实例ID" dataIndex="id" :width="150" fixed="left">
-            <template slot-scope="t,r,i" >
-              <span> {{t}} </span>
+          <a-table-column title="流程实例ID" data-index="id" :width="150" fixed="left">
+            <template slot-scope="t,r,i">
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="流程名称" dataIndex="name" :width="150" fixed="left">
-            <template slot-scope="t,r,i" >
-              <span> {{t}} </span>
+          <a-table-column title="流程名称" data-index="name" :width="150" fixed="left">
+            <template slot-scope="t,r,i">
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="申请人" dataIndex="applyer"  :ellipsis= "true" :width="150" fixed="left">
-            <template slot-scope="t,r,i" >
-              <span> {{t}} </span>
+          <a-table-column
+            title="申请人"
+            data-index="applyer"
+            :ellipsis="true"
+            :width="150"
+            fixed="left"
+          >
+            <template slot-scope="t,r,i">
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="标识Key" dataIndex="key" :width="150" >
-            <template slot-scope="t,r,i" >
-              <span> {{t}} </span>
+          <a-table-column title="标识Key" data-index="key" :width="150">
+            <template slot-scope="t,r,i">
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="版本" dataIndex="version" :width="80">
-            <template slot-scope="t,r,i" >
-              <span> v.{{t}} </span>
+          <a-table-column title="版本" data-index="version" :width="80">
+            <template slot-scope="t,r,i">
+              <span>v.{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="审批结果" dataIndex="result" :width="150"
-                          key="result" :sorter="(a,b)=>a.result - b.result"
+          <a-table-column
+            title="审批结果"
+            data-index="result"
+            :width="150"
+            key="result"
+            :sorter="(a,b)=>a.result - b.result"
           >
-            <template slot-scope="t,r,i" >
-              <span v-if="t==4" style="color: #999999"> 发起人撤回 </span>
-              <span v-else-if="t==5" style="color: orange"> 已删除 </span>
-              <span v-else-if="t==2" style="color: green"> 已通过 </span>
-              <span v-else-if="t==3" style="color: red"> 已驳回 </span>
-              <span v-else > 未知 </span>
+            <template slot-scope="t,r,i">
+              <span v-if="t==4" style="color: #999999">发起人撤回</span>
+              <span v-else-if="t==5" style="color: orange">已删除</span>
+              <span v-else-if="t==2" style="color: green">已通过</span>
+              <span v-else-if="t==3" style="color: red">已驳回</span>
+              <span v-else>未知</span>
             </template>
           </a-table-column>
-          <a-table-column title="原因详情" dataIndex="deleteReason" :width="150">
-            <template slot-scope="t,r,i" >
-             <j-ellipsis :value="t" :length="10"></j-ellipsis>
+          <a-table-column title="原因详情" data-index="deleteReason" :width="150">
+            <template slot-scope="t,r,i">
+              <j-ellipsis :value="t" :length="10"></j-ellipsis>
             </template>
           </a-table-column>
-          <a-table-column title="总耗时" dataIndex="duration" :width="100"
-                          key="duration" :sorter="(a,b)=>a.duration - b.duration"
+          <a-table-column
+            title="总耗时"
+            data-index="duration"
+            :width="100"
+            key="duration"
+            :sorter="(a,b)=>a.duration - b.duration"
           >
-            <template slot-scope="t,r,i" >
-              <span > {{millsToTime(t)}} </span>
+            <template slot-scope="t,r,i">
+              <span>{{millsToTime(t)}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="开始时间" dataIndex="startTime" :width="150">
-            <template slot-scope="t,r,i" >
-              <span > {{t}} </span>
+          <a-table-column title="开始时间" data-index="startTime" :width="150">
+            <template slot-scope="t,r,i">
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="结束时间" dataIndex="endTime" :width="150">
-            <template slot-scope="t,r,i" >
-              <span > {{t}} </span>
+          <a-table-column title="结束时间" data-index="endTime" :width="150">
+            <template slot-scope="t,r,i">
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="操作" dataIndex="" :width="250" fixed="right">
-            <template slot-scope="t,r,i" >
-              <a href="javascript:void(0);" style="color: green;" @click="history(r)" >审批历史</a>
+          <a-table-column title="操作" data-index :width="250" fixed="right">
+            <template slot-scope="t,r,i">
+              <a href="javascript:void(0);" style="color: green;" @click="history(r)">审批历史</a>
               <a-divider type="vertical" />
-              <a href="javascript:void(0);" style="color: blue;" @click="detail(r)" >表单数据</a>
+              <a href="javascript:void(0);" style="color: blue;" @click="detail(r)">表单数据</a>
               <a-divider type="vertical" />
               <a-popconfirm title="确定删除吗?" @confirm="() => remove(r)">
                 <a style="color: red;">删除</a>
@@ -134,37 +139,55 @@
       </a-row>
     </a-card>
     <!---->
-    <a-modal title="审批历史" v-model="modalLsVisible" :mask-closable="false" :width="'80%'" :footer="null">
+    <a-modal
+      title="审批历史"
+      v-model="modalLsVisible"
+      :mask-closable="false"
+      :width="'80%'"
+      :footer="null"
+    >
       <div v-if="modalLsVisible">
         <component :is="historicDetail" :procInstId="procInstId"></component>
       </div>
     </a-modal>
     <!--流程表单-->
-    <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"
-                 @close="lcModa.visible=false,lcModa.disabled = false"></component>
+    <a-modal
+      :title="lcModa.title"
+      v-model="lcModa.visible"
+      :footer="null"
+      :maskClosable="false"
+      width="80%"
+    >
+      <k-form-build
+        v-if="lcModa.visible"
+        :defaultValue="defaultValue"
+        :value="jsonData"
+        ref="kfb"
+        disabled
+      />
     </a-modal>
   </div>
 </template>
 
 <script>
-
-import {activitiMixin} from "./mixins/activitiMixin";
-import {JeecgListMixin} from "../../mixins/JeecgListMixin";
+import { activitiMixin } from './mixins/activitiMixin'
+import { JeecgListMixin } from '../../mixins/JeecgListMixin'
+import { deleteAction, getAction, downFile, postAction } from '@/api/manage'
 export default {
-  mixins:[JeecgListMixin,activitiMixin],
-  name: "process-finish-manage",
+  mixins: [JeecgListMixin, activitiMixin],
+  name: 'process-finish-manage',
   data() {
     return {
+      jsonData: {},
+      defaultValue: {},
       modalLsVisible: false,
       procInstId: '',
       lcModa: {
-        title:'',
-        disabled:false,
-        visible:false,
-        formComponent : null,
-        isNew : false
+        title: '',
+        disabled: false,
+        visible: false,
+        formComponent: null,
+        isNew: false,
       },
       openSearch: true,
       openTip: true,
@@ -174,99 +197,112 @@ export default {
       selectDate: null, // 选择日期绑定modal
       searchForm: {
         // 搜索框对应data对象
-        name: "",
-        key: "",
+        name: '',
+        key: '',
         pageNumber: 1, // 当前页数
-        pageSize: 10 // 页面大小
+        pageSize: 10, // 页面大小
       },
       data: [], // 表单数据
       total: 0, // 表单数据总数
-      deleteId: "",
+      deleteId: '',
       url: {
-        getFinishedProcess:'/actProcessIns/getFinishedProcess',
-        delHistoricIns:'/actProcessIns/delHistoricInsByIds/'
-      }
-    };
+        getFinishedProcess: '/actProcessIns/getFinishedProcess',
+        delHistoricIns: '/actProcessIns/delHistoricInsByIds/',
+      },
+    }
   },
   methods: {
-    loadData(){},
+    loadData() {},
     init() {
-      this.getDataList();
+      this.getDataList()
     },
     selectDateRange(v) {
-      this.searchForm.startDate = null;
-      this.searchForm.endDate = null;
+      this.searchForm.startDate = null
+      this.searchForm.endDate = null
       if (v[0]) {
-        this.searchForm.startDate = v[0].format("YYYY-MM-DD");
+        this.searchForm.startDate = v[0].format('YYYY-MM-DD')
       }
       if (v[1]) {
-        this.searchForm.endDate = v[1].format("YYYY-MM-DD");
+        this.searchForm.endDate = v[1].format('YYYY-MM-DD')
       }
     },
     getDataList() {
-      this.loading = true;
-      this.getAction(this.url.getFinishedProcess,this.searchForm).then(res => {
-        this.loading = false;
+      this.loading = true
+      this.getAction(this.url.getFinishedProcess, this.searchForm).then((res) => {
+        this.loading = false
         if (res.success) {
-          this.data = res.result;
-        }else {
+          this.data = res.result
+        } else {
           this.$message.error(res.message)
         }
-      });
+      })
     },
     handleSearch() {
-      this.searchForm.pageNumber = 1;
-      this.searchForm.pageSize = 10;
-      this.getDataList();
+      this.searchForm.pageNumber = 1
+      this.searchForm.pageSize = 10
+      this.getDataList()
     },
     handleReset() {
-      this.selectDate = null;
-      this.searchForm={};
-      this.searchForm.pageNumber = 1;
-      this.searchForm.pageSize = 10;
+      this.selectDate = null
+      this.searchForm = {}
+      this.searchForm.pageNumber = 1
+      this.searchForm.pageSize = 10
       // 重新加载数据
-      this.getDataList();
+      this.getDataList()
     },
     handelCancel() {
-      this.modalVisible = false;
+      this.modalVisible = false
     },
     detail(r) {
-      if (!r.routeName) {
-        this.$message.warning(
-          "该流程信息未配置表单,请联系开发人员!"
-        );
-        return;
-      }
-      this.lcModa.disabled = true;
-      this.lcModa.title = '查看流程业务信息:'+r.name;
-      this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
-      this.lcModa.processData = r;
-      this.lcModa.isNew = false;
-      this.lcModa.visible = true;
+      // if (!r.routeName) {
+      //   this.$message.warning('该流程信息未配置表单,请联系开发人员!')
+      //   return
+      // }
+
+      getAction('/ctop/actCustomForm/queryById', { id: r.tableId }).then((res) => {
+        if (res.success) {
+          this.jsonData = JSON.parse(res.result.text)
+          if (this.jsonData) {
+            this.$nextTick(() => {
+              this.defaultValue = JSON.parse(r.tableName)
+              this.$refs.kfb.setData(this.defaultValue)
+            })
+          }
+        } else {
+          this.jsonData = {}
+          this.$message.warning('该流程信息未配置表单,请联系开发人员!')
+          return
+        }
+      })
+      this.lcModa.disabled = true
+      this.lcModa.title = '查看流程业务信息:' + r.name
+      this.lcModa.formComponent = this.getFormComponent(r.routeName).component
+      this.lcModa.processData = r
+      this.lcModa.isNew = false
+      this.lcModa.visible = true
     },
     history(v) {
       if (!v.id) {
-        this.$message.error("流程实例ID不存在");
-        return;
+        this.$message.error('流程实例ID不存在')
+        return
       }
-      this.procInstId = v.id;
-      this.modalLsVisible = true;
+      this.procInstId = v.id
+      this.modalLsVisible = true
     },
     remove(v) {
-      this.postFormAction(this.url.delHistoricIns+v.id).then(res => {
+      this.postFormAction(this.url.delHistoricIns + v.id).then((res) => {
         if (res.success) {
-          this.$message.success("操作成功");
-          this.getDataList();
-        }else {
-          this.$message.error(res.message);
+          this.$message.success('操作成功')
+          this.getDataList()
+        } else {
+          this.$message.error(res.message)
         }
-      });
+      })
     },
   },
   mounted() {
-    this.init();
+    this.init()
   },
-  watch: {
-  }
-};
+  watch: {},
+}
 </script>

+ 164 - 142
src/views/activiti/processInsManage.vue

@@ -1,5 +1,5 @@
 <style lang="less">
-  @import '~@assets/less/common.less';
+@import '~@assets/less/common.less';
 </style>
 <template>
   <div class="search">
@@ -9,35 +9,27 @@
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-item label="流程名称" prop="name">
-                <a-input
-                  type="text"
-                  v-model="searchForm.name"
-                  placeholder="请输入"
-                  clearable
-                />
+                <a-input type="text" v-model="searchForm.name" placeholder="请输入" clearable />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="8">
               <a-form-item label="标识Key" prop="name">
-                <a-input
-                  type="text"
-                  v-model="searchForm.key"
-                  placeholder="请输入"
-                  clearable
-                />
+                <a-input type="text" v-model="searchForm.key" placeholder="请输入" clearable />
               </a-form-item>
             </a-col>
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-            <a-col :md="6" :sm="12" >
-              <a-button @click="handleSearch" type="primary" icon="search">搜索</a-button>
-              <a-button @click="handleReset" style="margin-left: 10px;">重置</a-button>
-            </a-col>
-          </span>
+              <a-col :md="6" :sm="12">
+                <a-button @click="handleSearch" type="primary" icon="search">搜索</a-button>
+                <a-button @click="handleReset" style="margin-left: 10px;">重置</a-button>
+              </a-col>
+            </span>
           </a-row>
         </a-form>
       </div>
       <a-row>
-        <a-table :scroll="scroll" bordered
+        <a-table
+          :scroll="scroll"
+          bordered
           :loading="loading"
           rowKey="id"
           :dataSource="data"
@@ -45,62 +37,66 @@
           @change="handleTableChange"
           ref="table"
         >
-          <a-table-column title="#"  :width="50">
-            <template slot-scope="t,r,i" >
-              <span> {{i+1}} </span>
+          <a-table-column title="#" :width="50">
+            <template slot-scope="t,r,i">
+              <span>{{i+1}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="流程实例ID" dataIndex="id" :width="150">
-            <template slot-scope="t,r,i" >
-              <span> {{t}} </span>
+          <a-table-column title="流程实例ID" data-index="id" :width="150">
+            <template slot-scope="t,r,i">
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="流程名称" dataIndex="name" :width="150">
-            <template slot-scope="t,r,i" >
-              <span> {{t}} </span>
+          <a-table-column title="流程名称" data-index="name" :width="150">
+            <template slot-scope="t,r,i">
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="申请人" dataIndex="applyer" :width="100">
-            <template slot-scope="t,r,i" >
-              <span> {{t}} </span>
+          <a-table-column title="申请人" data-index="applyer" :width="100">
+            <template slot-scope="t,r,i">
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="标识Key" dataIndex="key" :width="150">
-            <template slot-scope="t,r,i" >
-              <span> {{t}} </span>
+          <a-table-column title="标识Key" data-index="key" :width="150">
+            <template slot-scope="t,r,i">
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="版本" dataIndex="version" :width="150">
-            <template slot-scope="t,r,i" >
-              <span> v.{{t}} </span>
+          <a-table-column title="版本" data-index="version" :width="150">
+            <template slot-scope="t,r,i">
+              <span>v.{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="当前环节" dataIndex="currTaskName" :width="150">
-            <template slot-scope="t,r,i" >
-              <span> {{t}} </span>
+          <a-table-column title="当前环节" data-index="currTaskName" :width="150">
+            <template slot-scope="t,r,i">
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="状态" dataIndex="isSuspended" :width="110"
-                    key="isSuspended" :sorter="(a,b)=>Boolean(a.isSuspended)?0:1 - Boolean(b.isSuspended)?0:1"
+          <a-table-column
+            title="状态"
+            data-index="isSuspended"
+            :width="110"
+            key="isSuspended"
+            :sorter="(a,b)=>Boolean(a.isSuspended)?0:1 - Boolean(b.isSuspended)?0:1"
           >
-            <template slot-scope="t,r,i" >
-              <span v-if="t" style="color: red"> 已挂起 </span>
-              <span v-else style="color: #2f54eb"> 已激活 </span>
+            <template slot-scope="t,r,i">
+              <span v-if="t" style="color: red">已挂起</span>
+              <span v-else style="color: #2f54eb">已激活</span>
             </template>
           </a-table-column>
-          <a-table-column title="操作" dataIndex="action"  >
-            <template slot-scope="t,r,i" >
+          <a-table-column title="操作" data-index="action">
+            <template slot-scope="t,r,i">
               <template v-if="r.isSuspended">
-                <a href="javascript:void(0);" style="color: green;" @click="editStatus(1,r)" >激活</a>
+                <a href="javascript:void(0);" style="color: green;" @click="editStatus(1,r)">激活</a>
                 <a-divider type="vertical" />
               </template>
               <template v-else>
-                <a href="javascript:void(0);" style="color: orange;" @click="editStatus(0,r)" >挂起</a>
+                <a href="javascript:void(0);" style="color: orange;" @click="editStatus(0,r)">挂起</a>
                 <a-divider type="vertical" />
               </template>
-              <a href="javascript:void(0);" style="color: blue;" @click="history(r)" >审批详情</a>
+              <a href="javascript:void(0);" style="color: blue;" @click="history(r)">审批详情</a>
               <a-divider type="vertical" />
-              <a href="javascript:void(0);" style="color: #999;" @click="detail(r)" >表单数据</a>
+              <a href="javascript:void(0);" style="color: #999;" @click="detail(r)">表单数据</a>
               <a-divider type="vertical" />
               <a-popconfirm title="确定删除吗?" @confirm="() => remove(r)">
                 <a style="color: red;">删除</a>
@@ -129,28 +125,46 @@
       </div>
     </a-modal>
     <!---->
-    <a-modal title="审批历史" v-model="modalLsVisible" :mask-closable="false" :width="'80%'" :footer="null">
+    <a-modal
+      title="审批历史"
+      v-model="modalLsVisible"
+      :mask-closable="false"
+      :width="'80%'"
+      :footer="null"
+    >
       <div v-if="modalLsVisible">
         <component :is="historicDetail" :procInstId="procInstId"></component>
       </div>
     </a-modal>
     <!--流程表单-->
-    <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"
-                 @close="lcModa.visible=false,lcModa.disabled = false"></component>
+    <a-modal
+      :title="lcModa.title"
+      v-model="lcModa.visible"
+      :footer="null"
+      :maskClosable="false"
+      width="80%"
+    >
+      <k-form-build
+        v-if="lcModa.visible"
+        :defaultValue="defaultValue"
+        :value="jsonData"
+        ref="kfb"
+        disabled
+      />
     </a-modal>
   </div>
 </template>
 
 <script>
-import {activitiMixin} from "./mixins/activitiMixin";
-import {JeecgListMixin} from "../../mixins/JeecgListMixin";
+import { activitiMixin } from './mixins/activitiMixin'
+import { JeecgListMixin } from '../../mixins/JeecgListMixin'
 export default {
-  mixins:[activitiMixin,JeecgListMixin],
-  name: "process-ins-manage",
+  mixins: [activitiMixin, JeecgListMixin],
+  name: 'process-ins-manage',
   data() {
     return {
+      jsonData: {},
+      defaultValue: {},
       openSearch: true,
       openTip: true,
       loading: true, // 表单加载状态
@@ -158,17 +172,17 @@ export default {
       selectList: [], // 多选数据
       searchForm: {
         // 搜索框对应data对象
-        name: "",
-        key: "",
+        name: '',
+        key: '',
         pageNumber: 1, // 当前页数
-        pageSize: 10 // 页面大小
+        pageSize: 10, // 页面大小
       },
       modalType: 0, // 添加或编辑标识
       modalVisible: false, // 添加或编辑显示
-      modalTitle: "", // 添加或编辑标题
+      modalTitle: '', // 添加或编辑标题
       form: {
         // 添加或编辑表单对象初始化数据
-        reason: ""
+        reason: '',
       },
       formValidate: {
         // 表单验证规则
@@ -176,138 +190,146 @@ export default {
       submitLoading: false, // 添加或编辑提交状态
       data: [], // 表单数据
       total: 0, // 表单数据总数
-      deleteId: "",
+      deleteId: '',
       url: {
-        getRunningProcess:'/actProcessIns/getRunningProcess',
-        deleteProcessIns:'/actProcessIns/delInsByIds/',
-        updateInsStatus:'/actProcessIns/updateInsStatus/',
+        getRunningProcess: '/actProcessIns/getRunningProcess',
+        deleteProcessIns: '/actProcessIns/delInsByIds/',
+        updateInsStatus: '/actProcessIns/updateInsStatus/',
       },
       modalLsVisible: false,
       procInstId: '',
       lcModa: {
-        title:'',
-        disabled:false,
-        visible:false,
-        formComponent : null,
-        isNew : false
+        title: '',
+        disabled: false,
+        visible: false,
+        formComponent: null,
+        isNew: false,
       },
-    };
+    }
   },
   methods: {
-    loadData(){},
+    loadData() {},
     init() {
-      this.getDataList();
+      this.getDataList()
     },
     getDataList() {
-      this.loading = true;
-      this.getAction(this.url.getRunningProcess,this.searchForm).then(res => {
-        this.loading = false;
+      this.loading = true
+      this.getAction(this.url.getRunningProcess, this.searchForm).then((res) => {
+        this.loading = false
         if (res.success) {
-          this.data = res.result;
-        }else {
+          this.data = res.result
+        } else {
           this.$message.error(res.message)
         }
-      });
+      })
     },
     handleSearch() {
-      this.searchForm.pageNumber = 1;
-      this.searchForm.pageSize = 10;
-      this.getDataList();
+      this.searchForm.pageNumber = 1
+      this.searchForm.pageSize = 10
+      this.getDataList()
     },
     handleReset() {
-      this.searchForm= {};
-      this.searchForm.pageNumber = 1;
-      this.searchForm.pageSize = 10;
+      this.searchForm = {}
+      this.searchForm.pageNumber = 1
+      this.searchForm.pageSize = 10
       // 重新加载数据
-      this.getDataList();
+      this.getDataList()
     },
     handelCancel() {
-      this.modalVisible = false;
+      this.modalVisible = false
     },
     handelSubmit() {
-      this.submitLoading = true;
-      this.postFormAction(this.url.deleteProcessIns+this.deleteId, this.form).then(res => {
-        this.submitLoading = false;
+      this.submitLoading = true
+      this.postFormAction(this.url.deleteProcessIns + this.deleteId, this.form).then((res) => {
+        this.submitLoading = false
         if (res.success) {
-          this.$message.success("操作成功");
-          this.modalVisible = false;
-          this.getDataList();
-        }else {
-          this.$message.error(res.message);
+          this.$message.success('操作成功')
+          this.modalVisible = false
+          this.getDataList()
+        } else {
+          this.$message.error(res.message)
         }
-      });
+      })
     },
     editStatus(status, v) {
-      let operation = "";
+      let operation = ''
       if (status == 0) {
-        operation = "暂停挂起";
+        operation = '暂停挂起'
       } else {
-        operation = "激活运行";
+        operation = '激活运行'
       }
       this.$confirm({
-        title: "确认" + operation,
+        title: '确认' + operation,
         content: `您确认要${operation}流程实例${v.name}?`,
         loading: true,
         onOk: () => {
           let params = {
             status: status,
-            id: v.id
-          };
-          this.postFormAction(this.url.updateInsStatus,params).then(res => {
+            id: v.id,
+          }
+          this.postFormAction(this.url.updateInsStatus, params).then((res) => {
             if (res.success) {
-              this.$message.success("操作成功");
-              this.getDataList();
-            }else {
-              this.$message.error(res.message);
+              this.$message.success('操作成功')
+              this.getDataList()
+            } else {
+              this.$message.error(res.message)
             }
-          });
-        }
-      });
+          })
+        },
+      })
     },
     detail(r) {
-      if (!r.routeName) {
-        this.$message.warning(
-          "该流程信息未配置表单,请联系开发人员!"
-        );
-        return;
-      }
-      this.lcModa.disabled = true;
-      this.lcModa.title = '查看流程业务信息:'+r.name;
-      this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
-      this.lcModa.processData = r;
-      this.lcModa.isNew = false;
-      this.lcModa.visible = true;
+      this.getAction('/ctop/actCustomForm/queryById', { id: r.tableId }).then((res) => {
+        if (res.success) {
+          this.jsonData = JSON.parse(res.result.text)
+          if (this.jsonData) {
+            this.$nextTick(() => {
+              this.defaultValue = JSON.parse(r.tableName)
+              this.$refs.kfb.setData(this.defaultValue)
+            })
+          }
+        } else {
+          this.jsonData = {}
+          this.$message.warning('该流程信息未配置表单,请联系开发人员!')
+          return
+        }
+      })
+      this.lcModa.disabled = true
+      this.lcModa.title = '查看流程业务信息:' + r.name
+      this.lcModa.formComponent = this.getFormComponent(r.routeName).component
+      this.lcModa.processData = r
+      this.lcModa.isNew = false
+      this.lcModa.visible = true
     },
     history(v) {
       if (!v.procInstId) {
-        this.$message.error("流程实例ID不存在");
-        return;
+        this.$message.error('流程实例ID不存在')
+        return
       }
-      this.procInstId = v.procInstId;
-      this.modalLsVisible = true;
+      this.procInstId = v.procInstId
+      this.modalLsVisible = true
     },
     remove(v) {
-      this.modalTitle = `确认删除流程 ${v.name}`;
+      this.modalTitle = `确认删除流程 ${v.name}`
       // 单个删除
-      this.deleteId = v.id;
-      this.modalType = 0;
-      this.modalVisible = true;
+      this.deleteId = v.id
+      this.modalType = 0
+      this.modalVisible = true
     },
     handleTableChange(pagination, filters, sorter) {
       //分页、排序、筛选变化时触发
       //TODO 筛选
       if (Object.keys(sorter).length > 0) {
-        this.isorter.column = sorter.field;
-        this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
+        this.isorter.column = sorter.field
+        this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc'
       }
-      this.ipagination = pagination;
+      this.ipagination = pagination
       // this.loadData();
-    }
+    },
   },
   mounted() {
-    this.init();
+    this.init()
   },
-  watch: {
-  }
-};
+  watch: {},
+}
 </script>

+ 326 - 276
src/views/activiti/todoManage.vue

@@ -1,28 +1,28 @@
 <style lang="less">
-  @import '~@assets/less/common.less';
+@import '~@assets/less/common.less';
 </style>
 <template>
   <div class="search">
-
     <a-card>
       <div class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="handleSearch">
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
-              <a-form-item label="任务名称" prop="name" >
-                <a-input
-                  type="text" allowClear
-                  v-model="searchForm.name"
-                  placeholder="请输入"
-                />
+              <a-form-item label="任务名称" prop="name">
+                <a-input type="text" allowClear v-model="searchForm.name" placeholder="请输入" />
               </a-form-item>
             </a-col>
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-            <a-col :md="6" :sm="12" >
-                <a-button type="primary"  style="left: 10px" @click="handleSearch" icon="search">查询</a-button>
-                <a-button type="primary"  @click="handleReset" icon="reload" style="margin-left: 8px;left: 10px">重置</a-button>
-            </a-col>
-          </span>
+              <a-col :md="6" :sm="12">
+                <a-button type="primary" style="left: 10px" @click="handleSearch" icon="search">查询</a-button>
+                <a-button
+                  type="primary"
+                  @click="handleReset"
+                  icon="reload"
+                  style="margin-left: 8px;left: 10px"
+                >重置</a-button>
+              </a-col>
+            </span>
           </a-row>
         </a-form>
       </div>
@@ -32,68 +32,86 @@
         <a-button @click="getDataList" icon="md-refresh">刷新</a-button>
       </a-row>-->
       <a-row>
-        <a-table :scroll="scroll" bordered
-          :loading="loading" rowKey="id"
+        <a-table
+          bordered
+          :loading="loading"
+          rowKey="id"
           :dataSource="data"
-          :pagination="ipagination" @change="handleTableChange"
+          :pagination="ipagination"
+          @change="handleTableChange"
           ref="table"
         >
-          <a-table-column title="#"  :width="50">
-            <template slot-scope="t,r,i" >
-              <span> {{i+1}} </span>
+          <a-table-column title="#" :width="50">
+            <template slot-scope="t,r,i">
+              <span>{{i+1}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="任务名称" dataIndex="name"  :width="150" align="center">
+          <a-table-column title="任务名称" data-index="name" :width="150" align="center">
             <template slot-scope="t">
-              <span> {{t}} </span>
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="所属流程" dataIndex="processName"  :width="150" align="center">
+          <a-table-column title="所属流程" data-index="processName" :width="150" align="center">
             <template slot-scope="t">
-              <span> {{t}} </span>
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="委托代办人" dataIndex="owner"  align="center" :width="150">
+          <a-table-column title="委托代办人" data-index="owner" align="center" :width="150">
             <template slot-scope="t">
-              <span> {{t}} </span>
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="流程发起人" dataIndex="applyer" :width="150" align="center">
+          <a-table-column title="流程发起人" data-index="applyer" :width="150" align="center">
             <template slot-scope="t">
-              <span> {{t}} </span>
+              <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="优先级" dataIndex="priority" :width="110" align="center"
-            key="so" :sorter="(a,b)=>a.priority - b.priority"
+          <a-table-column
+            title="优先级"
+            data-index="priority"
+            :width="110"
+            align="center"
+            key="so"
+            :sorter="(a,b)=>a.priority - b.priority"
           >
             <template slot-scope="t">
-              <span v-if="t==0" style="color: green;"> 普通 </span>
-              <span v-else-if="t==1" style="color: orange;"> 重要 </span>
-              <span v-else-if="t==2" style="color: red;"> 紧急 </span>
-              <span v-else style="color: #999;">  </span>
+              <span v-if="t==0" style="color: green;">普通</span>
+              <span v-else-if="t==1" style="color: orange;">重要</span>
+              <span v-else-if="t==2" style="color: red;">紧急</span>
+              <span v-else style="color: #999;">无</span>
             </template>
           </a-table-column>
-          <a-table-column title="状态" dataIndex="isSuspended" :width="100" align="center"
-                          key="z" :sorter="(a,b)=>Boolean(a.isSuspended)?0:1 - Boolean(b.isSuspended)?0:1"
+          <a-table-column
+            title="状态"
+            data-index="isSuspended"
+            :width="100"
+            align="center"
+            key="z"
+            :sorter="(a,b)=>Boolean(a.isSuspended)?0:1 - Boolean(b.isSuspended)?0:1"
           >
             <template slot-scope="t">
-              <span v-if="!Boolean(t)" style="color: green;"> 已激活 </span>
-              <span v-if="Boolean(t)" style="color: orange;"> 已挂起 </span>
+              <span v-if="!Boolean(t)" style="color: green;">已激活</span>
+              <span v-if="Boolean(t)" style="color: orange;">已挂起</span>
             </template>
           </a-table-column>
-          <a-table-column title="创建时间" dataIndex="createTime" :width="200" align="center">
+          <a-table-column title="创建时间" data-index="createTime" :width="200" align="center">
             <template slot-scope="t">
               <span>{{t}}</span>
             </template>
           </a-table-column>
-          <a-table-column title="操作" dataIndex=""  align="center">
+          <a-table-column title="操作" data-index align="center">
             <template slot-scope="t,r,i">
               <a href="javascript:void(0);" @click="detail(r)" style="color: blue">申请详情</a>
               <a-divider type="vertical" />
-              <span v-if="Boolean(r.isSuspended)" style="cursor: no-drop;color: #999999;" title="流程已被挂起,无法操作!">
-                通过 <a-divider type="vertical" />
-                驳回 <a-divider type="vertical" />
-                委托 <a-divider type="vertical" />
+              <span
+                v-if="Boolean(r.isSuspended)"
+                style="cursor: no-drop;color: #999999;"
+                title="流程已被挂起,无法操作!"
+              >
+                通过
+                <a-divider type="vertical" />驳回
+                <a-divider type="vertical" />委托
+                <a-divider type="vertical" />
               </span>
               <span v-else>
                 <a href="javascript:void(0);" @click="passTask(r)" style="color: green">通过</a>
@@ -110,21 +128,36 @@
       </a-row>
     </a-card>
     <!---->
-    <a-modal title="审批历史" v-model="modalLsVisible" :mask-closable="false" :width="'80%'" :footer="null">
+    <a-modal
+      title="审批历史"
+      v-model="modalLsVisible"
+      :mask-closable="false"
+      :width="'80%'"
+      :footer="null"
+    >
       <div v-if="modalLsVisible">
         <component :is="historicDetail" :procInstId="procInstId"></component>
       </div>
     </a-modal>
     <!--流程表单-->
-    <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"
-                 @close="lcModa.visible=false,lcModa.disabled = false"></component>
+    <a-modal
+      :title="lcModa.title"
+      v-model="lcModa.visible"
+      :footer="null"
+      :maskClosable="false"
+      width="80%"
+    >
+      <k-form-build
+        v-if="lcModa.visible"
+        :defaultValue="defaultValue"
+        :value="jsonData"
+        ref="kfb"
+        disabled
+      />
     </a-modal>
     <!-- 审批操作 -->
     <a-modal :title="modalTaskTitle" v-model="modalTaskVisible" :mask-closable="false" :width="500">
-
-      <div  v-if="modalTaskVisible">
+      <div v-if="modalTaskVisible">
         <a-form ref="form" :model="form" :label-width="85" :rules="formValidate">
           <a-form-item label="审批意见" prop="reason">
             <a-input type="textarea" v-model="form.comment" :rows="4" />
@@ -137,7 +170,11 @@
               mode="multiple"
               :loading="userLoading"
             >
-              <a-select-option v-for="(item, i) in assigneeList" :key="i" :value="item.id">{{item.username}}</a-select-option>
+              <a-select-option
+                v-for="(item, i) in assigneeList"
+                :key="i"
+                :value="item.id"
+              >{{item.username}}</a-select-option>
             </a-select>
           </a-form-item>
           <a-form-item label="下一审批人" v-show="isGateway">
@@ -145,15 +182,20 @@
           </a-form-item>
           <div v-show="form.type==1">
             <a-form-item label="驳回至">
-              <a-select
-                v-model="form.backTaskKey"
-                :loading="backLoading"
-                @change="changeBackTask"
-              >
-                <a-select-option v-for="(item, i) in backList" :key="i" :value="item.key">{{item.name}}</a-select-option>
+              <a-select v-model="form.backTaskKey" :loading="backLoading" @change="changeBackTask">
+                <a-select-option
+                  v-for="(item, i) in backList"
+                  :key="i"
+                  :value="item.key"
+                >{{item.name}}</a-select-option>
               </a-select>
             </a-form-item>
-            <a-form-item label="指定原节点审批人" prop="assignees" v-show="form.backTaskKey!=-1" :error="error">
+            <a-form-item
+              label="指定原节点审批人"
+              prop="assignees"
+              v-show="form.backTaskKey!=-1"
+              :error="error"
+            >
               <a-select
                 v-model="form.assignees"
                 placeholder="请选择"
@@ -161,7 +203,11 @@
                 mode="multiple"
                 :loading="userLoading"
               >
-                <a-select-option v-for="(item, i) in assigneeList" :key="i" :value="item.id">{{item.username}}</a-select-option>
+                <a-select-option
+                  v-for="(item, i) in assigneeList"
+                  :key="i"
+                  :value="item.id"
+                >{{item.username}}</a-select-option>
               </a-select>
             </a-form-item>
           </div>
@@ -188,11 +234,13 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
 import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
 export default {
-  name: "todo-manage",
-  mixins:[activitiMixin,JeecgListMixin],
-  components:{JSelectUserByDep},
+  name: 'todo-manage',
+  mixins: [activitiMixin, JeecgListMixin],
+  components: { JSelectUserByDep },
   data() {
     return {
+      jsonData: {},
+      defaultValue: {},
       openSearch: true,
       openTip: true,
       loading: true, // 表单加载状态
@@ -204,29 +252,29 @@ export default {
       assigneeList: [],
       backList: [
         {
-          key: "-1",
-          name: "发起人"
-        }
+          key: '-1',
+          name: '发起人',
+        },
       ],
-      error: "",
+      error: '',
       showAssign: false,
       searchForm: {
         // 搜索框对应data对象
-        name: "",
+        name: '',
       },
-      modalTaskTitle: "",
-      modalTitle: "", // 添加或编辑标题
+      modalTaskTitle: '',
+      modalTitle: '', // 添加或编辑标题
       form: {
-        id: "",
-        userId: "",
-        procInstId: "",
-        comment: "",
+        id: '',
+        userId: '',
+        procInstId: '',
+        comment: '',
         type: 0,
         assignees: [],
-        backTaskKey: "-1",
+        backTaskKey: '-1',
         sendMessage: true,
         sendSms: false,
-        sendEmail: false
+        sendEmail: false,
       },
       formValidate: {
         // 表单验证规则
@@ -237,317 +285,319 @@ export default {
       dictPriority: [],
       isGateway: false,
       lcModa: {
-        title:'',
-        disabled:false,
-        visible:false,
-        formComponent : null,
-        isNew : false
+        title: '',
+        disabled: false,
+        visible: false,
+        formComponent: null,
+        isNew: false,
       },
-      url:{
-        todoList:'/actTask/todoList',
-        pass:'/actTask/pass',
-        back:'/actTask/back',
-        backToTask:'/actTask/backToTask',
-        delegate:'/actTask/delegate',
-        getNextNode:'/activiti_process/getNextNode',
-        getNode:'/activiti_process/getNode/',
-        getBackList:'/actTask/getBackList/',
-        passAll:'/actTask/passAll/',
-        backAll:'/actTask/backAll/',
+      url: {
+        todoList: '/actTask/todoList',
+        pass: '/actTask/pass',
+        back: '/actTask/back',
+        backToTask: '/actTask/backToTask',
+        delegate: '/actTask/delegate',
+        getNextNode: '/activiti_process/getNextNode',
+        getNode: '/activiti_process/getNode/',
+        getBackList: '/actTask/getBackList/',
+        passAll: '/actTask/passAll/',
+        backAll: '/actTask/backAll/',
       },
       /*历史*/
       modalLsVisible: false,
-      procInstId:''
-    };
+      procInstId: '',
+    }
   },
   mounted() {
-    this.init();
+    this.init()
   },
   methods: {
     init() {
-      this.getDataList();
+      this.getDataList()
     },
-    loadData(){},
+    loadData() {},
     getDataList() {
-      this.loading = true;
-      this.postFormAction(this.url.todoList,this.searchForm).then(res => {
-        this.loading = false;
+      this.loading = true
+      this.postFormAction(this.url.todoList, this.searchForm).then((res) => {
+        this.loading = false
         if (res.success) {
-          this.data = res.result||[];
-          this.total = this.data.leading;
+          this.data = res.result || []
+          this.total = this.data.leading
         }
-      });
+      })
     },
     handleTableChange(pagination, filters, sorter) {
       //分页、排序、筛选变化时触发
       if (Object.keys(sorter).length > 0) {
-        this.isorter.column = sorter.field;
-        this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
+        this.isorter.column = sorter.field
+        this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc'
       }
-      this.ipagination = pagination;
+      this.ipagination = pagination
       // this.loadData();
     },
     handleSearch() {
-      this.getDataList();
+      this.getDataList()
     },
     handleReset() {
-      this.searchForm={};
+      this.searchForm = {}
       // 重新加载数据
-      this.getDataList();
+      this.getDataList()
     },
     showSelect(e) {
-      this.selectList = e;
-      this.selectCount = e.length;
+      this.selectList = e
+      this.selectCount = e.length
     },
     clearSelectAll() {
-      this.$refs.table.selectAll(false);
+      this.$refs.table.selectAll(false)
     },
     handelSubmit() {
       // console.log("提交")
-      this.submitLoading = true;
-      var formData = Object.assign({},this.form);
-      formData.assignees = formData.assignees.join(",");
+      this.submitLoading = true
+      var formData = Object.assign({}, this.form)
+      formData.assignees = formData.assignees.join(',')
       if (formData.type == 0) {
         // 通过
         if (this.showAssign && formData.assignees.length < 1) {
-          this.$message.error("请至少选择一个审批人")
-          this.submitLoading = false;
-          return;
+          this.$message.error('请至少选择一个审批人')
+          this.submitLoading = false
+          return
         } else {
-          this.error = "";
+          this.error = ''
         }
-        this.postFormAction(this.url.pass,formData).then(res => {
-          this.submitLoading = false;
+        this.postFormAction(this.url.pass, formData).then((res) => {
+          this.submitLoading = false
           if (res.success) {
-            this.$message.success("操作成功");
-            this.modalTaskVisible = false;
-            this.getDataList();
+            this.$message.success('操作成功')
+            this.modalTaskVisible = false
+            this.getDataList()
           }
-        });
+        })
       } else if (formData.type == 1) {
         // 驳回
-        if (formData.backTaskKey == "-1") {
+        if (formData.backTaskKey == '-1') {
           // 驳回至发起人
-          this.postFormAction(this.url.back,formData).then(res => {
-            this.submitLoading = false;
+          this.postFormAction(this.url.back, formData).then((res) => {
+            this.submitLoading = false
             if (res.success) {
-              this.$message.success("操作成功");
-              this.modalTaskVisible = false;
-              this.getDataList();
+              this.$message.success('操作成功')
+              this.modalTaskVisible = false
+              this.getDataList()
             }
-          });
+          })
         } else {
           // 自定义驳回
-          if (formData.backTaskKey != "-1" && formData.assignees.length < 1) {
-            this.$message.error("请至少选择一个审批人")
-            this.submitLoading = false;
-            return;
+          if (formData.backTaskKey != '-1' && formData.assignees.length < 1) {
+            this.$message.error('请至少选择一个审批人')
+            this.submitLoading = false
+            return
           } else {
-            this.error = "";
+            this.error = ''
           }
-          this.postFormAction(this.url.backToTask,formData).then(res => {
-            this.submitLoading = false;
+          this.postFormAction(this.url.backToTask, formData).then((res) => {
+            this.submitLoading = false
             if (res.success) {
-              this.$message.success("操作成功");
-              this.modalTaskVisible = false;
-              this.getDataList();
+              this.$message.success('操作成功')
+              this.modalTaskVisible = false
+              this.getDataList()
             }
-          });
+          })
         }
       } else if (formData.type == 2) {
         // 委托
         if (!formData.userId) {
-          this.$message.error("请选择一委托人")
-          this.submitLoading = false;
-          return;
+          this.$message.error('请选择一委托人')
+          this.submitLoading = false
+          return
         } else {
-          this.error = "";
+          this.error = ''
         }
-        this.postFormAction(this.url.delegate,formData).then(res => {
-          this.submitLoading = false;
+        this.postFormAction(this.url.delegate, formData).then((res) => {
+          this.submitLoading = false
           if (res.success) {
-            this.$message.success("操作成功");
-            this.modalTaskVisible = false;
-            this.getDataList();
+            this.$message.success('操作成功')
+            this.modalTaskVisible = false
+            this.getDataList()
           }
-        });
+        })
       }
     },
     detail(r) {
-      if (!r.routeName) {
-        this.$message.warning(
-          "该流程信息未配置表单,请联系开发人员!"
-        );
-        return;
-      }
-      this.lcModa.disabled = true;
-      this.lcModa.title = '查看流程业务信息:'+r.processName;
-      this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
-      this.lcModa.processData = r;
-      this.lcModa.isNew = false;
-      this.lcModa.visible = true;
+      this.getAction('/ctop/actCustomForm/queryById', { id: r.tableId }).then((res) => {
+        if (res.success) {
+          this.jsonData = JSON.parse(res.result.text)
+          if (this.jsonData) {
+            this.$nextTick(() => {
+              this.defaultValue = JSON.parse(r.tableName)
+              this.$refs.kfb.setData(this.defaultValue)
+            })
+          }
+        } else {
+          this.jsonData = {}
+          this.$message.warning('该流程信息未配置表单,请联系开发人员!')
+          return
+        }
+      })
+      this.lcModa.disabled = true
+      this.lcModa.title = '查看流程业务信息:' + r.processName
+      this.lcModa.formComponent = this.getFormComponent(r.routeName).component
+      this.lcModa.processData = r
+      this.lcModa.isNew = false
+      this.lcModa.visible = true
     },
     passTask(v) {
-      this.modalTaskTitle = "审批通过";
-      this.form.id = v.id;
-      this.form.procInstId = v.procInstId;
-      this.form.priority = v.priority;
-      this.form.type = 0;
-      this.modalTaskVisible = true;
-      this.userLoading = true;
-      this.getAction(this.url.getNextNode,{procDefId:v.procDefId, currActId:v.key}).then(res => {
-        this.userLoading = false;
+      this.modalTaskTitle = '审批通过'
+      this.form.id = v.id
+      this.form.procInstId = v.procInstId
+      this.form.priority = v.priority
+      this.form.type = 0
+      this.modalTaskVisible = true
+      this.userLoading = true
+      this.getAction(this.url.getNextNode, { procDefId: v.procDefId, currActId: v.key }).then((res) => {
+        this.userLoading = false
         if (res.success) {
           if (res.result.type == 3 || res.result.type == 4) {
-            this.isGateway = true;
-            this.showAssign = false;
-            this.error = "";
-            return;
+            this.isGateway = true
+            this.showAssign = false
+            this.error = ''
+            return
           }
-          this.isGateway = false;
+          this.isGateway = false
           if (res.result.users && res.result.users.length > 0) {
-            this.error = "";
-            this.assigneeList = res.result.users;
+            this.error = ''
+            this.assigneeList = res.result.users
             // 默认勾选
-            let ids = [];
-            res.result.users.forEach(e => {
-              ids.push(e.username);
-            });
-            this.form.assignees = ids;
-            this.showAssign = true;
+            let ids = []
+            res.result.users.forEach((e) => {
+              ids.push(e.username)
+            })
+            this.form.assignees = ids
+            this.showAssign = true
           } else {
-            this.form.assignees = [];
-            this.showAssign = false;
+            this.form.assignees = []
+            this.showAssign = false
           }
         }
-      });
+      })
     },
     changeBackTask(v) {
-      if (v == "-1") {
-        return;
+      if (v == '-1') {
+        return
       }
-      this.userLoading = true;
-      this.getAction(this.url.getNode+v).then(res => {
-        this.userLoading = false;
+      this.userLoading = true
+      this.getAction(this.url.getNode + v).then((res) => {
+        this.userLoading = false
         if (res.success) {
           if (res.result.users && res.result.users.length > 0) {
-            this.assigneeList = res.result.users;
+            this.assigneeList = res.result.users
             // 默认勾选
-            let ids = [];
-            res.result.users.forEach(e => {
-              ids.push(e.username);
-            });
-            this.form.assignees = ids;
+            let ids = []
+            res.result.users.forEach((e) => {
+              ids.push(e.username)
+            })
+            this.form.assignees = ids
           }
         }
-      });
+      })
     },
     backTask(v) {
-      this.modalTaskTitle = "审批驳回";
-      this.form.id = v.id;
-      this.form.procInstId = v.procInstId;
-      this.form.procDefId = v.procDefId;
-      this.form.priority = v.priority;
-      this.form.type = 1;
-      this.showAssign = false;
-      this.modalTaskVisible = true;
+      this.modalTaskTitle = '审批驳回'
+      this.form.id = v.id
+      this.form.procInstId = v.procInstId
+      this.form.procDefId = v.procDefId
+      this.form.priority = v.priority
+      this.form.type = 1
+      this.showAssign = false
+      this.modalTaskVisible = true
       // 获取可驳回节点
       this.backList = [
         {
-          key: "-1",
-          name: "发起人"
-        }
-      ];
-      this.form.backTaskKey = "-1";
-      this.backLoading = true;
-      this.getAction(this.url.getBackList+v.procInstId).then(res => {
-        this.backLoading = false;
+          key: '-1',
+          name: '发起人',
+        },
+      ]
+      this.form.backTaskKey = '-1'
+      this.backLoading = true
+      this.getAction(this.url.getBackList + v.procInstId).then((res) => {
+        this.backLoading = false
         if (res.success) {
-          res.result.forEach(e => {
-            this.backList.push(e);
-          });
+          res.result.forEach((e) => {
+            this.backList.push(e)
+          })
         }
-      });
+      })
     },
     delegateTask(v) {
-      this.modalTaskTitle = "委托他人代办";
-      this.form.id = v.id;
-      this.form.procInstId = v.procInstId;
-      this.form.type = 2;
-      this.showAssign = false;
-      this.modalTaskVisible = true;
+      this.modalTaskTitle = '委托他人代办'
+      this.form.id = v.id
+      this.form.procInstId = v.procInstId
+      this.form.type = 2
+      this.showAssign = false
+      this.modalTaskVisible = true
     },
     history(v) {
       if (!v.procInstId) {
-        this.$message.error("流程实例ID不存在");
-        return;
+        this.$message.error('流程实例ID不存在')
+        return
       }
-      this.procInstId = v.procInstId;
-      this.modalLsVisible = true;
+      this.procInstId = v.procInstId
+      this.modalLsVisible = true
     },
     passAll() {
       if (this.selectCount <= 0) {
-        this.$message.warning("您还未选择要通过的数据");
-        return;
+        this.$message.warning('您还未选择要通过的数据')
+        return
       }
       // 批量通过
-      this.modalVisible = true;
+      this.modalVisible = true
       this.$confirm({
-        title: "确认通过",
-        content:
-          "您确认要通过所选的 " +
-          this.selectCount +
-          " 条数据? 注意:将默认分配给节点设定的所有可审批用户",
+        title: '确认通过',
+        content: '您确认要通过所选的 ' + this.selectCount + ' 条数据? 注意:将默认分配给节点设定的所有可审批用户',
         loading: true,
         onOk: () => {
-          let ids = "";
-          this.selectList.forEach(function(e) {
-            ids += e.id + ",";
-          });
-          ids = ids.substring(0, ids.length - 1);
-          this.postFormAction(this.url.passAll,{ids:ids}).then(res => {
+          let ids = ''
+          this.selectList.forEach(function (e) {
+            ids += e.id + ','
+          })
+          ids = ids.substring(0, ids.length - 1)
+          this.postFormAction(this.url.passAll, { ids: ids }).then((res) => {
             if (res.success) {
-              this.$message.success("操作成功");
-              this.modalVisible = false;
-              this.clearSelectAll();
-              this.getDataList();
+              this.$message.success('操作成功')
+              this.modalVisible = false
+              this.clearSelectAll()
+              this.getDataList()
             }
-          });
-        }
-      });
+          })
+        },
+      })
     },
     backAll() {
       if (this.selectCount <= 0) {
-        this.$message.warning("您还未选择要驳回的数据");
-        return;
+        this.$message.warning('您还未选择要驳回的数据')
+        return
       }
       // 批量驳回
-      this.modalVisible = true;
+      this.modalVisible = true
       this.$confirm({
-        title: "确认驳回",
-        content:
-          "您确认要驳回所选的 " +
-          this.selectCount +
-          " 条数据? 注意:所有流程将驳回至发起人",
+        title: '确认驳回',
+        content: '您确认要驳回所选的 ' + this.selectCount + ' 条数据? 注意:所有流程将驳回至发起人',
         loading: true,
         onOk: () => {
-          let procInstIds = "";
-          this.selectList.forEach(function(e) {
-            procInstIds += e.procInstId + ",";
-          });
-          procInstIds = procInstIds.substring(0, procInstIds.length - 1);
-          this.postFormAction(this.url.backAll,{procInstIds:procInstIds}).then(res => {
+          let procInstIds = ''
+          this.selectList.forEach(function (e) {
+            procInstIds += e.procInstId + ','
+          })
+          procInstIds = procInstIds.substring(0, procInstIds.length - 1)
+          this.postFormAction(this.url.backAll, { procInstIds: procInstIds }).then((res) => {
             if (res.success) {
-              this.$message.success("操作成功");
-              this.modalVisible = false;
-              this.clearSelectAll();
-              this.getDataList();
+              this.$message.success('操作成功')
+              this.modalVisible = false
+              this.clearSelectAll()
+              this.getDataList()
             }
-          });
-        }
-      });
-    }
+          })
+        },
+      })
+    },
   },
-
-};
+}
 </script>

+ 100 - 12
src/views/modules/advertiser/AdvertiserList.vue

@@ -4,21 +4,37 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline">
         <a-row :gutter="24">
-          <a-col :md="6" :sm="8">
+          <a-col :md="8" :sm="8">
             <a-form-item label="广告主开户主体名称">
-              <a-input placeholder="请输入广告主开户主体名称" v-model="queryParam.name"></a-input>
+              <!-- <a-input placeholder="请输入广告主开户主体名称" v-model="queryParam.name"></a-input> -->
+              <a-select
+                labelInValue
+                v-model="allIdUser"
+                placeholder="请选择广告主开户主体名称"
+                @keyup.enter.native="searchQueryOne"
+                @focus="getList"
+                showSearch
+                optionFilterProp="children"
+                :filterOption="filterOption"
+                @search="getList"
+              >
+                <a-select-option :value="item.id" v-for="(item, index) of list" :key="index">
+                  {{
+                  item.name
+                  }}
+                </a-select-option>
+              </a-select>
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="8">
+          <a-col :md="8" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchQueryOne" icon="search">查询</a-button>
               <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
             </span>
           </a-col>
         </a-row>
       </a-form>
     </div>
-
     <!-- 操作按钮区域 -->
     <!-- <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
@@ -34,6 +50,16 @@
           {{advertiserName}}
           <a-icon type="close" @click="clear('advertiserId')" />
         </a-tag>
+        <a-row :gutter="24" style="margin-bottom:20px">
+          <a-col :md="8" :sm="8">
+            <a-input placeholder="请输入产品名称" v-model="queryParam.productName"></a-input>
+          </a-col>
+          <a-col :md="8" :sm="8">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQueryOne" icon="search">查询</a-button>
+            </span>
+          </a-col>
+        </a-row>
       </a-tab-pane>
       <a-tab-pane key="project" tab="项目列表">
         <a-tag
@@ -44,6 +70,16 @@
           {{advertiserName?advertiserName+' / '+productName:productName}}
           <a-icon type="close" @click="clear('productId')" />
         </a-tag>
+        <a-row :gutter="24" style="margin-bottom:20px">
+          <a-col :md="8" :sm="8">
+            <a-input placeholder="请输入项目名称" v-model="queryParam.projectName"></a-input>
+          </a-col>
+          <a-col :md="8" :sm="8">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQueryOne" icon="search">查询</a-button>
+            </span>
+          </a-col>
+        </a-row>
       </a-tab-pane>
       <a-button type="primary" slot="tabBarExtraContent" @click="addNew">新增</a-button>
     </a-tabs>
@@ -112,7 +148,7 @@ import AFormItem from 'ant-design-vue/es/form/FormItem'
 import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
 import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
 import JSelectUser from '@/components/jeecgbiz/JSelectUser'
-import { postAction } from '../../../api/manage'
+import { postAction, getAction } from '../../../api/manage'
 import { mapActions, mapGetters } from 'vuex'
 
 const advertiserColumns = [
@@ -263,6 +299,8 @@ export default {
   },
   data() {
     return {
+      list: [],
+      allIdUser: {},
       departDisabled: false, //是否是我的部门调用该页面
       users: this.userInfo().realname, //用户名称
       departmentId: this.userInfo().departId, //部门id
@@ -317,8 +355,30 @@ export default {
   },
   created() {
     // this.queryParam.userId = this.userInfo().id
+    this.getList(null)
   },
   methods: {
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    getList(value) {
+      var params = {}
+      // params.userId = this.userInfo().id
+      params.pageSize = 50
+      params.pageNo = 1
+      params.name = value
+      console.log(params)
+      getAction('/ctop/advertiser/list', params)
+        .then((res) => {
+          if (res.success) {
+            console.log(res)
+            this.list = res.result.records
+          } else {
+            this.$message.warning(res.message)
+          }
+        })
+        .finally(() => {})
+    },
     handleEditElse(item, type) {
       if (type == 'product') {
         this.$refs.modalFormTwo.edit(item)
@@ -331,11 +391,13 @@ export default {
       }
     },
     clear(type) {
+      this.queryParam.name = null
       this.queryParam.advertiserId = null
-      this.advertiserName = ''
-
       this.queryParam.productId = null
-      this.productName = ''
+      this.queryParam.id = null
+      this.queryParam.productName = null
+      this.queryParam.projectName = null
+      this.allIdUser = {}
       this.loadData(1)
     },
     addNew() {
@@ -357,8 +419,8 @@ export default {
             ? this.queryParam.advertiserId
             : this.advertiserId
             ? this.advertiserId
-            : null,
-          productId: this.queryParam.productId,
+            : undefined,
+          productId: this.queryParam.productId ? this.queryParam.productId : undefined,
         })
         this.$refs.modalFormThree.title = '新增'
         this.$refs.modalFormThree.disableSubmit = false
@@ -368,11 +430,15 @@ export default {
       if (key == 'product') {
         this.queryParam.advertiserId = item.id
         this.advertiserName = item.name
+        this.queryParam.productId = null
+        this.productName = null
+        this.queryParam.productName = null
         this.callbackTwo('product')
       } else if (key == 'project') {
         this.queryParam.productId = item.id
         this.productName = item.productName
         this.advertiserId = item.advertiserId
+        this.queryParam.projectName = null
         this.callbackTwo('project')
       }
     },
@@ -391,15 +457,37 @@ export default {
         this.url.list = '/ctop/project/list'
         this.url.delete = '/ctop/project/delete'
       }
-      this.loadData(1)
+      this.searchQueryOne()
     },
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
     searchRe() {
       this.queryParam.name = null
       this.queryParam.advertiserId = null
       this.queryParam.productId = null
+      this.queryParam.id = null
+      this.queryParam.productName = null
+      this.queryParam.projectName = null
+      this.allIdUser = {}
       this.callbackTwo('advertiser')
     },
+    searchQueryOne() {
+      console.log(this.allIdUser)
+      if (this.allIdUser.key) {
+        if (this.active == 'advertiser') {
+          this.queryParam.advertiserId = null
+          this.queryParam.id = this.allIdUser.key
+        } else {
+          this.queryParam.id = null
+          this.queryParam.advertiserId = this.allIdUser.key
+        }
+        this.advertiserName = this.allIdUser.label
+      } else {
+        // this.queryParam.advertiserId = null
+        // this.queryParam.productId = null
+        // this.queryParam.id = null
+      }
+      this.searchQuery()
+    },
     handleSubmit() {
       let params = {}
       params.advertiserId = this.record.id

+ 40 - 12
src/views/modules/advertiser/ProjectList.vue

@@ -12,7 +12,21 @@
 
           <a-col :md="6" :sm="8">
             <a-form-item label="广告主名称">
-              <a-input placeholder="请输入广告主名称" v-model="queryParam.advertiserName"></a-input>
+              <!-- <a-input placeholder="请输入广告主名称" v-model="queryParam.advertiserName"></a-input> -->
+
+              <a-select
+                optionFilterProp="children"
+                showSearch
+                :filterOption="filterOption"
+                v-model="queryParam.advertiserId"
+                placeholder="请选择广告主名称"
+              >
+                <a-select-option :value="item.id" v-for="(item, index) of list" :key="index">
+                  {{
+                  item.name
+                  }}
+                </a-select-option>
+              </a-select>
             </a-form-item>
           </a-col>
           <template>
@@ -93,9 +107,9 @@
     </div>
 
     <!-- 操作按钮区域 -->
-    <div class="table-operator">
+    <!-- <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-    </div>
+    </div>-->
 
     <!-- table区域-begin -->
     <!-- 供应商 -->
@@ -133,7 +147,7 @@
 </template>
 
 <script>
-import ProjectModal from './modules/ProjectModal'
+import ProjectModal from './modules/projectListModal'
 import JTreeSelect from '@/components/jeecg/JTreeSelect'
 import { httpAction, getAction } from '@/api/manage'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
@@ -158,12 +172,7 @@ export default {
         {
           title: '广告主名称',
           align: 'center',
-          dataIndex: 'advertiserName',
-        },
-        {
-          title: '行业类型',
-          align: 'center',
-          dataIndex: 'industryId_dictText',
+          dataIndex: 'advertiserId_dictText',
         },
         {
           title: '最高出价',
@@ -194,12 +203,12 @@ export default {
         {
           title: '运营负责人',
           align: 'center',
-          dataIndex: 'responsibleName',
+          dataIndex: 'responsibleId_dictText',
         },
         {
           title: '设计负责人',
           align: 'center',
-          dataIndex: 'designResponsibleName',
+          dataIndex: 'designResponsibleId_dictText',
         },
         {
           title: '操作',
@@ -217,6 +226,7 @@ export default {
         exportXlsUrl: 'ctop/project/exportXls',
         importExcelUrl: 'ctop/project/importExcel',
       },
+      list: [],
       options: [],
     }
   },
@@ -226,6 +236,23 @@ export default {
     },
   },
   methods: {
+    getList() {
+      var params = {}
+      // params.userId = this.userInfo().id
+      params.pageSize = 1000
+      params.pageNo = 1
+      console.log(params)
+      getAction('/ctop/advertiser/list', params)
+        .then((res) => {
+          if (res.success) {
+            console.log(res)
+            this.list = res.result.records
+          } else {
+            this.$message.warning(res.message)
+          }
+        })
+        .finally(() => {})
+    },
     filterOption(input, option) {
       return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
     },
@@ -253,6 +280,7 @@ export default {
   },
   mounted() {
     this.getAllUserList()
+    this.getList()
     // getAction('/sys/user/getAllUserList', { pageSize: 50, pageNo: 1, userName: '' }).then((res) => {
     //   if (res.success) {
     //     this.options = res.result.list

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 742 - 570
src/views/modules/advertiser/ProjectMemberList.vue


+ 2 - 2
src/views/modules/advertiser/UserAllocationList.vue

@@ -311,12 +311,12 @@ export default {
         {
           title: '广告主名称',
           align: 'center',
-          dataIndex: 'advertiserName',
+          dataIndex: 'advertiserId_dictText',
         },
         {
           title: '项目名称',
           align: 'center',
-          dataIndex: 'projectName',
+          dataIndex: 'projectId_dictText',
         },
         //    {
         //     title: '输入账号  --登陆',

+ 1 - 2
src/views/modules/advertiser/modules/ProjectModal.vue

@@ -130,7 +130,7 @@
             @focus="handleFocus"
             @blur="handleBlur"
             :filterOption="filterOption"
-            v-decorator="['designResponsibleId', { rules: [{ required: true, message: '请选择运营负责人' }] }]"
+            v-decorator="['designResponsibleId', { rules: [{ required: true, message: '请选择设计负责人' }] }]"
           >
             <a-select-option
               v-for="appModel in options"
@@ -261,7 +261,6 @@ export default {
     add(item) {
       this.editAll = false
       this.edit({
-        responsibleId: this.userInfo().id, //用户Id
         mediaId: '2',
         ...item,
       })

+ 411 - 0
src/views/modules/advertiser/modules/projectListModal.vue

@@ -0,0 +1,411 @@
+<template>
+  <a-modal
+    :title="title"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <a-spin :spinning="confirmLoading">
+      <a-form :form="form">
+        <!-- <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="媒体类型">
+          <a-radio-group @change="onChange" v-model="model.mediaId">
+            <a-radio-button value="1">头条</a-radio-button>
+            <a-radio-button value="2">快手</a-radio-button>
+            <a-radio-button value="3">头条内广</a-radio-button>
+            <a-radio-button value="4">快手内广</a-radio-button>
+          </a-radio-group>
+        </a-form-item> -->
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="项目名称" >
+          <a-input placeholder="请输入项目名称" v-decorator="['projectName', validatorRules.projectName]" disabled/>
+        </a-form-item>
+        <!-- <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="行业">
+          <j-tree-select ref="treeSelect" placeholder="请选择行业" v-decorator="['industryId']"
+            dict="sys_category,name,id" pidField="pid" pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76">
+          </j-tree-select>
+        </a-form-item>-->
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="供应商"
+          v-if="model.mediaId=='2'||model.mediaId=='4'"
+        >
+          <a-select
+            optionFilterProp="children"
+            showSearch
+            :filterOption="filterOption"
+            v-decorator="['supplierCode', validatorRules.supplierCode]"
+          >
+            <a-select-option
+              :value="item.supplierCode"
+              v-for="(item, index) of supplierList"
+              :key="index"
+            >
+              {{
+              item.supplierName
+              }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="广告主名称">
+          <a-select
+            @change="handleChange"
+            optionFilterProp="children"
+            showSearch
+            :filterOption="filterOption"
+            v-decorator="['advertiserId', validatorRules.advertiserId]"
+            placeholder="请选择广告主"
+            disabled
+          >
+            <a-select-option :value="item.id" v-for="(item, index) of list" :key="index">
+              {{
+              item.name
+              }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="产品名称">
+          <a-select
+            optionFilterProp="children"
+            showSearch
+            :filterOption="filterOption"
+            v-decorator="['productId', validatorRules.productId]"
+            placeholder="请选择产品"
+            disabled
+          >
+            <a-select-option :value="item.id" v-for="(item, index) of listProduct" :key="index">
+              {{
+              item.productName
+              }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="最高出价">
+          <a-input
+            placeholder="请输入最高出价"
+            v-decorator="['maxBid', validatorRules.maxBid]"
+            addonAfter="元"
+          />
+        </a-form-item>
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="最高转化出价">
+          <a-input placeholder="最高转化出价" v-decorator="['maxDeepCpaBid']" addonAfter="元" />
+        </a-form-item>
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售">
+          <a-select
+            showSearch
+            optionFilterProp="children"
+            style="width: 100%"
+            :filterOption="filterOption"
+            v-decorator="['saleId', { rules: [{  required: true,message: '请选择销售' }] }]"
+          >
+            <a-select-option
+              v-for="appModel in optionsElse"
+              :key="appModel.userId + new Date().getTime()"
+              :value="appModel.userId"
+            >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="运营负责人">
+          <a-select
+            showSearch
+            optionFilterProp="children"
+            style="width: 100%"
+            @focus="handleFocus"
+            @blur="handleBlur"
+            :filterOption="filterOption"
+            v-decorator="['responsibleId', { rules: [{ required: true, message: '请选择运营负责人' }] }]"
+          >
+            <a-select-option
+              v-for="appModel in options"
+              :key="appModel.userId + new Date().getTime()"
+              :value="appModel.userId"
+            >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="设计负责人">
+          <a-select
+            showSearch
+            optionFilterProp="children"
+            style="width: 100%"
+            @focus="handleFocus"
+            @blur="handleBlur"
+            :filterOption="filterOption"
+            v-decorator="['designResponsibleId', { rules: [{ required: true, message: '请选择设计负责人' }] }]"
+          >
+            <a-select-option
+              v-for="appModel in options"
+              :key="appModel.userId + new Date().getTime()"
+              :value="appModel.userId"
+            >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
+          </a-select>
+        </a-form-item>
+      </a-form>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { httpAction, getAction } from '@/api/manage'
+import pick from 'lodash.pick'
+import moment from 'moment'
+import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
+import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
+import JTreeSelect from '@/components/jeecg/JTreeSelect'
+import { mapGetters } from 'vuex'
+export default {
+  name: 'ProjectModal',
+  components: {
+    JSelectUserByDep,
+    JSelectDepart,
+    JTreeSelect,
+  },
+  data() {
+    return {
+      title: '操作',
+      visible: false,
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      industryId: '',
+      confirmLoading: false,
+      form: this.$form.createForm(this),
+      validatorRules: {
+        projectName: { rules: [{ required: true, message: '请输入项目名称!' }] },
+        industryId: { rules: [{ required: true, message: '请选择行业!' }] },
+        advertiserId: { rules: [{ required: true, message: '请选择广告主!' }] },
+        productId: { rules: [{ required: true, message: '请选择产品!' }] },
+        supplierCode: { rules: [{ required: true, message: '请选择供应商!' }], initialValue: 'kuaishou_001' },
+        responsibleName: { rules: [{ required: true, message: '请选择负责人!' }] },
+        maxBid: { rules: [{ required: true, message: '请输入最高出价!' }, { validator: this.validateInputCode }] },
+      },
+      url: {
+        add: '/ctop/project/add',
+        edit: '/ctop/project/edit',
+        getList: '/ctop/advertiser/list',
+      },
+      list: [],
+      listProduct: [],
+      resId: '',
+      shejiId: '',
+      options: [],
+      optionsElse: [],
+      supplierList: [],
+      editAll: false,
+    }
+  },
+  created() {
+    this.getSupplierList()
+  },
+  methods: {
+    validateInputCode(rule, value, callback) {
+      if (!value || value > 0) {
+        callback()
+      } else {
+        callback('请输入大于0的最高报价!')
+      }
+    },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    onChange(e) {
+      console.log(`checked = ${e.target.value}`)
+    },
+    handleChange(value) {
+      console.log(value)
+      getAction('/ctop/product/list', { advertiserId: value, pageSize: 1000 }).then((res) => {
+        if (res.success) {
+          this.listProduct = res.result.records
+        }
+      })
+    },
+    handleBlur() {
+      console.log('blur')
+    },
+    handleFocus() {
+      console.log('focus')
+    },
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    getList() {
+      var params = {}
+      // params.userId = this.userInfo().id
+      params.pageSize = 1000
+      params.pageNo = 1
+      console.log(params)
+      getAction(this.url.getList,params)
+        .then((res) => {
+          if (res.success) {
+            console.log(res)
+            this.list = res.result.records
+          } else {
+            this.$message.warning(res.message)
+          }
+        })
+        .finally(() => {})
+    },
+    getSupplierList() {
+      var params = {}
+      getAction('/ctop/supplierList/list').then((res) => {
+        if (res.success) {
+          this.supplierList = res.result.records
+        } else {
+          this.$message.warning(res.message)
+        }
+      })
+    },
+    add(item) {
+      this.editAll = false
+      this.edit({
+        responsibleId: this.userInfo().id, //用户Id
+        mediaId: '2',
+        ...item,
+      })
+    },
+    edit(record) {
+      this.getSupplierList()
+      this.getList()
+      if (record.advertiserId) {
+        this.editAll = true
+        getAction('/ctop/product/list', { advertiserId: record.advertiserId, pageSize: 1000 }).then((res) => {
+          if (res.success) {
+            this.listProduct = res.result.records
+          }
+        })
+      }
+      var params = { ...record }
+
+      console.log(record)
+      this.form.resetFields()
+      this.model = Object.assign({}, params)
+      this.model.maxBid = this.model.maxBid ? this.model.maxBid / 1000 : 0
+      this.model.maxDeepCpaBid = this.model.maxDeepCpaBid ? this.model.maxDeepCpaBid / 1000 : 0
+      this.visible = true
+      this.$nextTick(() => {
+        console.log(this.model)
+        if (record.advertiserId) {
+          this.form.setFieldsValue(
+            pick(
+              this.model,
+              'projectName',
+              'industryId',
+              'advertiserId',
+              'productId',
+              'responsibleName',
+              'maxBid',
+              'maxDeepCpaBid',
+              'userId',
+              'designResponsibleId',
+              'responsibleId',
+              'industryCode',
+              'supplierCode',
+              // 'advertiserType',
+              'saleId'
+            )
+          )
+        } else {
+          this.form.setFieldsValue(
+            pick(
+              this.model,
+              'projectName',
+              'industryId',
+              'advertiserId',
+              'responsibleName',
+              'maxBid',
+              'maxDeepCpaBid',
+              'userId',
+              'designResponsibleId',
+              'responsibleId',
+              'industryCode',
+              'supplierCode',
+              // 'advertiserType',
+              'saleId'
+            )
+          )
+        }
+
+        // this.resId = record.responsibleId
+        // this.shejiId = record.designResponsibleId
+        getAction('/sys/user/getAllUserListV1', '').then((res) => {
+          console.log(res)
+          if (res.success) {
+            this.options = res.result
+          }
+        })
+        getAction('/sys/user/getAllSaleList', '').then((res) => {
+          console.log(res)
+          if (res.success) {
+            this.optionsElse = res.result
+          }
+        })
+        //时间格式化
+      })
+    },
+    close() {
+      this.$emit('close')
+      this.visible = false
+    },
+    handleOk() {
+      const that = this
+      // 触发表单验证
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          that.confirmLoading = true
+          let httpurl = ''
+          let method = ''
+          if (!this.model.id) {
+            httpurl += this.url.add
+            method = 'post'
+          } else {
+            httpurl += this.url.edit
+            method = 'put'
+          }
+          var data = values.advertiserId
+          let formData = Object.assign(this.model, values)
+          //   if(this.model.mediaId)
+          formData.maxBid = formData.maxBid * 1000
+          formData.maxDeepCpaBid = formData.maxDeepCpaBid * 1000
+          //时间格式化
+          // formData.advertiserId = data.key
+          // formData.advertiserName = data.label
+          formData.responsibleId = values.responsibleId
+          formData.designResponsibleId = values.designResponsibleId
+          formData.userId = formData.userId ? formData.userId : that.userInfo().id
+          httpAction(httpurl, formData, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message)
+                that.$emit('ok')
+              } else {
+                that.$message.warning(res.message)
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false
+              that.close()
+            })
+        }
+      })
+    },
+    handleCancel() {
+      this.close()
+    },
+    getFormFieldValue(field) {
+      return this.form.getFieldValue(field)
+    },
+    get(valueName, key) {
+      console.log(valueName, key)
+      this.resId = key
+    },
+  },
+}
+</script>
+
+<style lang="less" scoped></style>

+ 10 - 3
src/views/modules/kuaishouapp/account/advertisingGroup.vue

@@ -199,7 +199,8 @@
       </template>
     </a-modal>
     <a-modal title="拷贝" v-model="visibleCopy" :width="900">
-      <span style="color:red;display:block;width:100%;text-align:center;margin:10px">快手后台抽帧,程序化创意暂不支持被复制</span>
+      <a-spin :spinning="copyLoading">
+           <span style="color:red;display:block;width:100%;text-align:center;margin:10px">快手后台抽帧,程序化创意暂不支持被复制</span>
       <a-form :form="form">
         <a-form-item label="广告计划名称" :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
           :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }">
@@ -265,6 +266,8 @@
           </a-radio-group>
         </a-form-item>
       </a-form>
+    </a-spin>
+
       <template slot="footer">
         <a-button key="submit" type="primary" @click="handleSubmitCopy"
           :disabled="getData('isUpdateTrackUrl')?clickTrackUrl==''?true:false:false" :loading='loading'>
@@ -592,6 +595,7 @@
         campaignList: [],
         showEdit: false,
         visibleCopy: false,
+        copyLoading:true,
         loading: false,
         columns,
         columnsElse: columns,
@@ -842,7 +846,7 @@
         this.$refs.editGroup.handleOk(item, 'edit')
       },
       copyDetail(item) {
-        this.visibleCopy = true
+
         this.clickTrackUrl = ''
         this.campaignId = localStorage.getItem('advertisingGroupKey')
         this.form.resetFields()
@@ -850,7 +854,8 @@
         this.$nextTick(() => {
           this.unitNameInit = item.unitName
         })
-
+        this.copyLoading = true
+        this.visibleCopy = true
         var params = {}
         params.accountId = item.accountId
         params.unitId = item.unitId
@@ -862,6 +867,8 @@
               ...res.result.appInfo,
               ...res.result.target
             }
+
+            this.copyLoading = false
           }
 
         })

+ 30 - 1
src/views/modules/kuaishouapp/account/stepForm/Step2.vue

@@ -120,6 +120,16 @@
         </a-checkbox-group>
       </a-form-item>
 
+      <!-- <a-form-item label="投放范围" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+        v-if="allianceAccount">
+        <a-radio-group buttonStyle="solid" v-model="allForm.allianceAccount">
+          <a-radio-button value="1">默认</a-radio-button>
+          <a-radio-button value="2">联盟广告</a-radio-button>
+        </a-radio-group>
+      </a-form-item> -->
+
+
       <div style="text-align:center;font-size:16px;margin-bottom:10px">
         目标人群
       </div>
@@ -487,6 +497,7 @@
 
     data() {
       return {
+        allianceAccount:false,
         tongbuLoading: false,
         convert: false,
         convertId: "",
@@ -534,7 +545,8 @@
           fail: [],
           success: [],
           sceneId: [7],
-          appStore: ['huawei', 'oppo', 'vivo', 'xiaomi', 'meizu', 'smartisan']
+          appStore: ['huawei', 'oppo', 'vivo', 'xiaomi', 'meizu', 'smartisan'],
+          allianceAccount:false
         },
         convertType: '1',
         dataList: []
@@ -996,6 +1008,23 @@
           this.allForm.groupTypeData = res.result
         }
       })
+
+      getAction('/kuaishou/batch/getWhiteList',{
+        accountId:localStorage.getItem('accountId')
+      }).then(res=>{
+        if(res.success){
+          console.log(res)
+          if(res.result){
+            if(res.result.alliance_account == 1){
+              this.allianceAccount = true
+            }else{
+              this.allianceAccount = false
+            }
+          }else{
+            this.allianceAccount = false
+          }
+        }
+      })
       getAction('/kuaishou/batch/getProjectMaxBid', {
         accountId: localStorage.getItem('accountId')
       }).then(res => {

+ 14 - 9
src/views/modules/kuaishouapp/account/stepForm/stepModule/newModulePop.vue

@@ -391,13 +391,14 @@ li:hover {
                 :checked="checkAll"
               ></a-checkbox>全选
             </li>
-            <a-checkbox-group v-model="checkArr" @change="onChange" class="home-card" style="width:100%">
+            <a-checkbox-group
+              v-model="checkArr"
+              @change="onChange"
+              class="home-card"
+              style="width:100%"
+            >
               <li style="padding:0 10px;width:100%;" v-for="item of optionsApp" :key="item.appId">
-                <a-checkbox
-                  :value="item.appId"
-                  style="float:left;margin:0 5px"
-                  
-                ></a-checkbox>
+                <a-checkbox :value="item.appId" style="float:left;margin:0 5px"></a-checkbox>
                 {{ item.appName }}
               </li>
             </a-checkbox-group>
@@ -412,7 +413,7 @@ li:hover {
             :key="item"
             closable
             :afterClose="() => log(item)"
-          >{{ showAppName(item) }}</a-tag>
+          >{{ showAppName(item)?showAppName(item):item }}</a-tag>
         </div>
       </div>
     </a-form-item>
@@ -745,7 +746,7 @@ export default {
           this.allForm.noAreaBreak = n.noAreaBreak == '0' ? false : true
           this.selectedRowKeys = n.population ? n.population : []
           this.selectedRowKeysNo = n.excludePopulation ? n.excludePopulation : []
-
+          this.optionsAll = n.appIds?(typeof n.appIds)=='string'? JSON.parse(n.appIds):n.appIds:[]
           this.targeted = n.excludePopulation ? (n.population ? '4' : '3') : '2'
           this.people = n.excludePopulation ? '3' : n.population ? '3' : '2'
           this.getPeople().then((res) => {
@@ -1028,7 +1029,11 @@ export default {
       var data = this.checkOptions.filter((item) => {
         return item.appId == appId
       })
-      return data[0].appName
+      if (data.length > 0) {
+        return data[0].appName
+      }else{
+        return null
+      }
     },
     log(appId) {
       var index = this.optionsAll.findIndex((item) => item === appId)

+ 27 - 2
src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue

@@ -370,8 +370,9 @@ li:hover {
         <a-input
           placeholder="请输入搜索内容"
           @change="getAppAll"
-          @focus="getAppAll"
+          @focus="getAppAllElse"
           style="width:100%;position:relative;"
+          v-model="appListValue"
         />
         <div
           style="width:100%;position:absolute;z-index:10;height:200px;background:white;overflow:auto;box-shadow: 0 2px 8px 0 rgba(0,0,0,.15);"
@@ -719,7 +720,7 @@ export default {
           this.allForm.noAreaBreak = n.noAreaBreak == '0' ? false : true
           this.selectedRowKeys = n.population ? n.population : []
           this.selectedRowKeysNo = n.excludePopulation ? n.excludePopulation : []
-          this.optionsAll = n.appIds
+          this.optionsAll = n.appIds?(typeof n.appIds)=='string'? JSON.parse(n.appIds):n.appIds:[]
           this.targeted = n.excludePopulation ? (n.population ? '4' : '3') : '2'
           this.people = n.excludePopulation ? '3' : n.population ? '3' : '2'
           this.getPeople().then(res => {
@@ -840,6 +841,7 @@ export default {
       step: 0,
       loading: false,
       checkArr: [],
+      appListValue:"",
       checkAll: false,
       allForm: {
         regionType: 'noLimit',
@@ -1161,6 +1163,29 @@ export default {
         return [item.substring(0, 2), item]
       })
     },
+    getAppAllElse(e){
+        this.checkArr = this.optionsAll
+        // this.getAppAll()
+        
+        if(this.appListValue!=''){
+           getAction('/kuaishou/batch/getAppSearch', {
+              accountId: localStorage.getItem('accountId'),
+              appName: e.target.value
+            }).then(res => {
+              if (res.result) {
+                this.optionsApp = res.result
+                this.checkOptions.push(...res.result)
+                this.closeDialog = true
+              } else {
+                this.optionsApp = []
+                this.closeDialog = false
+              }
+            })
+        }else {
+          this.optionsApp = []
+          this.closeDialog = false
+        }
+    },
     getAppAll(e) {
       if (e.target.value !== '') {
         getAction('/kuaishou/batch/getAppSearch', {

+ 3 - 4
src/views/modules/material/materialList.vue

@@ -197,6 +197,7 @@ a {
     </div>
     <a-tabs @change="callbackTwo" v-model="active" id="material-card" type="card">
       <a-tab-pane :tab="item.tab" v-for="item of examinelList" :key="item.value">
+        <a-spin :spinning="spinning">
         <div v-if="dataSource.length > 0">
           <a-checkbox-group @change="onChangeCheck" v-model="checkArr" class="home-card">
             <div class="home-item" v-for="(items, index) in dataSource" :key="index" @click="showDetail(items)">
@@ -282,11 +283,9 @@ a {
           <img
             src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1575627350102&di=02972956f2243933bffc0d85099adbfe&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D1095310825%2C1528244349%26fm%3D214%26gp%3D0.jpg"
             alt="" v-if="!loading"/>
-            <img
-            v-else
-            src="./loading.gif"
-            />
+          <div v-else></div>
         </div>
+        </a-spin>
       </a-tab-pane>
     </a-tabs>
     <a-modal title="添加素材" v-model="visible" @ok="handleOk" @cancel="close" :maskClosable="false" :width="800">

+ 248 - 246
src/views/modules/material/videoMaterial.vue

@@ -398,171 +398,172 @@ a {
 
     <a-tabs @change="callbackTwo" v-model="active" type="card" id="material-card">
       <a-tab-pane :tab="item.tab" v-for="item of examinelList" :key="item.value">
-        <div v-if="dataSource.length > 0">
-          <a-checkbox-group @change="onChangeCheck" v-model="checkArr" class="home-card">
-            <div
-              class="home-item"
-              v-for="(items, index) in dataSource"
-              :key="index"
-              @click="showDetail(items)"
-            >
-              <span v-if="items.excellent == 0"></span>
-              <span
-                v-else
-                style="position:absolute;top:30px;right:-105px;display:block;width:300px;height:30px;text-align:center;line-height;30px;background:red;transform:rotate(45deg);z-index:1000"
-              >优秀素材</span>
-              <div class="home-right">
-                <a-badge
-                  :count="checkArr.indexOf(items.id) > -1 ? checkArr.indexOf(items.id) + 1 : 0"
-                  :numberStyle="{ backgroundColor: '#52c41a' }"
-                  style="width:100%;display:flex"
-                  @click.stop
-                >
-                  <span
-                    style="color: #999; fontSize: 14px;padding-bottom:10px;display:inline-block;width:100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
-                    :title="items.projectName"
-                  >{{ items.projectName }}</span>
-                  <span
-                    style="color: #999; fontSize: 14px;padding-bottom:10px;display:inline-block;width:100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
-                    :title="items.materialName"
-                  >{{items.materialName}}</span>
-
-                  <a-icon
-                    type="close-circle"
-                    @click="deleteData(items.id)"
-                    v-show="active == '0'"
-                    v-if="items.userId == userInfo().id"
-                  />
-                </a-badge>
-                <div
-                  style="display:flex;justify-content:center;width:100%;height:200px;position:relative;"
-                >
-                  <!-- <video
+        <a-spin :spinning="spinning">
+          <div v-if="dataSource.length > 0">
+            <a-checkbox-group @change="onChangeCheck" v-model="checkArr" class="home-card">
+              <div
+                class="home-item"
+                v-for="(items, index) in dataSource"
+                :key="index"
+                @click="showDetail(items)"
+              >
+                <span v-if="items.excellent == 0"></span>
+                <span
+                  v-else
+                  style="position:absolute;top:30px;right:-105px;display:block;width:300px;height:30px;text-align:center;line-height;30px;background:red;transform:rotate(45deg);z-index:1000"
+                >优秀素材</span>
+                <div class="home-right">
+                  <a-badge
+                    :count="checkArr.indexOf(items.id) > -1 ? checkArr.indexOf(items.id) + 1 : 0"
+                    :numberStyle="{ backgroundColor: '#52c41a' }"
+                    style="width:100%;display:flex"
+                    @click.stop
+                  >
+                    <span
+                      style="color: #999; fontSize: 14px;padding-bottom:10px;display:inline-block;width:100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
+                      :title="items.projectName"
+                    >{{ items.projectName }}</span>
+                    <span
+                      style="color: #999; fontSize: 14px;padding-bottom:10px;display:inline-block;width:100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
+                      :title="items.materialName"
+                    >{{items.materialName}}</span>
+
+                    <a-icon
+                      type="close-circle"
+                      @click="deleteData(items.id)"
+                      v-show="active == '0'"
+                      v-if="items.userId == userInfo().id"
+                    />
+                  </a-badge>
+                  <div
+                    style="display:flex;justify-content:center;width:100%;height:200px;position:relative;"
+                  >
+                    <!-- <video
                     :src="items.url"
                     @canplay="a(items)"
                     style="height:200px;max-width:100%;position:absolute;z-index:10;"
-                  />-->
-                  <div style="width: 100px;position: absolute;left: 0;z-index:1000">
-                    <a-tooltip placement="top">
-                      <template slot="title">
-                        <span>{{ items.kuaishouEffiType == 1 ? '快手有效视频' : '已经同步到快手平台' }}</span>
-                      </template>
-                      <img
-                        style="width:30px;height:30px;"
-                        v-if="items.kuaishouVideoIsUp == 1"
-                        :style="{ filter: items.kuaishouEffiType == 1 ? 'grayscale(0%)' : 'grayscale(100%)' }"
-                        src="./kuaishou.jpg"
-                      />
-                    </a-tooltip>
-                    <a-tooltip placement="top">
-                      <template slot="title">
-                        <span>{{ items.toutiaoEffiType == 1 ? '抖音有效视频' : '已经同步到抖音平台' }}</span>
-                      </template>
-                      <img
-                        v-if="items.toutiaoVideoIsUp == 1 && items.toutiaoEffiType == 1"
-                        style="width:30px;height:30px;margin-left:5px;"
-                        src="./douyin.jpg"
-                        alt
-                      />
-                      <img
-                        v-else-if="items.toutiaoVideoIsUp == 1 && items.toutiaoEffiType == 0"
-                        style="width:30px;height:30px;margin-left:5px;"
-                        src="./douyinhui.jpg"
-                        alt
-                      />
-                    </a-tooltip>
-                  </div>
+                    />-->
+                    <div style="width: 100px;position: absolute;left: 0;z-index:1000">
+                      <a-tooltip placement="top">
+                        <template slot="title">
+                          <span>{{ items.kuaishouEffiType == 1 ? '快手有效视频' : '已经同步到快手平台' }}</span>
+                        </template>
+                        <img
+                          style="width:30px;height:30px;"
+                          v-if="items.kuaishouVideoIsUp == 1"
+                          :style="{ filter: items.kuaishouEffiType == 1 ? 'grayscale(0%)' : 'grayscale(100%)' }"
+                          src="./kuaishou.jpg"
+                        />
+                      </a-tooltip>
+                      <a-tooltip placement="top">
+                        <template slot="title">
+                          <span>{{ items.toutiaoEffiType == 1 ? '抖音有效视频' : '已经同步到抖音平台' }}</span>
+                        </template>
+                        <img
+                          v-if="items.toutiaoVideoIsUp == 1 && items.toutiaoEffiType == 1"
+                          style="width:30px;height:30px;margin-left:5px;"
+                          src="./douyin.jpg"
+                          alt
+                        />
+                        <img
+                          v-else-if="items.toutiaoVideoIsUp == 1 && items.toutiaoEffiType == 0"
+                          style="width:30px;height:30px;margin-left:5px;"
+                          src="./douyinhui.jpg"
+                          alt
+                        />
+                      </a-tooltip>
+                    </div>
 
-                  <a-icon
-                    type="fire"
-                    style="font-size:20px;position: absolute;right: 0;bottom:10px;z-index:1000;color:red"
-                    v-if="items.whetherUnaudited"
-                  />
-                  <img
-                    :src="items.coverUrl"
-                    alt
-                    style="height:200px;max-width:100%;position:absolute;z-index:10;"
-                  />
-                  <!-- <img
+                    <a-icon
+                      type="fire"
+                      style="font-size:20px;position: absolute;right: 0;bottom:10px;z-index:1000;color:red"
+                      v-if="items.whetherUnaudited"
+                    />
+                    <img
+                      :src="items.coverUrl"
+                      alt
+                      style="height:200px;max-width:100%;position:absolute;z-index:10;"
+                    />
+                    <!-- <img
                     src="./timg.gif"
                     v-if="!items.showVideo"
                     alt=""
                     style="height:200px;max-width:100%;position:absolute;z-index:11;"
                     @click.stop
-                  />-->
-                </div>
-                <div style="width:100%;height:1px;border-bottom:1px solid #f2f2f2;margin-top:5px"></div>
-                <div v-if="active == '2'" class="bh">驳回原因:{{ items.refuseReason }}</div>
-
-                <div
-                  v-if="active == '1'"
-                  class="bhShow"
-                  style="display:flex;justify-content:space-between;"
-                  @click.stop="showData(items)"
-                >
-                  <div v-if="items.byteDance" class="show-data">
-                    <span>抖音</span>
-                    <span>消耗:{{ items.byteDance.cost }}</span>
-                    <span>封面点击:{{ items.byteDance.click }}</span>
-                    <span>封面展示:{{ items.byteDance.showNum }}</span>
-                  </div>
-                  <div v-else style="line-height:100px;" class="show-data">
-                    <span>抖音:无</span>
-                  </div>
-                  <div v-if="items.kuaiShou" class="show-data">
-                    <span>快手</span>
-                    <span>消耗:{{ items.kuaiShou.charge }}</span>
-                    <span>封面点击:{{ items.kuaiShou.photoClick }}</span>
-                    <span>封面展示:{{ items.kuaiShou.photoShow }}</span>
+                    />-->
                   </div>
-                  <div v-else style="line-height:100px;" class="show-data">
-                    <span>快手:无</span>
+                  <div style="width:100%;height:1px;border-bottom:1px solid #f2f2f2;margin-top:5px"></div>
+                  <div v-if="active == '2'" class="bh">驳回原因:{{ items.refuseReason }}</div>
+
+                  <div
+                    v-if="active == '1'"
+                    class="bhShow"
+                    style="display:flex;justify-content:space-between;"
+                    @click.stop="showData(items)"
+                  >
+                    <div v-if="items.byteDance" class="show-data">
+                      <span>抖音</span>
+                      <span>消耗:{{ items.byteDance.cost }}</span>
+                      <span>封面点击:{{ items.byteDance.click }}</span>
+                      <span>封面展示:{{ items.byteDance.showNum }}</span>
+                    </div>
+                    <div v-else style="line-height:100px;" class="show-data">
+                      <span>抖音:无</span>
+                    </div>
+                    <div v-if="items.kuaiShou" class="show-data">
+                      <span>快手</span>
+                      <span>消耗:{{ items.kuaiShou.charge }}</span>
+                      <span>封面点击:{{ items.kuaiShou.photoClick }}</span>
+                      <span>封面展示:{{ items.kuaiShou.photoShow }}</span>
+                    </div>
+                    <div v-else style="line-height:100px;" class="show-data">
+                      <span>快手:无</span>
+                    </div>
                   </div>
-                </div>
-                <div
-                  style="width:100%;height:1px;border-bottom:1px solid #f2f2f2;margin-top:5px"
-                  v-if="active != '0'"
-                ></div>
-                <span
-                  style="color: black; fontSize: 16px;padding-top:10px;display:block;width:100%"
-                  @click.stop
-                >
-                  <!-- <a href="javascript:;" style="margin-right:20px" @click="edit(items, '2')" v-show="active == '2'"
+                  <div
+                    style="width:100%;height:1px;border-bottom:1px solid #f2f2f2;margin-top:5px"
+                    v-if="active != '0'"
+                  ></div>
+                  <span
+                    style="color: black; fontSize: 16px;padding-top:10px;display:block;width:100%"
+                    @click.stop
+                  >
+                    <!-- <a href="javascript:;" style="margin-right:20px" @click="edit(items, '2')" v-show="active == '2'"
                     v-if="items.userId == userInfo().id">
                     修改</a>
                   <a href="javascript:;" style="margin-right:20px" v-show="active !='3'" @click="personEdit(items, '2')"
                     v-if="items.userId == userInfo().id||role.roleCode =='designTeamLeader'">
-                  人员修改</a>-->
+                    人员修改</a>-->
 
-                  <a-popconfirm
-                    @confirm="okEditShow(items, '2')"
-                    v-show="active != '2'&&active!='3'"
-                    v-if="
+                    <a-popconfirm
+                      @confirm="okEditShow(items, '2')"
+                      v-show="active != '2'&&active!='3'"
+                      v-if="
                       role.roleCode == 'operator' ||
                         role.roleCode == 'kuaishouOperationManager' ||
                         role.roleCode == 'admin' ||
                         role.roleCode == 'operationAssistant' ||
                         role.roleCode == 'touTiaoOperationManager'
                     "
-                  >
-                    <div slot="title">
-                      <div>
-                        驳回原因:
-                        <a-textarea
-                          placeholder="请输入原因"
-                          v-model="refuseReason"
-                          :autosize="{ minRows: 3, maxRows: 10 }"
-                        />
-                      </div>
-                      <div>
-                        截图:
-                        <uploadFile
-                          v-if="refuseFile"
-                          :value.sync="refuseFile"
-                          :fileCount="15"
-                          uploadType="image"
-                        />
-                        <!-- <upload-to-ali
+                    >
+                      <div slot="title">
+                        <div>
+                          驳回原因:
+                          <a-textarea
+                            placeholder="请输入原因"
+                            v-model="refuseReason"
+                            :autosize="{ minRows: 3, maxRows: 10 }"
+                          />
+                        </div>
+                        <div>
+                          截图:
+                          <uploadFile
+                            v-if="refuseFile"
+                            :value.sync="refuseFile"
+                            :fileCount="15"
+                            uploadType="image"
+                          />
+                          <!-- <upload-to-ali
                           v-model="refuseFile"
                           :customDomain="customDomain"
                           multiple
@@ -575,123 +576,124 @@ a {
                           :accessKeyId="accessKeyId"
                           :accessKeySecret="accessKeySecret"
                           :dir="dirImg"
-                        ></upload-to-ali>-->
+                          ></upload-to-ali>-->
+                        </div>
                       </div>
-                    </div>
-                    <a href="javascript:;" style="margin-right:20px">驳回</a>
-                  </a-popconfirm>
+                      <a href="javascript:;" style="margin-right:20px">驳回</a>
+                    </a-popconfirm>
 
-                  <a-popconfirm
-                    @confirm="okEditShow(items, '1')"
-                    v-show="active != '1'&&active!='3'"
-                    v-if="
+                    <a-popconfirm
+                      @confirm="okEditShow(items, '1')"
+                      v-show="active != '1'&&active!='3'"
+                      v-if="
                       role.roleCode == 'operator' ||
                         role.roleCode == 'kuaishouOperationManager' ||
                         role.roleCode == 'admin' ||
                         role.roleCode == 'operationAssistant' ||
                         role.roleCode == 'touTiaoOperationManager'
                     "
-                  >
-                    <div slot="title">
-                      <div>
-                        广告语:
-                        <a-textarea
-                          placeholder="请输入"
-                          v-model="refuseReason"
-                          :autosize="{ minRows: 3, maxRows: 10 }"
-                        />
+                    >
+                      <div slot="title">
+                        <div>
+                          广告语:
+                          <a-textarea
+                            placeholder="请输入"
+                            v-model="refuseReason"
+                            :autosize="{ minRows: 3, maxRows: 10 }"
+                          />
+                        </div>
                       </div>
-                    </div>
-                    <a
-                      href="javascript:;"
-                      style="margin-right:20px"
-                      v-show="active != '1'"
-                      v-if="
+                      <a
+                        href="javascript:;"
+                        style="margin-right:20px"
+                        v-show="active != '1'"
+                        v-if="
                         role.roleCode == 'operator' ||
                           role.roleCode == 'kuaishouOperationManager' ||
                           role.roleCode == 'admin' ||
                           role.roleCode == 'operationAssistant' ||
                           role.roleCode == 'touTiaoOperationManager'
                       "
-                    >通过审核</a>
-                  </a-popconfirm>
-                  <!-- <a v-show="active!='3'" style="margin-right:20px" @click="addImage(items)">添加封面</a>
-                  <a style="margin-right:20px" @click="showImage(items)">推荐封面</a>-->
-
-                  <a-dropdown style="margin-right:20px">
-                    <a class="ant-dropdown-link" @click="e => e.preventDefault()">
-                      更多操作
-                      <a-icon type="down" />
-                    </a>
-                    <a-menu slot="overlay">
-                      <a-menu-item
-                        key="0"
-                        v-show="active == '2'"
-                        v-if="items.userId == userInfo().id"
-                      >
-                        <a
-                          href="javascript:;"
-                          style="margin-right:20px"
-                          @click="edit(items, '2')"
-                        >修改</a>
-                      </a-menu-item>
-                      <a-menu-item
-                        key="1"
-                        v-show="active !='3'"
-                        v-if="items.userId == userInfo().id||role.roleCode =='designTeamLeader'"
-                      >
-                        <a
-                          href="javascript:;"
-                          style="margin-right:20px"
-                          @click="personEdit(items, '2')"
-                        >人员修改</a>
-                      </a-menu-item>
-                      <a-menu-item key="3" v-show="active!='3'">
-                        <a style="margin-right:20px" @click="addImage(items)">添加封面</a>
-                      </a-menu-item>
-                      <a-menu-item key="4">
-                        <a style="margin-right:20px" @click="showImage(items)">推荐封面</a>
-                      </a-menu-item>
-                      <a-menu-item key="5">
-                        <a
-                          href="javascript:;"
-                          style="margin-right:20px"
-                          @click="editTagList(items)"
-                        >修改标签</a>
-                      </a-menu-item>
-                    </a-menu>
-                  </a-dropdown>
-                  <a-checkbox :value="items.id" style="float:right" v-show="active == '1'"></a-checkbox>
-
-                  <br />
-                  {{ items.createTime | getDate }}
-                </span>
+                      >通过审核</a>
+                    </a-popconfirm>
+                    <!-- <a v-show="active!='3'" style="margin-right:20px" @click="addImage(items)">添加封面</a>
+                    <a style="margin-right:20px" @click="showImage(items)">推荐封面</a>-->
+
+                    <a-dropdown style="margin-right:20px">
+                      <a class="ant-dropdown-link" @click="e => e.preventDefault()">
+                        更多操作
+                        <a-icon type="down" />
+                      </a>
+                      <a-menu slot="overlay">
+                        <a-menu-item
+                          key="0"
+                          v-show="active == '2'"
+                          v-if="items.userId == userInfo().id"
+                        >
+                          <a
+                            href="javascript:;"
+                            style="margin-right:20px"
+                            @click="edit(items, '2')"
+                          >修改</a>
+                        </a-menu-item>
+                        <a-menu-item
+                          key="1"
+                          v-show="active !='3'"
+                          v-if="items.userId == userInfo().id||role.roleCode =='designTeamLeader'"
+                        >
+                          <a
+                            href="javascript:;"
+                            style="margin-right:20px"
+                            @click="personEdit(items, '2')"
+                          >人员修改</a>
+                        </a-menu-item>
+                        <a-menu-item key="3" v-show="active!='3'">
+                          <a style="margin-right:20px" @click="addImage(items)">添加封面</a>
+                        </a-menu-item>
+                        <a-menu-item key="4">
+                          <a style="margin-right:20px" @click="showImage(items)">推荐封面</a>
+                        </a-menu-item>
+                        <a-menu-item key="5">
+                          <a
+                            href="javascript:;"
+                            style="margin-right:20px"
+                            @click="editTagList(items)"
+                          >修改标签</a>
+                        </a-menu-item>
+                      </a-menu>
+                    </a-dropdown>
+                    <a-checkbox :value="items.id" style="float:right" v-show="active == '1'"></a-checkbox>
+
+                    <br />
+                    {{ items.createTime | getDate }}
+                  </span>
+                </div>
               </div>
-            </div>
-          </a-checkbox-group>
-          <a-pagination
-            size="small"
-            :showTotal="ipagination.showTotal"
-            style="float:right"
-            v-if="dataSource.length > 0"
-            showQuickJumper
-            :pageSize.sync="ipagination.pageSize"
-            :total="ipagination.total"
-            v-model="ipagination.current"
-            @change="getDataSource"
-          />
-        </div>
-        <div
-          v-else
-          style="width:100%;height:400px;display:flex;justify-content: center;align-items: center;"
-        >
-          <img
-            src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1575627350102&di=02972956f2243933bffc0d85099adbfe&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D1095310825%2C1528244349%26fm%3D214%26gp%3D0.jpg"
-            alt
-            v-if="!loading"
-          />
-          <img v-else src="./loading.gif" />
-        </div>
+            </a-checkbox-group>
+            <a-pagination
+              size="small"
+              :showTotal="ipagination.showTotal"
+              style="float:right"
+              v-if="dataSource.length > 0"
+              showQuickJumper
+              :pageSize.sync="ipagination.pageSize"
+              :total="ipagination.total"
+              v-model="ipagination.current"
+              @change="getDataSource"
+            />
+          </div>
+          <div
+            v-else
+            style="width:100%;height:400px;display:flex;justify-content: center;align-items: center;"
+          >
+            <img
+              src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1575627350102&di=02972956f2243933bffc0d85099adbfe&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D1095310825%2C1528244349%26fm%3D214%26gp%3D0.jpg"
+              alt
+              v-if="!loading"
+            />
+            <div v-else ></div>
+          </div>
+        </a-spin>
       </a-tab-pane>
     </a-tabs>
     <a-modal title="封面上传" @cancel="closeImage" @afterClose="closeImage" v-model="addImageVisible">
@@ -2731,8 +2733,8 @@ export default {
     removeUpload() {
       this.form.setFieldsValue({
         contentTagList: null,
-        modalityTagList:null,
-        modTagList:null,
+        modalityTagList: null,
+        modTagList: null,
         senceTagList: null,
       })
     },

+ 2 - 2
vue.config.js

@@ -60,7 +60,7 @@ module.exports = {
       '/jeecg-boot': {
         //  target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
-        target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
+        // target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.94:8088', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震
@@ -69,7 +69,7 @@ module.exports = {
         // target: 'http://192.168.1.74:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.170:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+         target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
          // target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目