Jelajahi Sumber

Merge branch 'master' of http://119.23.210.103:3000/wy/lh_firm_former

cfort 2 tahun lalu
induk
melakukan
324eb169c7

+ 13 - 1
src/api/platform/auth/resources.js

@@ -1,5 +1,5 @@
 import request from '@/utils/request'
 import request from '@/utils/request'
-import { AUTH_URL } from '@/api/baseUrl'
+import { AUTH_URL,CODEGEN_URL } from '@/api/baseUrl'
 
 
 /* 尝试变更树形结构的排序 */
 /* 尝试变更树形结构的排序 */
 export function treeSave(params) {
 export function treeSave(params) {
@@ -240,3 +240,15 @@ export function findUserResTreeCheckedBySys(params) {
     params: params
     params: params
   })
   })
 }
 }
+
+
+/**
+ * 获取代理管理数据
+ */
+ export function getAgmRoles(params) {
+    return request({
+      url: CODEGEN_URL() + '/bpm/agent/roles',
+      method: 'get',
+      params: params
+    })
+  }

+ 12 - 2
src/store/modules/ibps/modules/menu.js

@@ -2,7 +2,7 @@
 // 设置文件
 // 设置文件
 import setting from '@/setting.js'
 import setting from '@/setting.js'
 import menuUtil from '@/utils/menu'
 import menuUtil from '@/utils/menu'
-import { getMenuData } from '@/api/platform/auth/resources'
+import { getMenuData,getAgmRoles } from '@/api/platform/auth/resources'
 import { generateRoutes } from '@/router/utils'
 import { generateRoutes } from '@/router/utils'
 // 帮助类
 // 帮助类
 import Utils from '@/utils/util'
 import Utils from '@/utils/util'
