Эх сурвалжийг харах

Merge remote-tracking branch 'origin/demo_' into demo_

3254194295 2 жил өмнө
parent
commit
dfb22eb9ae

+ 1 - 1
src/views/activiti/History.vue

@@ -170,7 +170,7 @@ export default {
           const images = res.data.images
           this.image1 = 'data:image/png;base64,' + images[0]
           this.image2 = 'data:image/png;base64,' + images[1]
-          this.timer = setInterval(this.showImage(), 1000)
+          this.timer = setInterval(this.showImage, 1000)
         }).catch(() => {
           this.confirmLoading = false
         })

+ 14 - 1
src/views/activiti/user-model/ActivitiUserModel.vue

@@ -84,7 +84,7 @@
         </span>
       </s-table>
     </div>
-    <base-form ref="baseModal" @ok="handleOk"/>
+    <base-form ref="baseModal" :roleList="roleList" :treeData="treeData" @ok="handleOk"/>
     <detail ref="detailModal" @ok="handleOk"/>
   </a-card>
 </template>
@@ -94,6 +94,8 @@ import { STable, Ellipsis } from '@/components'
 import BaseForm from './modules/BaseForm'
 import Detail from './modules/Detail'
 import { getActivitiUserModelPage, deleteActivitiUserModels, fetchActivitiUserModel, exportActivitiUserModel } from '@/api/activiti/user-model'