@@ -48,8 +48,10 @@ export default {
      */
      */
     init({ state, commit, dispatch }, { systemId }) {
     init({ state, commit, dispatch }, { systemId }) {
       return new Promise(async(resolve, reject) => {
       return new Promise(async(resolve, reject) => {
+        let roles = await dispatch('getAgmRoleData')
         getMenuData({
         getMenuData({
-          systemId: systemId
+          systemId: systemId,
+          roles
         }).then(async res => {
         }).then(async res => {
           const data = res.data
           const data = res.data
           if (Utils.isEmpty(data)) {
           if (Utils.isEmpty(data)) {
@@ -79,6 +81,14 @@ export default {
         })
         })
       })
       })
     },
     },
+    getAgmRoleData(){
+        return new Promise((resolve, reject) => {
+            getAgmRoles().then(res => {
+                const data = res.data
+                resolve(data)
+            })
+        })
+    },
     menusSet({ state, dispatch }, menus) {
     menusSet({ state, dispatch }, menus) {
       state.menus = menus || []
       state.menus = menus || []
     },
     },

+ 162 - 43
src/views/platform/bpmn/bpmAgent/edit.vue

@@ -1,51 +1,91 @@
 <template>
 <template>
     <el-dialog :title="title" :visible.sync="dialogVisible" :close-on-click-modal="false" :close-on-press-escape="false" append-to-body class="bpmn-agent-dialog" width="80%" top="10vh" @open="getFormData" @close="closeDialog">
     <el-dialog :title="title" :visible.sync="dialogVisible" :close-on-click-modal="false" :close-on-press-escape="false" append-to-body class="bpmn-agent-dialog" width="80%" top="10vh" @open="getFormData" @close="closeDialog">
-        <el-form ref="agentForm" v-loading="dialogLoading" :element-loading-text="$t('common.loading')" :model="bpmAgent" :rules="rules" :label-width="formLabelWidth" @submit.native.prevent>
-            <el-image style="width: 400px; height: 500px; margin-left: 100px" :src="url" :preview-src-list="srcList"> </el-image>
-            <el-form-item label="标题:" prop="title">
-                <el-input v-if="!readonly" v-model="bpmAgent.title" />
-                <span v-else>{{ bpmAgent.title }}</span>
-            </el-form-item>
-            <el-row>
-                <el-col :span="12" col>
-                    <el-form-item label="代理类型:" prop="agentType">
-                        <el-radio-group v-if="!readonly" v-model="bpmAgent.agentType">
-                            <el-radio v-for="option in agentTypeOptions" :key="option.value" :label="option.value">{{ option.label }}</el-radio>
-                        </el-radio-group>
-                        <el-tag v-else :type="bpmAgent.agentType | optionsFilter(agentTypeOptions, 'type')">{{ bpmAgent.agentType | optionsFilter(agentTypeOptions, 'label') }}</el-tag>
+        <div style="padding: 15px">
+            <el-form ref="agentForm" v-loading="dialogLoading" :element-loading-text="$t('common.loading')" :model="bpmAgent" :rules="rules" :label-width="formLabelWidth" label-position="left" @submit.native.prevent>
+            <!-- <el-image style="width: 400px; height: 500px; margin-left: 100px" :src="url" :preview-src-list="srcList"> </el-image> -->
+            <el-row v-if="srcList.length > 0">
+                <el-col :span="24">
+                    <el-form-item label="代理人参考图片:">
+                        <div class="imageListClass">
+                            <div v-for="(item,index) in srcList" :key="index">
+                                <el-image :src="item" class="sinImageList" :preview-src-list="srcList" />
+                            </div>
+                        </div>
                     </el-form-item>
                     </el-form-item>
                 </el-col>
                 </el-col>
-                <el-col :span="12" col>
-                    <el-form-item label="是否启用:" prop="isEnabled">
-                        <el-switch v-if="!readonly" v-model="bpmAgent.isEnabled" active-value="enabled" inactive-value="disabled" />
-                        <el-tag v-else :type="bpmAgent.isEnabled | optionsFilter(statusOptions, 'type')">{{ bpmAgent.isEnabled | optionsFilter(statusOptions, 'label') }}</el-tag>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item label="标题:" prop="title">
+                        <el-input v-if="!readonly" v-model="bpmAgent.title" placeholder="请输入标题" />
+                        <span v-else>{{ bpmAgent.title }}</span>
                     </el-form-item>
                     </el-form-item>
                 </el-col>
                 </el-col>
             </el-row>
             </el-row>
-            <el-form-item label="委托人:" prop="delegatorId">
-                <ibps-employee-selector v-if="!readonly" v-model="bpmAgent.delegatorId" :orgAddId="orgAddId" :orgAddIndex="orgAddIndex" :orgAddList="orgAddList" @callback="callbackDelegatorrInfo" />
-                <span v-else>{{ bpmAgent.delegatorName }}</span>
-            </el-form-item>
-            <el-row>
-                <el-col :span="12" col>
-                    <el-form-item label="生效时间:" prop="effectiveTime">
-                        <el-date-picker v-if="!readonly" v-model="bpmAgent.effectiveTime" type="date" value-format="yyyy-MM-dd" style="width:100%;" />
+            <el-row :gutter="20">
+                <el-col :span="12">
+                    <el-form-item label="生效时间:" prop="effectiveTime">
+                        <el-date-picker v-if="!readonly" v-model="bpmAgent.effectiveTime" class="time" type="date" value-format="yyyy-MM-dd" placeholder="请选择生效时间" />
                         <span v-else>{{ bpmAgent.effectiveTime }}</span>
                         <span v-else>{{ bpmAgent.effectiveTime }}</span>
                     </el-form-item>
                     </el-form-item>
                 </el-col>
                 </el-col>
-                <el-col :span="12" col>
-                    <el-form-item label="失效时间:" prop="expiryTime">
-                        <el-date-picker v-if="!readonly" v-model="bpmAgent.expiryTime" type="date" value-format="yyyy-MM-dd" style="width:100%;" />
+                <el-col :span="12">
+                    <el-form-item label="失效时间" prop="expiryTime">
+                        <el-date-picker v-if="!readonly" v-model="bpmAgent.expiryTime" class="time" type="date" value-format="yyyy-MM-dd" placeholder="请选择失效时间" />
                         <span v-else>{{ bpmAgent.expiryTime }}</span>
                         <span v-else>{{ bpmAgent.expiryTime }}</span>
                     </el-form-item>
                     </el-form-item>
                 </el-col>
                 </el-col>
             </el-row>
             </el-row>
+            <el-row :gutter="20">
+                <el-col :span="12">
+                    <el-form-item label="委托人:" prop="delegatorId">
+                        <ibps-employee-selector v-if="!readonly" v-model="bpmAgent.delegatorId" :orgAddId="orgAddId" :orgAddIndex="orgAddIndex" :orgAddList="orgAddList" @callback="callbackDelegatorrInfo" />
+                        <span v-else>{{ bpmAgent.delegatorName }}</span>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                    <el-form-item v-if="bpmAgent.agentType === 'all' || bpmAgent.agentType === 'part'" label="代理人:" prop="agenterId">
+                        <ibps-employee-selector v-if="!readonly" v-model="bpmAgent.agenterId" :orgAddId="orgAddId" :orgAddIndex="orgAddIndex" :orgAddList="orgAddList" @callback="callbackAgenterInfo" />
+                        <span v-else>{{ bpmAgent.agenterName }}</span>
+                    </el-form-item>
+                </el-col>
+            </el-row>
 
 
             <!-- 全部代理 || 部分代理 -->
             <!-- 全部代理 || 部分代理 -->
-            <el-form-item v-if="bpmAgent.agentType === 'all' || bpmAgent.agentType === 'part'" label="代理人:" prop="agenterId">
-                <ibps-employee-selector v-if="!readonly" v-model="bpmAgent.agenterId" :orgAddId="orgAddId" :orgAddIndex="orgAddIndex" :orgAddList="orgAddList" @callback="callbackAgenterInfo" />
-                <span v-else>{{ bpmAgent.agenterName }}</span>
-            </el-form-item>
+
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item label="委托人角色:">
+                        <el-checkbox-group v-if="!readonly" v-model="checkRoleList">
+                            <el-checkbox v-for="item in roleList" :key="item.id" :label="item.id">{{ item.name }}</el-checkbox>
+                        </el-checkbox-group>
+                        <span v-else>{{ bpmAgent.roleName }}</span>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item label="代理人角色:">
+                        <span>{{ daiRoleName }}</span>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row :gutter="20">
+                <el-col :span="12" col>
+                    <el-form-item label="代理类型:" prop="agentType">
+                        <el-radio-group v-if="!readonly" v-model="bpmAgent.agentType">
+                            <el-radio v-for="option in agentTypeOptions" :key="option.value" :label="option.value">{{ option.label }}</el-radio>
+                        </el-radio-group>
+                        <el-tag v-else :type="bpmAgent.agentType | optionsFilter(agentTypeOptions, 'type')">{{ bpmAgent.agentType | optionsFilter(agentTypeOptions, 'label') }}</el-tag>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="12" col>
+                    <el-form-item label="是否启用:" prop="isEnabled">
+                        <el-switch v-if="!readonly" v-model="bpmAgent.isEnabled" active-value="enabled" inactive-value="disabled" />
+                        <el-tag v-else :type="bpmAgent.isEnabled | optionsFilter(statusOptions, 'type')">{{ bpmAgent.isEnabled | optionsFilter(statusOptions, 'label') }}</el-tag>
+                    </el-form-item>
+                </el-col>
+            </el-row>
 
 
             <div v-if="bpmAgent.agentType === 'part'">
             <div v-if="bpmAgent.agentType === 'part'">
                 <el-form-item label="流程定义">
                 <el-form-item label="流程定义">
@@ -97,6 +137,8 @@
                 </el-form-item>
                 </el-form-item>
             </div>
             </div>
         </el-form>
         </el-form>
+        </div>
+
         <div slot="footer" class="el-dialog--center">
         <div slot="footer" class="el-dialog--center">
             <ibps-toolbar :actions="toolbars" @action-event="handleActionEvent" />
             <ibps-toolbar :actions="toolbars" @action-event="handleActionEvent" />
         </div>
         </div>
@@ -115,6 +157,7 @@ import BpmDefinitionSelector from '@/business/platform/bpmn/definition/selector'
 import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
 import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
 import Condition from './condition'
 import Condition from './condition'
 import { setTimeout } from 'timers'
 import { setTimeout } from 'timers'
+import { load } from '@/api/platform/org/employee'
 
 
 export default {
 export default {
     components: {
     components: {
@@ -137,7 +180,7 @@ export default {
     data() {
     data() {
         return {
         return {
             formName: 'agentForm',
             formName: 'agentForm',
-            formLabelWidth: '120px',
+            formLabelWidth: '110px',
             dialogVisible: this.visible,
             dialogVisible: this.visible,
             conditionDialogVisible: false, // 条件规则界面
             conditionDialogVisible: false, // 条件规则界面
             dialogLoading: false,
             dialogLoading: false,
@@ -160,7 +203,8 @@ export default {
                 agentType: 'all',
                 agentType: 'all',
                 isEnabled: 'enabled',
                 isEnabled: 'enabled',
                 bpmAgentDefPoList: [],
                 bpmAgentDefPoList: [],
-                bpmAgentConditionPoList: []
+                bpmAgentConditionPoList: [],
+                bpmAgentRoleList: []
             },
             },
             rules: {
             rules: {
                 title: [
                 title: [
@@ -190,7 +234,12 @@ export default {
                     value: 'org',
                     value: 'org',
                     label: '机构'
                     label: '机构'
                 }
                 }
-            ]
+            ],
+            roleList: [],
+            yuanRoleList: [],
+            checkRoleList: [],
+            daiRoleName: '',
+            daiRoleList: []
         }
         }
     },
     },
     computed: {
     computed: {
@@ -204,6 +253,20 @@ export default {
                 this.dialogVisible = this.visible
                 this.dialogVisible = this.visible
             },
             },
             immediate: true
             immediate: true
+        },
+        'bpmAgent.delegatorId': {
+            handler: function (val, oldVal) {
+                this.getWeiTuo(this.bpmAgent.delegatorId, 1)
+            },
+            immediate: true,
+            deep: true
+        },
+        'bpmAgent.agenterId': {
+            handler: function (val, oldVal) {
+                this.getWeiTuo(this.bpmAgent.agenterId, 2)
+            },
+            immediate: true,
+            deep: true
         }
         }
     },
     },
     created() {
     created() {
@@ -309,6 +372,10 @@ export default {
                 ActionUtils.error('流程定义数据不能为空!')
                 ActionUtils.error('流程定义数据不能为空!')
                 return
                 return
             }
             }
+            this.bpmAgent.bpmAgentRoleList = this.checkRoleList
+            if(this.getVerification()){
+                return
+            }
             save(this.bpmAgent)
             save(this.bpmAgent)
                 .then((response) => {
                 .then((response) => {
                     this.$emit('callback', this)
                     this.$emit('callback', this)
@@ -329,6 +396,9 @@ export default {
         closeDialog() {
         closeDialog() {
             this.$emit('close', false)
             this.$emit('close', false)
             this.$refs[this.formName].resetFields()
             this.$refs[this.formName].resetFields()
+            this.daiRoleName = ''
+            this.roleList = []
+            this.checkRoleList = []
         },
         },
         /**
         /**
          * 表单验证
          * 表单验证
@@ -355,7 +425,7 @@ export default {
             })
             })
                 .then((response) => {
                 .then((response) => {
                     this.bpmAgent = response.data
                     this.bpmAgent = response.data
-                    console.log(this.bpmAgent)
+                    this.checkRoleList = response.data.bpmAgentRoleList || []
                     this.formValidate()
                     this.formValidate()
                     this.dialogLoading = false
                     this.dialogLoading = false
                 })
                 })
@@ -367,10 +437,14 @@ export default {
             alert('打开流程选择器')
             alert('打开流程选择器')
         },
         },
         callbackDelegatorrInfo(data) {
         callbackDelegatorrInfo(data) {
+            this.checkRoleList = []
             this.bpmAgent.delegatorName = data.name
             this.bpmAgent.delegatorName = data.name
+            this.getVerification()
         },
         },
         callbackAgenterInfo(data) {
         callbackAgenterInfo(data) {
+            this.checkRoleList = []
             this.bpmAgent.agenterName = data.name
             this.bpmAgent.agenterName = data.name
+            this.getVerification()
         },
         },
         updateDefine(data) {
         updateDefine(data) {
             this.rowLoading = true
             this.rowLoading = true
@@ -416,14 +490,51 @@ export default {
             let sql2 = `select FILE_PATH_ from ibps_file_attachment where ID_ = '${id}'`
             let sql2 = `select FILE_PATH_ from ibps_file_attachment where ID_ = '${id}'`
             Promise.all([curdPost('sql', sql1), curdPost('sql', sql2)]).then(([res1, res2]) => {
             Promise.all([curdPost('sql', sql1), curdPost('sql', sql2)]).then(([res1, res2]) => {
                 if (res1.state == 200 && res2.state == 200) {
                 if (res1.state == 200 && res2.state == 200) {
-                    let datas1 = res1.variables.data
-                    let datas2 = res2.variables.data
-                    let ip = datas1[0].nei_rong_
-                    let image = datas2[0].FILE_PATH_
-                    this.url = ip + '/' + image
-                    this.srcList[0] = this.url
+                    const datas1 = res1.variables.data
+                    const datas2 = res2.variables.data
+                    const ip = datas1[0].nei_rong_
+                    const imageList = datas2.map(item => {
+                        return ip + '/' + item.FILE_PATH_
+                    })
+                    this.srcList = imageList
                 }
                 }
             })
             })
+        },
+        getWeiTuo(id, type = 1, formId = '') {
+            if (!id) return
+            return new Promise((resolve, reject) => {
+                load({ employeeId: id })
+                    .then((response) => {
+                        const data = response
+                        const partyRole = response.variables.partyRoles
+                        if (type === 1) {
+                            this.yuanRoleList = partyRole || []
+                        }
+                        if (type === 2) {
+                            this.daiRoleList = partyRole || []
+                            const roleName = partyRole.map((item) => item.name)
+                            this.daiRoleName = roleName.join(',')
+                        }
+                        this.getRoleList()
+                        resolve(data)
+                    }).catch(() => {})
+            })
+        },
+        getRoleList(){
+            if(this.yuanRoleList.length > 0 && this.daiRoleList.length > 0){
+                this.roleList = this.yuanRoleList.filter(item => {
+                    return !this.daiRoleList.some(it => it.id == item.id)
+                })
+                console.log(this.yuanRoleList.length,this.roleList.length)
+            }
+        },
+        getVerification(){
+            if(this.bpmAgent.agenterId == this.bpmAgent.delegatorId){
+                this.$message.error('委托人和代理人是同一个账号,请重新选择。')
+                return true
+            }else{
+                return false
+            }
         }
         }
     }
     }
 }
 }
@@ -446,6 +557,14 @@ export default {
 <style scoped>
 <style scoped>
 .imageListClass {
 .imageListClass {
     display: flex;
     display: flex;
-    justify-content: center;
+    flex-wrap: wrap;
+}
+.time {
+    width: 100%;
+}
+.sinImageList{
+    width: 150px;
+    height: 150px;
+    margin: 10px;
 }
 }
 </style>
 </style>

+ 674 - 501
src/views/platform/bpmn/bpmInstHis/oldFilesUploadList.vue

@@ -1,542 +1,715 @@
 <template>
 <template>
-  <div class="main-container">
-    <div slot="west">
-      <ibps-type-tree :width="width"
-                      :height="height"
-                      title="记录分类"
-                      :location="location"
-                      category-key="OLDRECORD_TYPE"
-                      @node-click="handleNodeClick"
-                      @expand-collapse="handleExpandCollapse" />
-    </div>
-    <ibps-crud ref="crud"
-               :style="{ marginLeft: width + 'px' }"
-               :height="height"
-               :data="listData"
-               :toolbars="listConfig.toolbars"
-               :search-form="listConfig.searchForm"
-               :pk-key="pkKey"
-               :displayField="tableTitle"
-               :columns="listConfig.columns"
-               :loading="loading"
-               :index-row="false"
-               :pagination="pagination"
-               :selection-row="selection"
-               @action-event="handleAction"
-               @sort-change="handleSortChange"
-               @pagination-change="handlePaginationChange">
-
-      <template slot="wenjinachayue"
-                slot-scope="scope">
-        <ibps-attachment :value="scope.row.fu_jian_"
-                         readonly
-                         allow-download
-                         :download="false"
-                         :multiple=true />
-      </template>
-    </ibps-crud>
-    <bpmn-formrender :visible="dialogFormVisible"
-                     :template-key="templateKey"
-                     :def-id="defId"
-                     :pk-value="pkValue"
-                     :form-key="formKey"
-                     :addDataCont="addDataCont"
-                     @close="visible => dialogFormVisible = visible" />
-
-    <el-dialog :close-on-click-modal="false"
-               :close-on-press-escape="false"
-               :top="'3vh'"
-               :width="'90%'"
-               class="js-custom-dialog"
-               append-to-body
-               :fullscreen="false"
-               :visible.sync="visible">
-      <iframe :src="srcUrl"
-              :height="'100%'"
-              :width="'100%'"
-              frameborder="0"
-              scrolling="no" />
-    </el-dialog>
-
-  </div>
+    <div class="main-container">
+        <div slot="west">
+            <ibps-type-tree
+                :width="width"
+                :height="height"
+                title="记录分类"
+                :location="location"
+                category-key="OLDRECORD_TYPE"
+                @node-click="handleNodeClick"
+                @expand-collapse="handleExpandCollapse"
+            />
+        </div>
+        <ibps-crud
+            ref="crud"
+            :style="{ marginLeft: width + 'px' }"
+            :height="height"
+            :data="listData"
+            :toolbars="listConfig.toolbars"
+            :search-form="listConfig.searchForm"
+            :pk-key="pkKey"
+            :displayField="tableTitle"
+            :columns="listConfig.columns"
+            :loading="loading"
+            :index-row="false"
+            :pagination="pagination"
+            :selection-row="selection"
+            @action-event="handleAction"
+            @sort-change="handleSortChange"
+            @pagination-change="handlePaginationChange"
+        >
+            <template slot="wenjinachayue" slot-scope="scope">
+                <ibps-attachment
+                    :value="scope.row.fu_jian_"
+                    readonly
+                    allow-download
+                    :download="false"
+                    :multiple="true"
+                />
+            </template>
+        </ibps-crud>
+        <bpmn-formrender
+            :visible="dialogFormVisible"
+            :template-key="templateKey"
+            :def-id="defId"
+            :pk-value="pkValue"
+            :form-key="formKey"
+            :addDataCont="addDataCont"
+            @close="(visible) => (dialogFormVisible = visible)"
+        />
 
 
+        <el-dialog
+            :close-on-click-modal="false"
+            :close-on-press-escape="false"
+            :top="'3vh'"
+            :width="'90%'"
+            class="js-custom-dialog"
+            append-to-body
+            :fullscreen="false"
+            :visible.sync="visible"
+        >
+            <iframe
+                :src="srcUrl"
+                :height="'100%'"
+                :width="'100%'"
+                frameborder="0"
+                scrolling="no"
+            />
+        </el-dialog>
+    </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import ActionUtils from '@/utils/action'
-import IbpsTypeTree from '@/business/platform/cat/type/tree'
-import FixHeight from '@/mixins/height'
-import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
-import curdPost from '@/business/platform/form/utils/custom/joinCURD.js' //增删改查规则
-import IbpsAttachment from '@/business/platform/file/attachment/selector'
-import GetReport from './corresponding/getReport.js'
-import { number } from 'echarts/lib/export.js'
-export default {
-  components: {
-    IbpsTypeTree,
-    BpmnFormrender,
-    'ibps-attachment': IbpsAttachment
-  },
-  mixins: [FixHeight, GetReport],
-  props: {
-    location: {
-      type: String,
-      default: 'initial'
-    }
-  },
-  data() {
-    return {
-      width: 200,
-      selection: false,
-      dialogFormVisible: false, // 弹窗
-      defId: '', // 添加dialog需要使用
-      addDataCont: {},
-      pkKey: 'id_', // 主键  如果主键不是pk需要传主键
-      formKey: 'ywyxjl', // 编辑dialog需要使用
-      pkValue: '',
-      templateKey: 'ywyxjlsc',
-      tableTitle: '',
-      typeId: '',
-      listType: '',
-      srcUrl: '', //报表字段
-      fuJian: '',//文件字段
-      isDisable: false, //判断多次点击
-      forClick: '',//判断是否重复点击
-      visible: false,
-      currReportCont: {},
-      title: '',
-      loading: true,
-      height: document.clientHeight,
-      reportAll: [],
-      listData: [],
-      bianlistData: {
-        dataResult: [],
-        pageResult: {
-          limit: 0,
-          page: 0,
-          totalCount: 0,
-          totalPages: 0
-        }
-      },
-      selectListData: [],
-      pagination: {
-        limit: 20, page: 1
-      },
-      paginations: 20,
-      page: 1,
-      sorts: {NIAN_DU_: "desc"},
-      depth: '', // 分类栏层级
-      treeData: [], // 分类栏数据
-      guanJian: '',
-      niandu: '', // 年度
-      startTime: '', // 开始时间
-      endTime: '', // 结束时间
-      listOptions: {
-        border: true,
-        stripe: true
-      },
-      listConfig: {
-        toolbars: [
-          { key: 'search' },
-          // { key: 'add' },
-          // { key: 'detail' },
-          // { key: 'resetSearch' }
-        ],
-        searchForm: {
-          forms: [
-            { prop: 'guanJian', label: '关键字:', width: 50 },
-            { prop: 'nianDu', label: '年度:', width: 50 },
-            { prop: 'bianZhiShiJian', label: '上传时间:', fieldType: 'daterange', width: 225 },
+import ActionUtils from "@/utils/action";
+import IbpsTypeTree from "@/business/platform/cat/type/tree";
+import FixHeight from "@/mixins/height";
+import BpmnFormrender from "@/business/platform/bpmn/form/dialog";
+import curdPost from "@/business/platform/form/utils/custom/joinCURD.js"; //增删改查规则
+import IbpsAttachment from "@/business/platform/file/attachment/selector";
+import GetReport from "./corresponding/getReport.js";
+import { downloadFile } from "@/business/platform/file/utils";
 
 
-          ]
-        },
-        // 表格字段配置
-        columns: [
-          { prop: 'nian_du_', label: '年度', width: 80, dateFormat: 'yyyy', sortable: 'custom' },
-          { prop: 'fen_lei_', label: '记录表单分类', width: 120 },
-          { prop: 'biao_dan_ming_che', label: '表单名称', width: 350 },
-          { prop: 'shi_wu_shuo_ming_', label: '事务说明', width: 350 },
-
-          { prop: 'bian_zhi_shi_jian', label: '上传时间', width: 100 },
-          //   { prop: 'bm_name', label: '上传部门', width: 120 },
-          { prop: 'ry_name', label: '上传人', width: 100 },
-          { prop: 'fu_jian_', label: '附件', slotName: "wenjinachayue", width: 300 }
-        ],
-      }
-    }
-  },
-  created() {
-    this.loadData()
-    // this.getConfig() //获取配置的报表
-    let roleArr = this.$store.getters.userInfo.role
-    let pageName = this.$route.name
-    for (let i = 0; i < roleArr.length; i++) {
-      if (roleArr[i].name == "系统管理角色" && pageName == 'wjkzgl-ywyxjlsc') {
-        this.listConfig.toolbars.push({ key: 'remove' })
-        // this.listConfig.toolbars.push({ key: 'edit' })
-        this.selection = true
-        return;
-      }
-    }
-  },
-  methods: {
-    /*获取配置报表数据*/
-    getConfig() {
-      curdPost('select', this.packNameWhere('t_lcidglbdbb', { '1': '1' })).then(response => {
-        this.reportAll = response.variables.data
-      })
-    },
-    /* 封装表名与条件*/
-    packNameWhere(name, where) {
-      let cont = {}
-      cont['tableName'] = name
-      cont['paramWhere'] = where
-      return cont
+export default {
+    components: {
+        IbpsTypeTree,
+        BpmnFormrender,
+        "ibps-attachment": IbpsAttachment,
     },
     },
-    openTask(id) {
-      this.dialogFormVisible = true
-      this.defId = id
-      this.addDataCont = { fenLei: this.tableTitle, fenLeiId: this.typeId }
+    mixins: [FixHeight, GetReport],
+    props: {
+        location: {
+            type: String,
+            default: "initial",
+        },
     },
     },
-    // 加载数据
-    loadData() {
-      this.loading = true
-      let typeWheres = []
-      let typeWhere = ''
-      let startTimeWhere = this.startTime ? (
-        this.endTime ? ` bian_zhi_shi_jian between '${this.startTime}' and '${this.endTime}'` : ` bian_zhi_shi_jian between '${this.startTime}' and '2099-01-01'`
-      ) : (
-        this.endTime ? ` bian_zhi_shi_jian between '1949-10-01' and '${this.endTime}'` : ``
-      )
+    data() {
+        return {
+            width: 200,
+            selection: false,
+            dialogFormVisible: false, // 弹窗
+            defId: "", // 添加dialog需要使用
+            addDataCont: {},
+            pkKey: "id_", // 主键  如果主键不是pk需要传主键
+            formKey: "ywyxjl", // 编辑dialog需要使用
+            pkValue: "",
+            templateKey: "ywyxjlsc",
+            tableTitle: "",
+            typeId: "",
+            listType: "",
+            srcUrl: "", //报表字段
+            fuJian: "", //文件字段
+            isDisable: false, //判断多次点击
+            forClick: "", //判断是否重复点击
+            visible: false,
+            currReportCont: {},
+            title: "",
+            loading: true,
+            height: document.clientHeight,
+            reportAll: [],
+            listData: [],
+            bianlistData: {
+                dataResult: [],
+                pageResult: {
+                    limit: 0,
+                    page: 0,
+                    totalCount: 0,
+                    totalPages: 0,
+                },
+            },
+            selectListData: [],
+            pagination: {
+                limit: 20,
+                page: 1,
+            },
+            paginations: 20,
+            page: 1,
+            sorts: { NIAN_DU_: "desc" },
+            depth: "", // 分类栏层级
+            treeData: [], // 分类栏数据
+            guanJian: "",
+            niandu: "", // 年度
+            startTime: "", // 开始时间
+            endTime: "", // 结束时间
+            listOptions: {
+                border: true,
+                stripe: true,
+            },
+            listConfig: {
+                toolbars: [
+                    { key: "search" },
+                    // { key: 'add' },
+                    // { key: 'detail' },
+                    // { key: 'resetSearch' }
+                ],
+                searchForm: {
+                    forms: [
+                        { prop: "guanJian", label: "关键字:", width: 50 },
+                        { prop: "nianDu", label: "年度:", width: 50 },
+                        {
+                            prop: "bianZhiShiJian",
+                            label: "上传时间:",
+                            fieldType: "daterange",
+                            width: 225,
+                        },
+                    ],
+                },
+                // 表格字段配置
+                columns: [
+                    {
+                        prop: "nian_du_",
+                        label: "年度",
+                        width: 80,
+                        dateFormat: "yyyy",
+                        sortable: "custom",
+                    },
+                    { prop: "fen_lei_", label: "记录表单分类", width: 120 },
+                    {
+                        prop: "biao_dan_ming_che",
+                        label: "表单名称",
+                        width: 350,
+                    },
+                    {
+                        prop: "shi_wu_shuo_ming_",
+                        label: "事务说明",
+                        width: 350,
+                    },
 
 
-      // 第一级目录
-      if (this.depth == '0') {
-
-        let nianduWhere = this.niandu ? (
-          startTimeWhere ? ` where  nian_du_ like '%${this.niandu}%' and` + startTimeWhere : ` where  nian_du_ like '%${this.niandu}%'`
-        ) : (
-          startTimeWhere ? ' where ' + startTimeWhere : ''
-        )
-        let where = nianduWhere ? (this.guanJian ? nianduWhere + ` and (biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%')` : nianduWhere) : (
-          this.guanJian ? ` where biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%'` : ''
-        )
-        let sql = 'select * FROM t_ywyxjlb jl  LEFT JOIN lh_bm_ry ry ON ry.ry_id  = jl.bian_zhi_ren_' + where + ` order by nian_du_ ${this.sorts.NIAN_DU_}, bian_zhi_shi_jian desc`
-        curdPost('sql', sql).then(response => {
-          let tableDatas = response.variables.data
-          if (tableDatas.length !== 0) {
-            this.selectListData = JSON.parse(JSON.stringify(tableDatas))
-            let filterDatas = []
-            this.bianlistData.pageResult.totalCount = tableDatas.length
-            this.bianlistData.pageResult.totalPages = Math.ceil(tableDatas.length / this.pagination.limit)
-            this.bianlistData.pageResult.limit = this.pagination.limit
-            this.bianlistData.pageResult.page = this.pagination.page
-            if (this.pagination.limit > tableDatas.length) {
-              filterDatas = JSON.parse(JSON.stringify(tableDatas))
-            } else {
-              for (let index = 0; index < 20; index++) {
-                filterDatas.push(tableDatas[index])
-              }
-            }
-            this.bianlistData.dataResult = filterDatas
-            ActionUtils.handleListData(this, this.bianlistData)
-          } else {
-            ActionUtils.handleListData(this, [])
-            this.pagination.limit = 20
-            this.pagination.page = 1
-          }
-          this.loading = false
-        }).catch(() => {
-          this.loading = false
-        })
-      } else {
-        // 筛选出下级目录
-        let erji = this.treeData.filter(el => {
-          return el.parentId === this.typeId
-        })
-        if (erji.length !== 0) {
-          // 第二级目录
-          erji.forEach(el => typeWheres.push(el.id))
-          typeWhere = "'" + typeWheres.join("','") + "'"
-        } else {
-          // 第三级目录  
-          typeWhere = this.typeId
-        }
-
-        let nianduWhere = this.niandu ? (
-          startTimeWhere ? ` where  nian_du_ like '%${this.niandu}%' and` + startTimeWhere : ` where  nian_du_ like '%${this.niandu}%'`
-        ) : (
-          startTimeWhere ? ' where ' + startTimeWhere : ''
-        )
-        let idwhere = typeWhere ? (
-          nianduWhere ? nianduWhere + ` and fen_lei_id_ in (${typeWhere})` : ` where fen_lei_id_ in (${typeWhere})`
-        ) : (
-          nianduWhere ? nianduWhere : ``
-        )
-        let where = idwhere ? (this.guanJian ? idwhere + ` and (biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%')` : idwhere) : (
-          this.guanJian ? ` where biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%'` : ''
-        )
-        let sql = `select * FROM t_ywyxjlb jl  LEFT JOIN lh_bm_ry ry ON ry.ry_id  = jl.bian_zhi_ren_   ` + where + ` order by nian_du_ ${this.sorts.NIAN_DU_},bian_zhi_shi_jian desc`
-        console.log('22222')
-
-        curdPost('sql', sql).then(response => {
-          let tableDatas = response.variables.data
-          if (tableDatas.length !== 0) {
-            this.selectListData = JSON.parse(JSON.stringify(tableDatas))
-            let filterDatas = []
-            this.bianlistData.pageResult.totalCount = tableDatas.length
-            this.bianlistData.pageResult.totalPages = Math.ceil(tableDatas.length / this.pagination.limit)
-            this.bianlistData.pageResult.limit = this.pagination.limit
-            this.bianlistData.pageResult.page = this.pagination.page
-            if (this.pagination.limit > tableDatas.length) {
-              filterDatas = JSON.parse(JSON.stringify(tableDatas))
-            } else {
-              for (let index = 0; index < 20; index++) {
-                filterDatas.push(tableDatas[index])
-              }
-            }
-            this.bianlistData.dataResult = filterDatas
-            ActionUtils.handleListData(this, this.bianlistData)
-          } else {
-            ActionUtils.handleListData(this, [])
-            this.pagination.limit = 20
-            this.pagination.page = 1
-          }
-
-          this.loading = false
-        }).catch(() => {
-          this.loading = false
-        })
-      }
-    },
-    // getParenthesesStr(text) {
-    //         let result = ''
-    //         if (!text) return result
-    //         let regex = /\((.+?)\)/g;
-    //         let options = text.match(regex)
-    //         if (options) {
-    //                 let option = options[0]
-    //                 if (option) {
-    //                         result = option.substring(1, option.length - 1)
-    //                 }
-    //                 if (options[1]) {
-    //                         let yersOption = options[1]
-    //                         if (yersOption) {
-    //                                 result = result + '/' + yersOption.substring(1, yersOption.length - 1)
-    //                         }
-    //                 }
-    //         }
-    //         return result.split('/')
-    // },
-    /**
-     * 获取格式化参数
-     */
-    getSearcFormData() {
-      const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-      if (JSON.stringify(params) == "{}") {
-        this.guanJian = ''
-        this.niandu = '' // 年度
-        this.startTime = '' // 开始时间
-        this.endTime = '' // 结束时间
-      } else {
-        this.guanJian = params.guanJian ? params.guanJian : ''
-        this.niandu = params.nianDu ? params.nianDu : '' // 年度
-        this.startTime = params.b ? params.b : '' // 开始时间
-        this.endTime = params.i ? params.i : '' // 结束时间
-      }
+                    {
+                        prop: "bian_zhi_shi_jian",
+                        label: "上传时间",
+                        width: 100,
+                    },
+                    //   { prop: 'bm_name', label: '上传部门', width: 120 },
+                    { prop: "ry_name", label: "上传人", width: 100 },
+                    {
+                        prop: "fu_jian_",
+                        label: "附件",
+                        slotName: "wenjinachayue",
+                        width: 300,
+                    },
+                ],
+            },
+        };
     },
     },
-    /**
-     * 处理分页事件
-     */
-    handlePaginationChange(page) {
-      ActionUtils.setPagination(this.pagination, page)
-      this.bianlistData.pageResult.limit = page.limit
-      this.bianlistData.pageResult.page = page.page
-      let filterDatas = []
-      if (this.selectListData.length >= (page.limit * page.page)) {
-        for (let index = (page.limit * page.page) - page.limit; index < (page.limit * page.page); index++) {
-          filterDatas.push(this.selectListData[index])
+    created() {
+        this.loadData();
+        // this.getConfig() //获取配置的报表
+        let roleArr = this.$store.getters.userInfo.role;
+        let pageName = this.$route.name;
+        const isSuper = roleArr.some((so) => {
+            return so.name == "系统管理角色";
+        });
+        const isTrue = roleArr.some((so) => {
+            return (
+                so.name == "系统管理角色" ||
+                so.name == "实验室主任" ||
+                so.name == "档案管理员"
+            );
+        });
+        if (isSuper && pageName == "wjkzgl-ywyxjlsc") {
+            this.listConfig.toolbars.push({ key: "remove" });
+            // this.listConfig.toolbars.push({ key: 'edit' })
+            this.selection = true;
         }
         }
-        this.bianlistData.dataResult = JSON.parse(JSON.stringify(filterDatas))
-      } else {
-        for (let index = (page.limit * page.page) - page.limit; index < this.selectListData.length; index++) {
-          filterDatas.push(this.selectListData[index])
+
+        if (isTrue) {
+            this.listConfig.toolbars.push({ key: "export" });
+            this.selection = true;
         }
         }
-        this.bianlistData.dataResult = JSON.parse(JSON.stringify(filterDatas))
-      }
-      ActionUtils.handleListData(this, this.bianlistData)
     },
     },
+    methods: {
+        /*获取配置报表数据*/
+        getConfig() {
+            curdPost(
+                "select",
+                this.packNameWhere("t_lcidglbdbb", { 1: "1" })
+            ).then((response) => {
+                this.reportAll = response.variables.data;
+            });
+        },
+        /* 封装表名与条件*/
+        packNameWhere(name, where) {
+            let cont = {};
+            cont["tableName"] = name;
+            cont["paramWhere"] = where;
+            return cont;
+        },
+        openTask(id) {
+            this.dialogFormVisible = true;
+            this.defId = id;
+            this.addDataCont = {
+                fenLei: this.tableTitle,
+                fenLeiId: this.typeId,
+            };
+        },
+        // 加载数据
+        loadData() {
+            this.loading = true;
+            let typeWheres = [];
+            let typeWhere = "";
+            let startTimeWhere = this.startTime
+                ? this.endTime
+                    ? ` bian_zhi_shi_jian between '${this.startTime}' and '${this.endTime}'`
+                    : ` bian_zhi_shi_jian between '${this.startTime}' and '2099-01-01'`
+                : this.endTime
+                ? ` bian_zhi_shi_jian between '1949-10-01' and '${this.endTime}'`
+                : ``;
 
 
+            // 第一级目录
+            if (this.depth == "0") {
+                let nianduWhere = this.niandu
+                    ? startTimeWhere
+                        ? ` where  nian_du_ like '%${this.niandu}%' and` +
+                          startTimeWhere
+                        : ` where  nian_du_ like '%${this.niandu}%'`
+                    : startTimeWhere
+                    ? " where " + startTimeWhere
+                    : "";
+                let where = nianduWhere
+                    ? this.guanJian
+                        ? nianduWhere +
+                          ` and (biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%')`
+                        : nianduWhere
+                    : this.guanJian
+                    ? ` where biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%'`
+                    : "";
+                let sql =
+                    "select * FROM t_ywyxjlb jl  LEFT JOIN lh_bm_ry ry ON ry.ry_id  = jl.bian_zhi_ren_" +
+                    where +
+                    ` order by nian_du_ ${this.sorts.NIAN_DU_}, bian_zhi_shi_jian desc`;
+                curdPost("sql", sql)
+                    .then((response) => {
+                        let tableDatas = response.variables.data;
+                        if (tableDatas.length !== 0) {
+                            this.selectListData = JSON.parse(
+                                JSON.stringify(tableDatas)
+                            );
+                            let filterDatas = [];
+                            this.bianlistData.pageResult.totalCount =
+                                tableDatas.length;
+                            this.bianlistData.pageResult.totalPages = Math.ceil(
+                                tableDatas.length / this.pagination.limit
+                            );
+                            this.bianlistData.pageResult.limit =
+                                this.pagination.limit;
+                            this.bianlistData.pageResult.page =
+                                this.pagination.page;
+                            if (this.pagination.limit > tableDatas.length) {
+                                filterDatas = JSON.parse(
+                                    JSON.stringify(tableDatas)
+                                );
+                            } else {
+                                for (let index = 0; index < 20; index++) {
+                                    filterDatas.push(tableDatas[index]);
+                                }
+                            }
+                            this.bianlistData.dataResult = filterDatas;
+                            ActionUtils.handleListData(this, this.bianlistData);
+                        } else {
+                            ActionUtils.handleListData(this, []);
+                            this.pagination.limit = 20;
+                            this.pagination.page = 1;
+                        }
+                        this.loading = false;
+                    })
+                    .catch(() => {
+                        this.loading = false;
+                    });
+            } else {
+                // 筛选出下级目录
+                let erji = this.treeData.filter((el) => {
+                    return el.parentId === this.typeId;
+                });
+                if (erji.length !== 0) {
+                    // 第二级目录
+                    erji.forEach((el) => typeWheres.push(el.id));
+                    typeWhere = "'" + typeWheres.join("','") + "'";
+                } else {
+                    // 第三级目录
+                    typeWhere = this.typeId;
+                }
 
 
-    /**
-     * 查询
-     */
-    search() {
-      this.pagination.limit = 20
-      this.pagination.page = 1
-      this.getSearcFormData()
-      this.loadData()
-    },
-    /* 防止多次快速查询*/
-    numbersClick() {
-      this.isDisable = true
-      setTimeout(() => {
-        this.isDisable = false
-      }, 600)
-    },
+                let nianduWhere = this.niandu
+                    ? startTimeWhere
+                        ? ` where  nian_du_ like '%${this.niandu}%' and` +
+                          startTimeWhere
+                        : ` where  nian_du_ like '%${this.niandu}%'`
+                    : startTimeWhere
+                    ? " where " + startTimeWhere
+                    : "";
+                let idwhere = typeWhere
+                    ? nianduWhere
+                        ? nianduWhere + ` and fen_lei_id_ in (${typeWhere})`
+                        : ` where fen_lei_id_ in (${typeWhere})`
+                    : nianduWhere
+                    ? nianduWhere
+                    : ``;
+                let where = idwhere
+                    ? this.guanJian
+                        ? idwhere +
+                          ` and (biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%')`
+                        : idwhere
+                    : this.guanJian
+                    ? ` where biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%'`
+                    : "";
+                let sql =
+                    `select jl.*,file.file_name_,file.ext_  FROM t_ywyxjlb jl  LEFT JOIN lh_bm_ry ry ON ry.ry_id  = jl.bian_zhi_ren_  left join ibps_file_attachment file on jl.fu_jian_ = file.id_ ` +
+                    where +
+                    ` order by nian_du_ ${this.sorts.NIAN_DU_},bian_zhi_shi_jian desc`;
+
+                curdPost("sql", sql)
+                    .then((response) => {
+                        let tableDatas = response.variables.data;
+                        if (tableDatas.length !== 0) {
+                            this.selectListData = JSON.parse(
+                                JSON.stringify(tableDatas)
+                            );
+                            let filterDatas = [];
+                            this.bianlistData.pageResult.totalCount =
+                                tableDatas.length;
+                            this.bianlistData.pageResult.totalPages = Math.ceil(
+                                tableDatas.length / this.pagination.limit
+                            );
+                            this.bianlistData.pageResult.limit =
+                                this.pagination.limit;
+                            this.bianlistData.pageResult.page =
+                                this.pagination.page;
+                            if (this.pagination.limit > tableDatas.length) {
+                                filterDatas = JSON.parse(
+                                    JSON.stringify(tableDatas)
+                                );
+                            } else {
+                                for (let index = 0; index < 20; index++) {
+                                    filterDatas.push(tableDatas[index]);
+                                }
+                            }
+                            this.bianlistData.dataResult = filterDatas;
+                            ActionUtils.handleListData(this, this.bianlistData);
+                        } else {
+                            ActionUtils.handleListData(this, []);
+                            this.pagination.limit = 20;
+                            this.pagination.page = 1;
+                        }
 
 
-    /**
-     * 处理按钮事件
-     */
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case 'search':// 查询
-          ActionUtils.setFirstPagination(this.pagination)
-          this.search()
-          break
-        // case 'resetSearch':
-        //   this.typeId = ''
-        //   this.tableTitle = ''
-        //   this.search()
-        //   break
-        case 'remove':
-          let str = ""
-          selection.forEach((item, index) => {
-            if (index == 0) {
-              str += item
+                        this.loading = false;
+                    })
+                    .catch(() => {
+                        this.loading = false;
+                    });
+            }
+        },
+        // getParenthesesStr(text) {
+        //         let result = ''
+        //         if (!text) return result
+        //         let regex = /\((.+?)\)/g;
+        //         let options = text.match(regex)
+        //         if (options) {
+        //                 let option = options[0]
+        //                 if (option) {
+        //                         result = option.substring(1, option.length - 1)
+        //                 }
+        //                 if (options[1]) {
+        //                         let yersOption = options[1]
+        //                         if (yersOption) {
+        //                                 result = result + '/' + yersOption.substring(1, yersOption.length - 1)
+        //                         }
+        //                 }
+        //         }
+        //         return result.split('/')
+        // },
+        /**
+         * 获取格式化参数
+         */
+        getSearcFormData() {
+            const params = this.$refs["crud"]
+                ? this.$refs["crud"].getSearcFormData()
+                : {};
+            if (JSON.stringify(params) == "{}") {
+                this.guanJian = "";
+                this.niandu = ""; // 年度
+                this.startTime = ""; // 开始时间
+                this.endTime = ""; // 结束时间
             } else {
             } else {
-              str += "," + item
+                this.guanJian = params.guanJian ? params.guanJian : "";
+                this.niandu = params.nianDu ? params.nianDu : ""; // 年度
+                this.startTime = params.b ? params.b : ""; // 开始时间
+                this.endTime = params.i ? params.i : ""; // 结束时间
             }
             }
-          })
-          let data = {}
-          data['tableName'] = "t_ywyxjlb"
-          data['paramWhere'] = "{id_:'" + str + "'}"
-          let this_ = this
-          curdPost('batchDelete', data).then(response => {
-            this_.$message({
-              message: '删除成功!',
-              type: 'warning'
-            })
-            this.search()
-          })
-
-          break
-        case 'add': // 添加
-          this.openTask("1072813170935988224")
-          break
-        // case 'edit': // 编辑
-        //   ActionUtils.selectedRecord(selection).then((id) => {
-        //     console.log('selection', selection)
-        //     let filterDatas = this.listData.filter(fil => {
-        //       return fil.id_ = fil
-        //     })
-        //     this.dialogFormVisible = true
-        //     // this.defId = '1072813170935988224'
-        //     this.pkValue = id
-
+        },
+        /**
+         * 处理分页事件
+         */
+        handlePaginationChange(page) {
+            ActionUtils.setPagination(this.pagination, page);
+            this.bianlistData.pageResult.limit = page.limit;
+            this.bianlistData.pageResult.page = page.page;
+            let filterDatas = [];
+            if (this.selectListData.length >= page.limit * page.page) {
+                for (
+                    let index = page.limit * page.page - page.limit;
+                    index < page.limit * page.page;
+                    index++
+                ) {
+                    filterDatas.push(this.selectListData[index]);
+                }
+                this.bianlistData.dataResult = JSON.parse(
+                    JSON.stringify(filterDatas)
+                );
+            } else {
+                for (
+                    let index = page.limit * page.page - page.limit;
+                    index < this.selectListData.length;
+                    index++
+                ) {
+                    filterDatas.push(this.selectListData[index]);
+                }
+                this.bianlistData.dataResult = JSON.parse(
+                    JSON.stringify(filterDatas)
+                );
+            }
+            ActionUtils.handleListData(this, this.bianlistData);
+        },
 
 
-        //     // console.log('id', id)
-        //     // console.log('filterDatas', filterDatas)
+        /**
+         * 查询
+         */
+        search() {
+            this.pagination.limit = 20;
+            this.pagination.page = 1;
+            this.getSearcFormData();
+            this.loadData();
+        },
+        /* 防止多次快速查询*/
+        numbersClick() {
+            this.isDisable = true;
+            setTimeout(() => {
+                this.isDisable = false;
+            }, 600);
+        },
+        handleDelete(mes) {
+            this.$confirm(`${mes}`, "提示", {
+                type: "warning",
+            })
+                .then(() => {})
+                .catch(() => {
+                });
+        },
+        /**
+         * 处理按钮事件
+         */
+        handleAction(command, position, selection, data) {
+            let this_ = this;
+            switch (command) {
+                case "search": // 查询
+                    ActionUtils.setFirstPagination(this.pagination);
+                    this.search();
+                    break;
+                // case 'resetSearch':
+                //   this.typeId = ''
+                //   this.tableTitle = ''
+                //   this.search()
+                //   break
+                case "remove":
+                    var str = "";
+                    if (selection == undefined) {
+                        this.handleDelete("请选择数据再进行删除!");
+                        return;
+                    }
+                    if (selection.length == 0) {
+                        this.handleDelete("请选择数据再进行删除!");
+                        return;
+                    } else {
+                        this.$confirm("确定是要删除数据吗?", "提示", {
+                            type: "warning",
+                        })
+                            .then(() => {
+                                selection.forEach((item, index) => {
+                                    if (index == 0) {
+                                        str += item;
+                                    } else {
+                                        str += "," + item;
+                                    }
+                                });
+                                let data = {};
+                                data["tableName"] = "t_ywyxjlb";
+                                data["paramWhere"] = "{id_:'" + str + "'}";
 
 
-        //     // this.addDataCont.nianDu = filterDatas[0].nian_du_
-        //     // this.addDataCont.biaoDanMingCheng = filterDatas[0].biao_dan_ming_che
-        //     // this.addDataCont.fuJian = filterDatas[0].biao_dan_ming_che
-        //     // this.addDataCont.shiWuShuoMing = filterDatas[0].shi_wu_shuo_ming_
-        //     // console.log('this.addDataCont', this.addDataCont)
+                                curdPost("batchDelete", data).then(
+                                    (response) => {
+                                        this_.$message({
+                                            message: "删除成功!",
+                                            type: "success",
+                                        });
+                                        this.search();
+                                    }
+                                );
+                            })
+                            .catch(() => {
+                                this_.$message({
+                                    message: "取消删除",
+                                    type: "warning",
+                                });
+                            });
+                    }
+                    break;
+                case "add": // 添加
+                    this.openTask("1072813170935988224");
+                    break;
+                // case 'edit': // 编辑
+                //   ActionUtils.selectedRecord(selection).then((id) => {
+                //     console.log('selection', selection)
+                //     let filterDatas = this.listData.filter(fil => {
+                //       return fil.id_ = fil
+                //     })
+                //     this.dialogFormVisible = true
+                //     // this.defId = '1072813170935988224'
+                //     this.pkValue = id
 
 
+                //     // console.log('id', id)
+                //     // console.log('filterDatas', filterDatas)
 
 
+                //     // this.addDataCont.nianDu = filterDatas[0].nian_du_
+                //     // this.addDataCont.biaoDanMingCheng = filterDatas[0].biao_dan_ming_che
+                //     // this.addDataCont.fuJian = filterDatas[0].biao_dan_ming_che
+                //     // this.addDataCont.shiWuShuoMing = filterDatas[0].shi_wu_shuo_ming_
+                //     // console.log('this.addDataCont', this.addDataCont)
 
 
-        //   }).catch(() => { })
-        //   break
-        default:
-          break
-      }
-    },
-/**
-     * 处理排序
-     */
-    handleSortChange(sort) {
-      ActionUtils.setSorts(this.sorts, sort)
-      this.loadData()
-    },
-    handleNodeClick(typeId, typeName, treeData) {
-      this.tableTitle = typeName.name
-      this.typeId = typeId
-      this.treeData = treeData
-      this.depth = typeName.depth
-      this.loadData()
-      // 判断是否存在下级菜单
-      let state = this.treeData.filter(el => {
-        return el.parentId === this.typeId
-      })
-      let pageName = this.$route.name
+                //   }).catch(() => { })
+                //   break
+                case "export":
+                    var str = "";
+                    if (selection == undefined) {
+                        this.handleDelete("请选择数据再进行导出!");
+                        return;
+                    }
+                    if (selection.length == 0) {
+                        this.handleDelete("请选择数据再进行导出!");
+                        return;
+                    } else {
+                        this.$confirm("确定是要导出数据吗?", "提示", {
+                            type: "warning",
+                        })
+                            .then(() => {
+                                data.forEach((item, index) => {
+                                    let param = {
+                                        id: item.fu_jian_,
+                                        fileName: item.file_name_,
+                                        ext: item.ext_,
+                                    };
+                                    downloadFile(param);
+                                });
+                            })
+                            .catch(() => {
+                                this_.$message({
+                                    message: "取消导出",
+                                    type: "warning",
+                                });
+                            });
+                    }
+                    break;
+                default:
+                    break;
+            }
+        },
+        /**
+         * 处理排序
+         */
+        handleSortChange(sort) {
+            ActionUtils.setSorts(this.sorts, sort);
+            this.loadData();
+        },
+        handleNodeClick(typeId, typeName, treeData) {
+            this.tableTitle = typeName.name;
+            this.typeId = typeId;
+            this.treeData = treeData;
+            this.depth = typeName.depth;
+            this.loadData();
+            // 判断是否存在下级菜单
+            let state = this.treeData.filter((el) => {
+                return el.parentId === this.typeId;
+            });
+            let pageName = this.$route.name;
 
 
-      if (state.length == 0 && pageName == 'wjkzgl-ywyxjlsc') {
-        let chongfu = this.listConfig.toolbars.filter(el => {
-          return el.key === 'add'
-        })
-        if (chongfu.length == 0 && this.depth !== 0) {
-          this.listConfig.toolbars.push({ key: 'add' })
-        }
-      } else {
-        this.listConfig.toolbars = this.listConfig.toolbars.filter(el => {
-          return el.key !== 'add'
-        })
-      }
+            if (state.length == 0 && pageName == "wjkzgl-ywyxjlsc") {
+                let chongfu = this.listConfig.toolbars.filter((el) => {
+                    return el.key === "add";
+                });
+                if (chongfu.length == 0 && this.depth !== 0) {
+                    this.listConfig.toolbars.push({ key: "add" });
+                }
+            } else {
+                this.listConfig.toolbars = this.listConfig.toolbars.filter(
+                    (el) => {
+                        return el.key !== "add";
+                    }
+                );
+            }
+        },
+        handleExpandCollapse(isExpand) {
+            this.width = isExpand ? 230 : 30;
+        },
     },
     },
-    handleExpandCollapse(isExpand) {
-      this.width = isExpand ? 230 : 30
-    }
-  }
-}
+};
 </script>
 </script>
-<style lang="scss" >
+<style lang="scss">
 .js-custom-dialog {
 .js-custom-dialog {
-  .el-dialog__body {
-    height: calc(100vh) !important;
-    margin: -9px !important;
-    padding: 0px !important;
-    overflow: hidden;
-  }
+    .el-dialog__body {
+        height: calc(100vh) !important;
+        margin: -9px !important;
+        padding: 0px !important;
+        overflow: hidden;
+    }
 
 
-  .el-dialog__header {
-    padding: 0px;
-  }
+    .el-dialog__header {
+        padding: 0px;
+    }
 
 
-  .el-dialog__headerbtn i {
-    font-size: 28px;
-    font-weight: bold;
-    background-color: #ffffff;
-    border-radius: 8px;
-    margin-top: -8px;
-  }
+    .el-dialog__headerbtn i {
+        font-size: 28px;
+        font-weight: bold;
+        background-color: #ffffff;
+        border-radius: 8px;
+        margin-top: -8px;
+    }
 }
 }
 
 
 .main-container .div_test {
 .main-container .div_test {
-  cursor: pointer;
+    cursor: pointer;
 }
 }
 
 
 .main-container .el-popover.popverClass {
 .main-container .el-popover.popverClass {
-  .div_content {
-    .content_checkbox {
-      .el-checkbox-group {
-        display: flex;
-        flex-direction: column;
-        z-index: 999;
-      }
+    .div_content {
+        .content_checkbox {
+            .el-checkbox-group {
+                display: flex;
+                flex-direction: column;
+                z-index: 999;
+            }
 
 
-      z-index: 999;
-    }
+            z-index: 999;
+        }
 
 
-    .content_butts {
-      z-index: 999;
-      margin-top: 20px;
-      display: flex;
-      justify-content: flex-end;
+        .content_butts {
+            z-index: 999;
+            margin-top: 20px;
+            display: flex;
+            justify-content: flex-end;
 
 
-      .el-button {
-        padding: 7px 14px;
-      }
+            .el-button {
+                padding: 7px 14px;
+            }
+        }
     }
     }
-  }
 }
 }
 </style>
 </style>

+ 1 - 1
src/views/statistics/item/s12fengXian.vue

@@ -102,7 +102,7 @@
               },
               },
               data: [
               data: [
                 { value: this.data.t_mjsyshdfxsbykzjhxbNum.res[0], name: '完成率' ,v2:this.data.t_mjsyshdfxsbykzjhxbNum.number[0]},
                 { value: this.data.t_mjsyshdfxsbykzjhxbNum.res[0], name: '完成率' ,v2:this.data.t_mjsyshdfxsbykzjhxbNum.number[0]},
-                { value: e, name: '未完成率' ,v2:this.data.t_mjsyshdfxsbykzjhxbNum.numberAll[0]}
+                { value: e, name: '未完成率' ,v2:this.data.t_mjsyshdfxsbykzjhxbNum.numberAll[0]-this.data.t_mjsyshdfxsbykzjhxbNum.number[0]}
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 53 - 2
src/views/statistics/sendDatas.js

@@ -88,6 +88,9 @@ export default {
                         valAll.forEach( function(item){
                         valAll.forEach( function(item){
                                 b += item ;
                                 b += item ;
                         });
                         });
+                        if(a>b){
+                                a=b
+                        }
                         if(b===0){
                         if(b===0){
                                 c=0
                                 c=0
                         }else{
                         }else{
@@ -145,6 +148,9 @@ export default {
                                         b += 1 ;
                                         b += 1 ;
                                 }
                                 }
                         });
                         });
+                        if(a>b){
+                                a=b
+                        }
                         if(b===0){
                         if(b===0){
                                 c=0
                                 c=0
                         }else{
                         }else{
@@ -166,8 +172,9 @@ export default {
                         let b=that.nengliObj[1].num
                         let b=that.nengliObj[1].num
                         let c=0
                         let c=0
 
 
-                        console.log(that.nengliObj,'904380439034904343')
-        
+                        if(a>b){
+                                a=b
+                        }
                         if(b===0){
                         if(b===0){
                                 c=0
                                 c=0
                         }else{
                         }else{
@@ -223,6 +230,9 @@ export default {
                         }
                         }
                         // a=a*numm
                         // a=a*numm
                         // console.log(numm,'numm')
                         // console.log(numm,'numm')
+                        if(b>a){
+                                b=a
+                        }
                         if(b===0){
                         if(b===0){
                                 c=0
                                 c=0
                         }else{
                         }else{
@@ -277,11 +287,15 @@ export default {
                         }
                         }
                         // a=a*numm
                         // a=a*numm
                         // console.log(numm,'numm')
                         // console.log(numm,'numm')
+                        if(b>a){
+                                b=a
+                        }
                         if(b===0){
                         if(b===0){
                                 c=0
                                 c=0
                         }else{
                         }else{
                                 c= Math.floor(b/a * 10000) / 100
                                 c= Math.floor(b/a * 10000) / 100
                         }
                         }
+                        
                         return {
                         return {
                                 "Num" :{"date": this.endDate,"number": val, "name": name, "numberAll": valAll,"valnum":a,"valAll":b,"valna":c},
                                 "Num" :{"date": this.endDate,"number": val, "name": name, "numberAll": valAll,"valnum":a,"valAll":b,"valna":c},
                                 "config":this.getMyConfig("检测") //返回需要的对应参数
                                 "config":this.getMyConfig("检测") //返回需要的对应参数
@@ -331,6 +345,9 @@ export default {
                         }
                         }
                         // a=a*numm
                         // a=a*numm
                         // console.log(numm,'numm')
                         // console.log(numm,'numm')
+                        if(b>a){
+                                b=a
+                        }
                         if(b===0){
                         if(b===0){
                                 c=0
                                 c=0
                         }else{
                         }else{
@@ -358,6 +375,9 @@ export default {
                         let e=0
                         let e=0
                         let n=0
                         let n=0
                         let d=0
                         let d=0
+                        if(jchzbNum[0]+jchzbNum1[0]+jchzbNum2[0]>jchzbSNum[0]){
+                                jchzbSNum[0] = jchzbNum[0]+jchzbNum1[0]+jchzbNum2[0]
+                        }
                         if (jchzbSNum[0]===0) {
                         if (jchzbSNum[0]===0) {
                                 e =0
                                 e =0
                         } else {
                         } else {
@@ -404,6 +424,9 @@ export default {
                         let mjjcbgSNum = this.getMatchingDataSame('t_mjjcbg')
                         let mjjcbgSNum = this.getMatchingDataSame('t_mjjcbg')
                         let barData = []
                         let barData = []
                         // for (let i = 0; i < this.dataScope.length; i++) {
                         // for (let i = 0; i < this.dataScope.length; i++) {
+                                if(mjjcbgNum[0]>mjjcbgSNum[0]){
+                                        mjjcbgNum[0]=mjjcbgSNum[0]
+                                }
                                 let e=0
                                 let e=0
                                 if (mjjcbgSNum[0]===0) {
                                 if (mjjcbgSNum[0]===0) {
                                         e =0
                                         e =0
@@ -425,6 +448,9 @@ export default {
                         let khmydtjbSNum = this.getMatchingDataSame('t_khmydtjb')
                         let khmydtjbSNum = this.getMatchingDataSame('t_khmydtjb')
                         let barData = []
                         let barData = []
                         // for (let i = 0; i < this.dataScope.length; i++) {
                         // for (let i = 0; i < this.dataScope.length; i++) {
+                                if(khmydtjbNum[0]>khmydtjbNumN){
+                                        khmydtjbNum[0]=khmydtjbNumN
+                                }
                                 let e=0
                                 let e=0
                                 if (khmydtjbNumN===0) {
                                 if (khmydtjbNumN===0) {
                                         e =0
                                         e =0
@@ -474,11 +500,21 @@ export default {
                         } else {
                         } else {
                                 e1 =Math.floor(complaintNumS[0]/complaintNum[0] * 10000) / 100
                                 e1 =Math.floor(complaintNumS[0]/complaintNum[0] * 10000) / 100
                         }
                         }
+
                         if (complaintNum[0]===0) {
                         if (complaintNum[0]===0) {
                                 e2 =0
                                 e2 =0
                         } else {
                         } else {
                                 e2 =Math.floor(complainNum[0]/complaintNum[0] * 10000) / 100
                                 e2 =Math.floor(complainNum[0]/complaintNum[0] * 10000) / 100
                         }
                         }
+                        if(e>100){
+                                e1=100
+                        }
+                        if(e2>100){
+                                e2=100
+                        }
+                        if(e1>100){
+                                e2=100
+                        }
                         barData.push(e)
                         barData.push(e)
                         barData1.push(e1)
                         barData1.push(e1)
                         barData2.push(e2)
                         barData2.push(e2)
@@ -494,6 +530,9 @@ export default {
                         let ryywpxjSNum = this.getMatchingDataSame('t_ryywpxjl')
                         let ryywpxjSNum = this.getMatchingDataSame('t_ryywpxjl')
                         let barData = []
                         let barData = []
                         // for (let i = 0; i < this.dataScope.length; i++) {
                         // for (let i = 0; i < this.dataScope.length; i++) {
+                                if(ryywpxjNum[0]>ryywpxjSNum[0]){
+                                        ryywpxjNum[0]=ryywpxjSNum[0]
+                                }
                                 let e=0
                                 let e=0
                                 if (ryywpxjSNum[0]===0) {
                                 if (ryywpxjSNum[0]===0) {
                                         e =0
                                         e =0
@@ -516,6 +555,9 @@ export default {
                         let zljdSNum = this.getMatchingDataSame('t_zljd')
                         let zljdSNum = this.getMatchingDataSame('t_zljd')
                         let barData = []
                         let barData = []
                         // for (let i = 0; i < this.dataScope.length; i++) {
                         // for (let i = 0; i < this.dataScope.length; i++) {
+                                if(zljdNum[0]>zljdSNum[0]){
+                                        zljdNum[0]=zljdSNum[0]
+                                }
                                 let e=0
                                 let e=0
                                 if (zljdSNum[0]===0) {
                                 if (zljdSNum[0]===0) {
                                         e =0
                                         e =0
@@ -607,6 +649,9 @@ export default {
                         barData.push(numAData)
                         barData.push(numAData)
                         a=mjzlkzxbSNum[0]+mjzlkzjlbSNum[0]
                         a=mjzlkzxbSNum[0]+mjzlkzjlbSNum[0]
                         b=mjzlkzxbNum[0]+mjzlkzjlbNum[0]
                         b=mjzlkzxbNum[0]+mjzlkzjlbNum[0]
+                        if(mjzlkzxbNum[0]>mjzlkzxbSNum[0]){
+                                mjzlkzxbNum[0]=mjzlkzxbSNum[0]
+                        }
                         if(mjzlkzxbSNum[0]===0){
                         if(mjzlkzxbSNum[0]===0){
                                 c=0
                                 c=0
                         }else{
                         }else{
@@ -628,6 +673,9 @@ export default {
                         let numData = []
                         let numData = []
                         let numAData = []
                         let numAData = []
                         let barData = []
                         let barData = []
+                        if(mjsyshdfxsbykzjhxbSNum[0]>mjsyshdfxsbykzjhxbNum[0]){
+                                mjsyshdfxsbykzjhxbSNum[0]=mjsyshdfxsbykzjhxbNum[0] 
+                        }
                         // for (let i = 0; i < this.dataScope.length; i++) {
                         // for (let i = 0; i < this.dataScope.length; i++) {
                         let e=0
                         let e=0
                         if (mjsyshdfxsbykzjhxbNum[0]===0) {
                         if (mjsyshdfxsbykzjhxbNum[0]===0) {
@@ -654,6 +702,9 @@ export default {
                         let numAData = []
                         let numAData = []
                         let barData = []
                         let barData = []
                         // for (let i = 0; i < this.dataScope.length; i++) {
                         // for (let i = 0; i < this.dataScope.length; i++) {
+                        if(bfhxbgyjzcsjlbxSNum[0]>bfhxbgyjzcsjlbxNum[0]){
+                                bfhxbgyjzcsjlbxSNum[0]=bfhxbgyjzcsjlbxNum[0]
+                        }
                         let e=0
                         let e=0
                         if (bfhxbgyjzcsjlbxNum[0]===0) {
                         if (bfhxbgyjzcsjlbxNum[0]===0) {
                                 e =0
                                 e =0