+import { queryRole } from '@/api/upms/role'
+import { getDeptTree } from '@/api/upms/dept'
 
 export default {
   name: 'ActivitiUserModelList',
@@ -113,6 +115,8 @@ export default {
     return {
       advanced: false,
       visible: true,
+      roleList: [],
+      treeData: [],
       // 查询参数
       queryParam: {
       },
@@ -202,8 +206,17 @@ export default {
     // 下拉框map
     this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.ACTIVITI_USER_MODEL_TYPE)
     this.tableOption()
+    getDeptTree().then(res => {
+      this.treeData = res.data
+    })
+    this.getRoles()
   },
   methods: {
+    getRoles () {
+      queryRole({ status: 1 }).then(res => {
+        this.roleList = res.data
+      })
+    },
     tableOption () {
       if (!this.optionAlertShow) {
         this.options = {

+ 20 - 14
src/views/activiti/user-model/modules/BaseForm.vue

@@ -128,7 +128,7 @@
               style="width: 70%"
               :show-search="true"
               :filter-option="BaseTool.ANTD.selectFilterOption"
-              v-model="roleIdList"
+              v-decorator="['roleIdsList', {rules: [{required: false, message: '流程变量不能为空'}]}]"
               mode="multiple">
               <a-select-option
                 v-for="item in roleList"
@@ -174,8 +174,6 @@
 import pick from 'lodash.pick'
 import { addActivitiUserModel, updateActivitiUserModel } from '@/api/activiti/user-model'
 import UserSelectModal from '@/views/upms/user/modules/UserSelectModal'
-import { getDeptTree } from '@/api/upms/dept'
-import { queryRole } from '@/api/upms/role'
 export default {
   name: 'BaseActivitiUserModel',
   components: {
@@ -187,32 +185,35 @@ export default {
       modalTitle: null,
       form: this.$form.createForm(this),
       visible: false,
-      treeData: [],
       roleIdList: [],
       checkedKeys: [],
       autoExpandParent: true,
       expandedKeys: [],
       selectedKeys: [],
-      roleList: [],
+      roleIdsList: [],
       // 下拉框map
       typeMap: {},
       visibleOne: true
     }
   },
-  props: {},
+  props: {
+    roleList: {
+      type: Array,
+      default: () => ({})
+    },
+    treeData: {
+      type: Array,
+      default: () => ({})
+    }
+  },
   created () {
     // 下拉框map
     this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.ACTIVITI_USER_MODEL_TYPE)
-    getDeptTree().then(res => {
-      this.treeData = res.data
-    })
-    queryRole({ status: 1 }).then(res => {
-      this.roleList = res.data
-    })
   },
   methods: {
     base (record) {
       this.visible = true
+      this.form.resetFields()
       // 如果是空标识添加
       if (this.BaseTool.Object.isBlank(record)) {
         this.modalTitle = '添加'
@@ -223,7 +224,11 @@ export default {
       if (!this.BaseTool.Object.isBlank(record.sbList)) {
         this.sbList = JSON.parse(record.sbList)
       }
+      /* if (!this.BaseTool.Object.isBlank(record.roleIdList)) {
+        record.roleIdList = JSON.parse(record.roleIdList)
+      } */
       // 日期处理
+      // setFieldsValue(pick(record, ['id', 'reModelId', 'name', 'type', 'assignee', 'roleId', 'deptId', 'realName', 'formVariable', 'remark', 'roleIdsList']))
       this.$nextTick(() => {
         setFieldsValue(Object.assign(pick(record, [
           'id',
@@ -235,7 +240,8 @@ export default {
           'deptId',
           'realName',
           'formVariable',
-          'remark'
+          'remark',
+          'roleIdsList'
         ])))
       })
     },
@@ -248,7 +254,7 @@ export default {
           return
         }
         // 日期处理
-        values.roleIdList = JSON.stringify(this.roleIdList)
+        values.roleIdList = JSON.stringify(values.roleIdsList)
         if (this.BaseTool.String.isBlank(values.id)) {
           addActivitiUserModel(values)
             .then(() => {

+ 4 - 3
src/views/repair/application-form/RepairForm.vue

@@ -110,13 +110,13 @@
               v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-dispatch')"
               @click="handleDispatching(record)" >派工</operation-button>-->
             <operation-button
-              v-show='dispatchFlag'
+              v-show="dispatchFlag"
               v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-dispatch')"
               @click="handleAssign(record)" >派工</operation-button>
             <operation-button
-              v-show='!dispatchFlag'
+              v-show="!dispatchFlag"
               v-if="$auth('repair-application-forms-deal') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status)"
-              :type='2'
+              :type="2"
               title="是否要接收?"
               @confirm="handleReceive(record)">接收</operation-button>
           </template>
@@ -345,6 +345,7 @@ export default {
   },
   created () {
     const repairModel = this.DictCache.getConfigValueByType(this.DictCache.TYPE.REPAIR_STRATEGY_MODEL)
+    console.log(repairModel)
     if (repairModel === this.DictCache.VALUE.REPAIR_MODEL_TYPE.BASE_MODEL) {
       this.dispatchFlag = false
     }

+ 4 - 3
src/views/sb/scraps/SbAuditUnifyForm.vue

@@ -54,7 +54,7 @@
               icon="download"
               @click="doExport">导出
             </a-button>
-            <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('sb-scraps-del')">
+<!--            <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('sb-scraps-del')">
               <a-menu slot="overlay">
                 <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
                   <a-menu-item key="1">
@@ -66,7 +66,7 @@
                 批量操作
                 <a-icon type="down" />
               </a-button>
-            </a-dropdown>
+            </a-dropdown>-->
           </a-col>
         </a-row>
       </div>
@@ -106,6 +106,7 @@
             <operation-button
               :type="2"
               title="是否要终止审批?"
+              v-if="record.status == 2"
               @confirm="handleStop(record)">终止审批</operation-button>
           </template>
         </span>
@@ -490,7 +491,7 @@ export default {
     handleStop (record) {
       this.$message.info('正在终止审批流程,请勿重复点击')
       this.confirmLoading = true
-      stopSbInfoScrapForAudit({ id: record.id, processInstanceId: record.processInstanceId })
+      stopSbInfoScrapForAudit({ auditModelKey: record.remark, id: record.id, processInstanceId: record.processInstanceId })
         .then(() => {
           this.$message.info('已成功终止审批流程,可以重新发起审批')
           this.confirmLoading = false