|
|
@@ -41,19 +41,36 @@
|
|
|
trigger="click"
|
|
|
@show="getReportAndFile(scope.row)"
|
|
|
>
|
|
|
- <div slot="reference" class="div_operation el-icon-s-order">查阅记录</div>
|
|
|
+ <div slot="reference" class="div_operation el-icon-s-order">
|
|
|
+ 查阅记录
|
|
|
+ </div>
|
|
|
<div v-loading="fileLoading" class="div_content">
|
|
|
<!-- 获取所有输出报告-->
|
|
|
- <template v-if="record.report.length && record.report[0]">
|
|
|
- <div v-for="(item, index) in record.report" :key="index" class="content_item">
|
|
|
- <span style="cursor: pointer;" @click="openReport(item, record.bizKey)">
|
|
|
- <i class="el-icon-tickets" style="font-size: 18px;" />
|
|
|
+ <template
|
|
|
+ v-if="record.report.length && record.report[0]"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in record.report"
|
|
|
+ :key="index"
|
|
|
+ class="content_item"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ style="cursor: pointer"
|
|
|
+ @click="openReport(item, record.bizKey)"
|
|
|
+ >
|
|
|
+ <i
|
|
|
+ class="el-icon-tickets"
|
|
|
+ style="font-size: 18px"
|
|
|
+ />
|
|
|
{{ item | getReportName }}
|
|
|
</span>
|
|
|
- <br>
|
|
|
+ <br />
|
|
|
</div>
|
|
|
</template>
|
|
|
- <div v-if="record.file.length && snapshotId" class="content_item">
|
|
|
+ <div
|
|
|
+ v-if="record.file.length && snapshotId"
|
|
|
+ class="content_item"
|
|
|
+ >
|
|
|
<!-- <div class="sub_operation">快照</div> -->
|
|
|
<ibps-attachment
|
|
|
v-model="snapshotId"
|
|
|
@@ -62,11 +79,16 @@
|
|
|
multiple
|
|
|
upload-type="attachment"
|
|
|
store="id"
|
|
|
- style="width: 100%;"
|
|
|
+ style="width: 100%"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div v-if="record.file.length && fileId" class="content_item">
|
|
|
- <div class="sub_operation ibps-icon-folder-open-o">附件</div>
|
|
|
+ <div
|
|
|
+ v-if="record.file.length && fileId"
|
|
|
+ class="content_item"
|
|
|
+ >
|
|
|
+ <div class="sub_operation ibps-icon-folder-open-o">
|
|
|
+ 附件
|
|
|
+ </div>
|
|
|
<ibps-attachment
|
|
|
v-model="fileId"
|
|
|
:download="hasRole"
|
|
|
@@ -74,7 +96,12 @@
|
|
|
multiple
|
|
|
upload-type="attachment"
|
|
|
store="id"
|
|
|
- style="width: 100%; height: 100%; max-height: 180px; overflow-y: auto;"
|
|
|
+ style="
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ max-height: 180px;
|
|
|
+ overflow-y: auto;
|
|
|
+ "
|
|
|
/>
|
|
|
</div>
|
|
|
<!-- <div v-if="(!record.report.length || !record.report[0]) && (!record.file.length || !fileId)">无报表及附件数据</div> -->
|
|
|
@@ -87,13 +114,35 @@
|
|
|
popper-class="popverClass_sub"
|
|
|
trigger="click"
|
|
|
>
|
|
|
- <div slot="reference" class="sub_operation ibps-icon-folder-o">{{ specialBtn[typeId].label }}</div>
|
|
|
- <div v-if="record.special && record.special.length" class="div_content">
|
|
|
- <div v-for="(item, index) in record.special" :key="index" class="content_item">
|
|
|
+ <div
|
|
|
+ slot="reference"
|
|
|
+ class="sub_operation ibps-icon-folder-o"
|
|
|
+ >
|
|
|
+ {{ specialBtn[typeId].label }}
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ record.special && record.special.length
|
|
|
+ "
|
|
|
+ class="div_content"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in record.special"
|
|
|
+ :key="index"
|
|
|
+ class="content_item"
|
|
|
+ >
|
|
|
<div class="sub_content">
|
|
|
- <div class="title">{{ specialBtn[typeId].desc }}项{{ item.flag }}</div>
|
|
|
+ <div class="title">
|
|
|
+ {{
|
|
|
+ specialBtn[typeId].desc
|
|
|
+ }}项{{ item.flag }}
|
|
|
+ </div>
|
|
|
<div class="sub_item">
|
|
|
- <div class="desc">{{ specialBtn[typeId].desc }}前</div>
|
|
|
+ <div class="desc">
|
|
|
+ {{
|
|
|
+ specialBtn[typeId].desc
|
|
|
+ }}前
|
|
|
+ </div>
|
|
|
<ibps-attachment
|
|
|
v-model="item.beforeImprove"
|
|
|
placeholder="请选择"
|
|
|
@@ -105,11 +154,15 @@
|
|
|
store="id"
|
|
|
media-type=""
|
|
|
media=""
|
|
|
- style="width: 100%;"
|
|
|
+ style="width: 100%"
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="sub_item">
|
|
|
- <div class="desc">{{ specialBtn[typeId].desc }}后</div>
|
|
|
+ <div class="desc">
|
|
|
+ {{
|
|
|
+ specialBtn[typeId].desc
|
|
|
+ }}后
|
|
|
+ </div>
|
|
|
<ibps-attachment
|
|
|
v-model="item.afterImprove"
|
|
|
placeholder="请选择"
|
|
|
@@ -121,13 +174,27 @@
|
|
|
store="id"
|
|
|
media-type=""
|
|
|
media=""
|
|
|
- style="width: 100%;"
|
|
|
+ style="width: 100%"
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="content_item">
|
|
|
- <span style="cursor: pointer;" @click="openReport(specialBtn[typeId].path, item.id_)">
|
|
|
- <i class="el-icon-tickets" style="font-size: 14px;" />
|
|
|
- {{ specialBtn[typeId].name }}
|
|
|
+ <span
|
|
|
+ style="cursor: pointer"
|
|
|
+ @click="
|
|
|
+ openReport(
|
|
|
+ specialBtn[typeId]
|
|
|
+ .path,
|
|
|
+ item.id_
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <i
|
|
|
+ class="el-icon-tickets"
|
|
|
+ style="font-size: 14px"
|
|
|
+ />
|
|
|
+ {{
|
|
|
+ specialBtn[typeId].name
|
|
|
+ }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -143,7 +210,7 @@
|
|
|
<bpmn-formrender
|
|
|
:visible="dialogFormVisible"
|
|
|
:instance-id="instanceId"
|
|
|
- @close="visible => dialogFormVisible = visible"
|
|
|
+ @close="(visible) => (dialogFormVisible = visible)"
|
|
|
/>
|
|
|
<el-dialog
|
|
|
:close-on-click-modal="false"
|
|
|
@@ -167,54 +234,79 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { queryPageList, queryClassify } from '@/api/platform/bpmn/bpmInstHis'
|
|
|
-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 { specialType, specialBtn, specialParams, specialTable, stateTable, stateField, specialField } from './corresponding/index'
|
|
|
+import { queryPageList, queryClassify } from "@/api/platform/bpmn/bpmInstHis";
|
|
|
+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 {
|
|
|
+ specialType,
|
|
|
+ specialBtn,
|
|
|
+ specialParams,
|
|
|
+ specialTable,
|
|
|
+ stateTable,
|
|
|
+ stateField,
|
|
|
+ specialField,
|
|
|
+} from "./corresponding/index";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
IbpsTypeTree,
|
|
|
BpmnFormrender,
|
|
|
- IbpsAttachment
|
|
|
+ IbpsAttachment,
|
|
|
},
|
|
|
filters: {
|
|
|
// 截取报表名称
|
|
|
- getReportName (value) {
|
|
|
+ getReportName(value) {
|
|
|
// 通过/与.截取,eg: 43罗湖/L13-LHXBJY-QP-6.4-04 标准菌株管理程序/LHXBJY-QP-6.4-04-FQ-03 标准菌株鉴定验收记录表.rpx
|
|
|
- return value.slice(-value.split('').reverse().join('').indexOf('/'), -value.split('').reverse().join('').indexOf('.') - 1)
|
|
|
- }
|
|
|
+ return value.slice(
|
|
|
+ -value.split("").reverse().join("").indexOf("/"),
|
|
|
+ -value.split("").reverse().join("").indexOf(".") - 1
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
mixins: [FixHeight],
|
|
|
props: {
|
|
|
location: {
|
|
|
type: String,
|
|
|
- default: 'initial'
|
|
|
- }
|
|
|
+ default: "initial",
|
|
|
+ },
|
|
|
},
|
|
|
- data () {
|
|
|
- const roleList = this.$store.getters.userInfo.role
|
|
|
+ data() {
|
|
|
+ const roleList = this.$store.getters.userInfo.role;
|
|
|
// 系统管理角色、实验室主任、档案管理员具有高级权限
|
|
|
- const hasRole = roleList.some(item => ['xtgljs', 'syszr', 'dagly', 'xxgljs'].includes(item.alias))
|
|
|
- const { account = '', userList = [] } = this.$store.getters
|
|
|
+ const hasRole = roleList.some((item) =>
|
|
|
+ ["xtgljs", "syszr", "dagly", "xxgljs"].includes(item.alias)
|
|
|
+ );
|
|
|
+ const { account = "", userList = [] } = this.$store.getters;
|
|
|
+ const selectOptions = [
|
|
|
+ {
|
|
|
+ value: "end",
|
|
|
+ label: "已完成",
|
|
|
+ type: "success",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "manualend",
|
|
|
+ label: "已作废",
|
|
|
+ type: "danger",
|
|
|
+ },
|
|
|
+ ];
|
|
|
return {
|
|
|
hasRole,
|
|
|
width: 210,
|
|
|
selection: false,
|
|
|
dialogFormVisible: false,
|
|
|
// 编辑dialog需要使用
|
|
|
- instanceId: '',
|
|
|
+ instanceId: "",
|
|
|
// 主键 如果主键不是pk需要传主键
|
|
|
- pkKey: 'id',
|
|
|
- tableTitle: '',
|
|
|
- typeId: '',
|
|
|
- srcUrl: '',
|
|
|
- fileId: '',
|
|
|
- snapshotId: '',
|
|
|
+ pkKey: "id",
|
|
|
+ tableTitle: "",
|
|
|
+ typeId: "",
|
|
|
+ srcUrl: "",
|
|
|
+ fileId: "",
|
|
|
+ snapshotId: "",
|
|
|
// 判断多次点击
|
|
|
isDisable: false,
|
|
|
visible: false,
|
|
|
@@ -224,115 +316,170 @@ export default {
|
|
|
table: [],
|
|
|
field: [],
|
|
|
special: [],
|
|
|
- bizKey: ''
|
|
|
+ bizKey: "",
|
|
|
},
|
|
|
- title: '',
|
|
|
+ title: "",
|
|
|
loading: true,
|
|
|
fileLoading: false,
|
|
|
height: document.clientHeight,
|
|
|
reportAll: [],
|
|
|
listData: [],
|
|
|
pagination: {},
|
|
|
- sorts: { END_TIME_: 'DESC' },
|
|
|
+ sorts: { END_TIME_: "DESC" },
|
|
|
// 默认过滤部分分类
|
|
|
hasPermission: true,
|
|
|
specialType,
|
|
|
specialBtn,
|
|
|
listConfig: {
|
|
|
- toolbars: [
|
|
|
- { key: 'search' }
|
|
|
- ],
|
|
|
+ toolbars: [{ key: "search" }],
|
|
|
searchForm: {
|
|
|
forms: [
|
|
|
- { prop: 'Q^subject_^SL', label: '关键字:', itemWidth: 330, placeholder: '可输入年份/部门/表单名称/事务说明/编制人模糊查询' },
|
|
|
- { prop: 'Q^proc_def_name_^SL', label: '表单名称:', itemWidth: 150, placeholder: '请输入' },
|
|
|
- { prop: ['Q^end_time_^DL', 'Q^end_time_^DG'], label: '完成时间', fieldType: 'daterange', itemWidth: 220 }
|
|
|
- ]
|
|
|
+ {
|
|
|
+ prop: "Q^subject_^SL",
|
|
|
+ label: "关键字:",
|
|
|
+ itemWidth: 330,
|
|
|
+ placeholder:
|
|
|
+ "可输入年份/部门/表单名称/事务说明/编制人模糊查询",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "Q^proc_def_name_^SL",
|
|
|
+ label: "表单名称:",
|
|
|
+ itemWidth: 150,
|
|
|
+ placeholder: "请输入",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: ["Q^end_time_^DL", "Q^end_time_^DG"],
|
|
|
+ label: "完成/作废时间",
|
|
|
+ fieldType: "daterange",
|
|
|
+ labelWidth: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "Q^status_^S",
|
|
|
+ label: "状态",
|
|
|
+ fieldType: "select",
|
|
|
+ options: selectOptions,
|
|
|
+ itemWidth: 100,
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
// 表格字段配置
|
|
|
columns: [
|
|
|
// { prop: 'subject', label: '任务标题', link: 'dialog', width: 250 },
|
|
|
- { prop: 'tYear', label: '年份', width: 60 },
|
|
|
- { prop: 'tDept', label: '部门', width: 90 },
|
|
|
- { prop: 'procDefName', label: '表单名称', sortable: 'custom', formatter: this.replaceFormName, width: 250 },
|
|
|
- { prop: 'subject', label: '事务说明', formatter: this.getDesc, 'min-width': 300 },
|
|
|
- { prop: 'tUser', label: '编制人', width: 80 },
|
|
|
- { prop: 'endTime', label: '完成时间', sortable: 'custom', dateFormat: 'yyyy-MM-dd', width: 90 }
|
|
|
+ { prop: "tYear", label: "年份", width: 60 },
|
|
|
+ { prop: "tDept", label: "部门", width: 90 },
|
|
|
+ {
|
|
|
+ prop: "procDefName",
|
|
|
+ label: "表单名称",
|
|
|
+ sortable: "custom",
|
|
|
+ formatter: this.replaceFormName,
|
|
|
+ width: 250,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "subject",
|
|
|
+ label: "事务说明",
|
|
|
+ formatter: this.getDesc,
|
|
|
+ "min-width": 300,
|
|
|
+ },
|
|
|
+ { prop: "tUser", label: "编制人", width: 80 },
|
|
|
+ {
|
|
|
+ prop: "status",
|
|
|
+ label: "状态",
|
|
|
+ width: 80,
|
|
|
+ options: selectOptions,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "endTime",
|
|
|
+ label: "完成/作废时间",
|
|
|
+ sortable: "custom",
|
|
|
+ dateFormat: "yyyy-MM-dd",
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
],
|
|
|
rowHandle: {
|
|
|
actions: [
|
|
|
{
|
|
|
- key: 'detail',
|
|
|
- label: '详情'
|
|
|
- }
|
|
|
+ key: "detail",
|
|
|
+ label: "详情",
|
|
|
+ },
|
|
|
],
|
|
|
- effect: 'display',
|
|
|
- width: '100'
|
|
|
- }
|
|
|
+ effect: "display",
|
|
|
+ width: "100",
|
|
|
+ },
|
|
|
},
|
|
|
- userList
|
|
|
- }
|
|
|
+ userList,
|
|
|
+ };
|
|
|
},
|
|
|
- created () {
|
|
|
- this.loadData()
|
|
|
- this.getConfig()
|
|
|
- const roleList = this.$store.getters.userInfo.role
|
|
|
+ created() {
|
|
|
+ this.loadData();
|
|
|
+ this.getConfig();
|
|
|
+ const roleList = this.$store.getters.userInfo.role;
|
|
|
// 系统管理角色添加删除按钮
|
|
|
- const deleteRole = roleList.some(item => item.alias === 'xtgljs')
|
|
|
+ const deleteRole = roleList.some((item) => item.alias === "xtgljs");
|
|
|
if (deleteRole) {
|
|
|
// 系统管理角色不做分类过滤,显示删除按钮
|
|
|
- this.hasPermission = false
|
|
|
- this.listConfig.toolbars.push({ key: 'remove' })
|
|
|
- this.selection = true
|
|
|
+ this.hasPermission = false;
|
|
|
+ this.listConfig.toolbars.push({ key: "remove" });
|
|
|
+ this.selection = true;
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- replaceFormName (row, column, cellValue, index) {
|
|
|
- const t = cellValue === '管理评审计划'
|
|
|
+ replaceFormName(row, column, cellValue, index) {
|
|
|
+ const t = cellValue === "管理评审计划";
|
|
|
if (t) {
|
|
|
- return '管理评审'
|
|
|
+ return "管理评审";
|
|
|
}
|
|
|
- return cellValue
|
|
|
+ return cellValue;
|
|
|
},
|
|
|
// 截取事务说明字段内容
|
|
|
- getDesc (row, column, cellValue, index) {
|
|
|
- const hasDesc = cellValue.includes('#')
|
|
|
+ getDesc(row, column, cellValue, index) {
|
|
|
+ const hasDesc = cellValue.includes("#");
|
|
|
if (!hasDesc) {
|
|
|
- return ''
|
|
|
+ return "";
|
|
|
}
|
|
|
- return cellValue.split('#')[1]
|
|
|
+ return cellValue.split("#")[1];
|
|
|
},
|
|
|
// 加载数据
|
|
|
- loadData () {
|
|
|
- this.loading = true
|
|
|
- queryClassify(this.getSearcFormData()).then((response) => {
|
|
|
- const data = response.data && response.data.dataResult
|
|
|
- data.forEach(item => {
|
|
|
- const temp = this.userList.find(i => item.createBy === i.userId)
|
|
|
- item.tYear = item.createTime.slice(0, 4)
|
|
|
- item.tDept = temp.groupName
|
|
|
- item.tUser = temp.userName
|
|
|
- if ((item.formKey == 'nsssjhbfj' || item.formKey == 'nsssjhx') && item.updateTime == item.endTime) {
|
|
|
- item.endTime = ''
|
|
|
- }
|
|
|
+ loadData() {
|
|
|
+ this.loading = true;
|
|
|
+ queryClassify(this.getSearcFormData())
|
|
|
+ .then((response) => {
|
|
|
+ const data = response.data && response.data.dataResult;
|
|
|
+ data.forEach((item) => {
|
|
|
+ const temp = this.userList.find(
|
|
|
+ (i) => item.createBy === i.userId
|
|
|
+ );
|
|
|
+ item.tYear = item.createTime.slice(0, 4);
|
|
|
+ item.tDept = temp.groupName;
|
|
|
+ item.tUser = temp.userName;
|
|
|
+ if (
|
|
|
+ (item.formKey == "nsssjhbfj" ||
|
|
|
+ item.formKey == "nsssjhx") &&
|
|
|
+ item.updateTime == item.endTime
|
|
|
+ ) {
|
|
|
+ item.endTime = "";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ ActionUtils.handleListData(this, response.data);
|
|
|
+ this.loading = false;
|
|
|
})
|
|
|
- ActionUtils.handleListData(this, response.data)
|
|
|
- this.loading = false
|
|
|
- }).catch(() => {
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
// 获取所有流程的报表配置数据
|
|
|
- getConfig () {
|
|
|
- const sql = 'select bao_biao_lu_jing_, fu_jian_nei_rong_, guan_lian_zi_duan, liu_cheng_xuan_ze, shi_fou_zi_biao_ from t_lcidglbdbb'
|
|
|
- curdPost('sql', sql).then((res) => {
|
|
|
- this.reportAll = res.variables && res.variables.data
|
|
|
- }).catch(error => {
|
|
|
- console.log('获取流程配置报表数据失败!')
|
|
|
- })
|
|
|
+ getConfig() {
|
|
|
+ const sql =
|
|
|
+ "select bao_biao_lu_jing_, fu_jian_nei_rong_, guan_lian_zi_duan, liu_cheng_xuan_ze, shi_fou_zi_biao_ from t_lcidglbdbb";
|
|
|
+ curdPost("sql", sql)
|
|
|
+ .then((res) => {
|
|
|
+ this.reportAll = res.variables && res.variables.data;
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ console.log("获取流程配置报表数据失败!");
|
|
|
+ });
|
|
|
},
|
|
|
// 获取报表数据及附件数据
|
|
|
- getReportAndFile ({ procDefKey, bizKey, subject }) {
|
|
|
+ getReportAndFile({ procDefKey, bizKey, subject }) {
|
|
|
// 每次获取前先清除原先数据
|
|
|
this.record = {
|
|
|
report: [],
|
|
|
@@ -340,380 +487,528 @@ export default {
|
|
|
table: [],
|
|
|
field: [],
|
|
|
special: [],
|
|
|
- bizKey: ''
|
|
|
- }
|
|
|
+ bizKey: "",
|
|
|
+ };
|
|
|
if (this.isDisable) {
|
|
|
- this.$message.error('请勿快速点击!')
|
|
|
- return
|
|
|
+ this.$message.error("请勿快速点击!");
|
|
|
+ return;
|
|
|
}
|
|
|
- this.numbersClick()
|
|
|
- const temp = this.reportAll.find(item => item.liu_cheng_xuan_ze === procDefKey)
|
|
|
+ this.numbersClick();
|
|
|
+ const temp = this.reportAll.find(
|
|
|
+ (item) => item.liu_cheng_xuan_ze === procDefKey
|
|
|
+ );
|
|
|
if (!temp) {
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
this.record = {
|
|
|
- report: temp.liu_cheng_xuan_ze ? temp.bao_biao_lu_jing_.split(',') : [],
|
|
|
- file: temp.fu_jian_nei_rong_ ? temp.fu_jian_nei_rong_.split('.') : [],
|
|
|
- table: temp.shi_fou_zi_biao_ ? temp.shi_fou_zi_biao_.split('.') : [],
|
|
|
- field: temp.guan_lian_zi_duan ? temp.guan_lian_zi_duan.split('.') : [],
|
|
|
+ report: temp.liu_cheng_xuan_ze
|
|
|
+ ? temp.bao_biao_lu_jing_.split(",")
|
|
|
+ : [],
|
|
|
+ file: temp.fu_jian_nei_rong_
|
|
|
+ ? temp.fu_jian_nei_rong_.split(".")
|
|
|
+ : [],
|
|
|
+ table: temp.shi_fou_zi_biao_
|
|
|
+ ? temp.shi_fou_zi_biao_.split(".")
|
|
|
+ : [],
|
|
|
+ field: temp.guan_lian_zi_duan
|
|
|
+ ? temp.guan_lian_zi_duan.split(".")
|
|
|
+ : [],
|
|
|
special: [],
|
|
|
- bizKey
|
|
|
- }
|
|
|
- let typeIndex = 1
|
|
|
+ bizKey,
|
|
|
+ };
|
|
|
+ let typeIndex = 1;
|
|
|
// 特殊类型处理
|
|
|
if (this.specialType.hasOwnProperty(this.typeId)) {
|
|
|
// 获取内审管审全局状态,根据此状态过滤报表显示
|
|
|
- const sql = `select zhuang_tai_jie_di as state from ${stateTable[this.typeId]} where ${stateField[this.typeId]} = '${bizKey}'`
|
|
|
- curdPost('sql', sql).then((res) => {
|
|
|
- const { data = [] } = res.variables || {}
|
|
|
- if (data.length) {
|
|
|
- console.log(data[0].state)
|
|
|
- this.specialType[this.typeId].forEach((item, index) => {
|
|
|
- // 判断当前流程在哪一步,以此决定报表展示
|
|
|
- if (data[0].state === item) {
|
|
|
- // 数组下标+2为当前报表文件排序
|
|
|
- typeIndex = index + 2
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- console.log(typeIndex)
|
|
|
- this.record.report = this.record.report.slice(0, typeIndex)
|
|
|
- }).catch(error => {
|
|
|
- console.log('获取管审内审全局状态数据失败!')
|
|
|
- this.record.report = this.record.report.slice(0, typeIndex)
|
|
|
- })
|
|
|
- this.getSpecicalFile(bizKey)
|
|
|
+ const sql = `select zhuang_tai_jie_di as state from ${
|
|
|
+ stateTable[this.typeId]
|
|
|
+ } where ${stateField[this.typeId]} = '${bizKey}'`;
|
|
|
+ curdPost("sql", sql)
|
|
|
+ .then((res) => {
|
|
|
+ const { data = [] } = res.variables || {};
|
|
|
+ if (data.length) {
|
|
|
+ // console.log(data[0].state);
|
|
|
+ this.specialType[this.typeId].forEach(
|
|
|
+ (item, index) => {
|
|
|
+ // 判断当前流程在哪一步,以此决定报表展示
|
|
|
+ if (data[0].state === item) {
|
|
|
+ // 数组下标+2为当前报表文件排序
|
|
|
+ typeIndex = index + 2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ // console.log(typeIndex);
|
|
|
+ this.record.report = this.record.report.slice(
|
|
|
+ 0,
|
|
|
+ typeIndex
|
|
|
+ );
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ console.log("获取管审内审全局状态数据失败!");
|
|
|
+ this.record.report = this.record.report.slice(
|
|
|
+ 0,
|
|
|
+ typeIndex
|
|
|
+ );
|
|
|
+ });
|
|
|
+ this.getSpecicalFile(bizKey);
|
|
|
}
|
|
|
// console.log(this.record)
|
|
|
if (this.record.file.length && this.record.table.length) {
|
|
|
- this.getAllFile(this.record)
|
|
|
- return
|
|
|
+ this.getAllFile(this.record);
|
|
|
+ return;
|
|
|
}
|
|
|
},
|
|
|
// 获取所有附件
|
|
|
- getAllFile ({ file, table, field, bizKey }) {
|
|
|
- this.fileId = ''
|
|
|
- this.snapshotId = ''
|
|
|
- this.fileLoading = true
|
|
|
- const resultList = []
|
|
|
- const requestOrder = []
|
|
|
+ getAllFile({ file, table, field, bizKey }) {
|
|
|
+ this.fileId = "";
|
|
|
+ this.snapshotId = "";
|
|
|
+ this.fileLoading = true;
|
|
|
+ const resultList = [];
|
|
|
+ const requestOrder = [];
|
|
|
table.forEach((item, index) => {
|
|
|
- const sql = `select ${file[index]} from ${item} where ${field.length && field[index] ? field[index] : 'id_'} = '${bizKey}'`
|
|
|
- resultList.push(this.getFile(sql, file[index], item))
|
|
|
- requestOrder.push(index)
|
|
|
- })
|
|
|
+ const sql = `select ${file[index]} from ${item} where ${
|
|
|
+ field.length && field[index] ? field[index] : "id_"
|
|
|
+ } = '${bizKey}'`;
|
|
|
+ resultList.push(this.getFile(sql, file[index], item));
|
|
|
+ requestOrder.push(index);
|
|
|
+ });
|
|
|
// console.log(resultList)
|
|
|
- Promise.all(resultList).then(res => {
|
|
|
- // console.log('所有附件ID:', res)
|
|
|
- const sortedResults = requestOrder.map(index => res[index])
|
|
|
- this.fileId = [...new Set(sortedResults.reduce((acc, cur) => acc.concat(cur.file), []))].join(',')
|
|
|
- this.snapshotId = [...new Set(sortedResults.reduce((acc, cur) => acc.concat(cur.snapshot), []))].join(',')
|
|
|
- this.fileLoading = false
|
|
|
- }).catch(err => {
|
|
|
- this.fileLoading = false
|
|
|
- console.log('error', err)
|
|
|
- })
|
|
|
+ Promise.all(resultList)
|
|
|
+ .then((res) => {
|
|
|
+ // console.log('所有附件ID:', res)
|
|
|
+ const sortedResults = requestOrder.map(
|
|
|
+ (index) => res[index]
|
|
|
+ );
|
|
|
+ this.fileId = [
|
|
|
+ ...new Set(
|
|
|
+ sortedResults.reduce(
|
|
|
+ (acc, cur) => acc.concat(cur.file),
|
|
|
+ []
|
|
|
+ )
|
|
|
+ ),
|
|
|
+ ].join(",");
|
|
|
+ this.snapshotId = [
|
|
|
+ ...new Set(
|
|
|
+ sortedResults.reduce(
|
|
|
+ (acc, cur) => acc.concat(cur.snapshot),
|
|
|
+ []
|
|
|
+ )
|
|
|
+ ),
|
|
|
+ ].join(",");
|
|
|
+ this.fileLoading = false;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.fileLoading = false;
|
|
|
+ console.log("error", err);
|
|
|
+ });
|
|
|
},
|
|
|
// 获取单个请求中的文件
|
|
|
- getFile (sql, fileField, table) {
|
|
|
+ getFile(sql, fileField, table) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- curdPost('sql', sql).then(res => {
|
|
|
+ curdPost("sql", sql).then((res) => {
|
|
|
const result = {
|
|
|
file: [],
|
|
|
- snapshot: []
|
|
|
- }
|
|
|
- const fileList = fileField.split(',')
|
|
|
+ snapshot: [],
|
|
|
+ };
|
|
|
+ const fileList = fileField.split(",");
|
|
|
// console.log(fileList)
|
|
|
- let { data = [] } = res.variables || {}
|
|
|
- data = data.filter(i => i)
|
|
|
+ let { data = [] } = res.variables || {};
|
|
|
+ data = data.filter((i) => i);
|
|
|
// 若配置的附件字段中含创建时间,先将结果按时间升序排列
|
|
|
- if (fileList.includes('create_time_')) {
|
|
|
- data.sort((a, b) => a.create_time_ - b.create_time_)
|
|
|
+ if (fileList.includes("create_time_")) {
|
|
|
+ data.sort((a, b) => a.create_time_ - b.create_time_);
|
|
|
}
|
|
|
- data.forEach(item => {
|
|
|
+ data.forEach((item) => {
|
|
|
// 能获取到值说明文件字段只有一个,将快照文件单独拿出来(内审归档中部分快照未存放在快照字段中,需单独处理)
|
|
|
if (item[fileField]) {
|
|
|
- if (fileField === 'kuai_zhao_' || (fileField === 'shang_chuan_fu_ji' && table === 't_nbss') || (fileField === 'bao_gao_wen_jian_' && table === 't_nbshbgb')) {
|
|
|
- result.snapshot.push(this.getFileId(item[fileField]))
|
|
|
+ if (
|
|
|
+ fileField === "kuai_zhao_" ||
|
|
|
+ (fileField === "shang_chuan_fu_ji" &&
|
|
|
+ table === "t_nbss") ||
|
|
|
+ (fileField === "bao_gao_wen_jian_" &&
|
|
|
+ table === "t_nbshbgb")
|
|
|
+ ) {
|
|
|
+ result.snapshot.push(
|
|
|
+ this.getFileId(item[fileField])
|
|
|
+ );
|
|
|
} else {
|
|
|
- result.file.push(this.getFileId(item[fileField]))
|
|
|
+ result.file.push(
|
|
|
+ this.getFileId(item[fileField])
|
|
|
+ );
|
|
|
}
|
|
|
} else if (fileList.length > 1) {
|
|
|
// 否则文件字段为多个,需嵌套循环,并过滤掉用于排序的创建时间字段
|
|
|
- fileList.forEach(i => {
|
|
|
- if (item[i] && i !== 'create_time_') {
|
|
|
- if (i === 'kuai_zhao_' || (i === 'shang_chuan_fu_ji' && table === 't_nbss') || (i === 'bao_gao_wen_jian_' && table === 't_nbshbgb')) {
|
|
|
- result.snapshot.push(this.getFileId(item[i]))
|
|
|
+ fileList.forEach((i) => {
|
|
|
+ if (item[i] && i !== "create_time_") {
|
|
|
+ if (
|
|
|
+ i === "kuai_zhao_" ||
|
|
|
+ (i === "shang_chuan_fu_ji" &&
|
|
|
+ table === "t_nbss") ||
|
|
|
+ (i === "bao_gao_wen_jian_" &&
|
|
|
+ table === "t_nbshbgb")
|
|
|
+ ) {
|
|
|
+ result.snapshot.push(
|
|
|
+ this.getFileId(item[i])
|
|
|
+ );
|
|
|
} else {
|
|
|
- result.file.push(this.getFileId(item[i]))
|
|
|
+ result.file.push(
|
|
|
+ this.getFileId(item[i])
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
- })
|
|
|
- resolve(result)
|
|
|
- })
|
|
|
- })
|
|
|
+ });
|
|
|
+ resolve(result);
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
// 获取文件ID
|
|
|
- getFileId (value) {
|
|
|
+ getFileId(value) {
|
|
|
// 判断是否为图片类型,文件类型只存储文件ID,图片会以对象形式保存
|
|
|
- if (value.includes('id')) {
|
|
|
- const result = []
|
|
|
- const temp = JSON.parse(value)
|
|
|
- temp.forEach(item => result.push(item.id))
|
|
|
- return result.join(',')
|
|
|
+ if (value.includes("id")) {
|
|
|
+ const result = [];
|
|
|
+ const temp = JSON.parse(value);
|
|
|
+ temp.forEach((item) => result.push(item.id));
|
|
|
+ return result.join(",");
|
|
|
}
|
|
|
- return value
|
|
|
+ return value;
|
|
|
},
|
|
|
// 获取内审管审文件
|
|
|
- getSpecicalFile (id) {
|
|
|
- const sql = `select ${specialParams[this.typeId]} from ${specialTable[this.typeId]} where ${specialField[this.typeId]} = '${id}'`
|
|
|
+ getSpecicalFile(id) {
|
|
|
+ const sql = `select ${specialParams[this.typeId]} from ${
|
|
|
+ specialTable[this.typeId]
|
|
|
+ } where ${specialField[this.typeId]} = '${id}'`;
|
|
|
// console.log(sql)
|
|
|
- curdPost('sql', sql).then(res => {
|
|
|
- const { data = [] } = res.variables || {}
|
|
|
+ curdPost("sql", sql).then((res) => {
|
|
|
+ const { data = [] } = res.variables || {};
|
|
|
if (data.length) {
|
|
|
- this.record.special = data.filter(i => i.beforeImprove || i.afterImprove)
|
|
|
+ this.record.special = data.filter(
|
|
|
+ (i) => i.beforeImprove || i.afterImprove
|
|
|
+ );
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
// 打开报表
|
|
|
- openReport (path, id) {
|
|
|
- this.srcUrl = `${this.$reportPash.replace('show', 'pdf')}${path}&id_=${id}`
|
|
|
- this.visible = true
|
|
|
+ openReport(path, id) {
|
|
|
+ this.srcUrl = `${this.$reportPash.replace(
|
|
|
+ "show",
|
|
|
+ "pdf"
|
|
|
+ )}${path}&id_=${id}`;
|
|
|
+ this.visible = true;
|
|
|
// 系统管理角色、实验室主任、档案管理员、信息管理角色可下载打印
|
|
|
if (this.hasRole) {
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
- const toolbarCover = document.createElement('div')
|
|
|
- toolbarCover.classList.add('toolbar-cover')
|
|
|
- toolbarCover.addEventListener('click', () => {
|
|
|
- confirm('无权操作,请联系管理员开放相关权限!', '提示')
|
|
|
- })
|
|
|
- document.querySelector('.js-custom-dialog').firstElementChild.children[1].appendChild(toolbarCover)
|
|
|
- }, 1000)
|
|
|
+ const toolbarCover = document.createElement("div");
|
|
|
+ toolbarCover.classList.add("toolbar-cover");
|
|
|
+ toolbarCover.addEventListener("click", () => {
|
|
|
+ confirm("无权操作,请联系管理员开放相关权限!", "提示");
|
|
|
+ });
|
|
|
+ document
|
|
|
+ .querySelector(".js-custom-dialog")
|
|
|
+ .firstElementChild.children[1].appendChild(toolbarCover);
|
|
|
+ }, 1000);
|
|
|
},
|
|
|
- getParenthesesStr (text) {
|
|
|
- let result = ''
|
|
|
- if (!text) return result
|
|
|
+ getParenthesesStr(text) {
|
|
|
+ let result = "";
|
|
|
+ if (!text) return result;
|
|
|
// 新数据年份、部门、发起人以{}包裹
|
|
|
- const regex1 = /\{(.+?)\}/g
|
|
|
+ const regex1 = /\{(.+?)\}/g;
|
|
|
// 旧数据年份、部门、发起人以()包裹
|
|
|
- const regex2 = /\((.+?)\)/g
|
|
|
- const options1 = text.match(regex1)
|
|
|
- const options2 = text.match(regex2)
|
|
|
- const options = options1 && options1.length ? options1 : options2
|
|
|
+ const regex2 = /\((.+?)\)/g;
|
|
|
+ const options1 = text.match(regex1);
|
|
|
+ const options2 = text.match(regex2);
|
|
|
+ const options = options1 && options1.length ? options1 : options2;
|
|
|
if (options) {
|
|
|
- const option = options[0]
|
|
|
+ const option = options[0];
|
|
|
if (option) {
|
|
|
- result = option.substring(1, option.length - 1)
|
|
|
+ result = option.substring(1, option.length - 1);
|
|
|
}
|
|
|
if (options[1]) {
|
|
|
- const yersOption = options[1]
|
|
|
+ const yersOption = options[1];
|
|
|
if (yersOption) {
|
|
|
- result = result + '/' + yersOption.substring(1, yersOption.length - 1)
|
|
|
+ result =
|
|
|
+ result +
|
|
|
+ "/" +
|
|
|
+ yersOption.substring(1, yersOption.length - 1);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- return result.split('/')
|
|
|
+ return result.split("/");
|
|
|
},
|
|
|
// 获取格式化参数
|
|
|
- getSearcFormData () {
|
|
|
- const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
|
|
|
+ getSearcFormData() {
|
|
|
+ const params = this.$refs["crud"]
|
|
|
+ ? this.$refs["crud"].getSearcFormData()
|
|
|
+ : {};
|
|
|
if (this.$utils.isNotEmpty(this.typeId)) {
|
|
|
- params['Q^TYPE_ID_^S'] = this.typeId
|
|
|
+ params["Q^TYPE_ID_^S"] = this.typeId;
|
|
|
}
|
|
|
- params['Q^status_^S'] = 'end'
|
|
|
- return ActionUtils.formatParams(params, this.pagination, this.sorts)
|
|
|
+ const formattedForm = {
|
|
|
+ arg: {
|
|
|
+ relation: "AND",
|
|
|
+ parameters: [],
|
|
|
+ },
|
|
|
+ };
|
|
|
+ if (this.$utils.isEmptyObject(params)) {
|
|
|
+ params["Q^status_^S"] = "end,manualend";
|
|
|
+ }
|
|
|
+ Object.keys(params).forEach((v) => {
|
|
|
+ const val = params[v];
|
|
|
+ if (this.$utils.isNotEmpty(val)) {
|
|
|
+ const key = v;
|
|
|
+ if (!Array.isArray(val)) {
|
|
|
+ const valArr = val.split(",");
|
|
|
+ if (valArr.length > 1) {
|
|
|
+ const parameters = valArr.map((i) => ({
|
|
|
+ key,
|
|
|
+ value: i,
|
|
|
+ param: this.$utils.guid(),
|
|
|
+ }));
|
|
|
+ formattedForm.arg.parameters.push({
|
|
|
+ relation: "OR",
|
|
|
+ parameters,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ const o = {
|
|
|
+ relation: "AND",
|
|
|
+ parameters: [
|
|
|
+ {
|
|
|
+ key,
|
|
|
+ value: val,
|
|
|
+ param: this.$utils.guid(),
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ formattedForm.arg.parameters.push(o);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ const parameters = val.map((i) => ({
|
|
|
+ key,
|
|
|
+ value: i,
|
|
|
+ param: this.$utils.guid(),
|
|
|
+ }));
|
|
|
+ formattedForm.arg.parameters.push({
|
|
|
+ relation: "OR",
|
|
|
+ parameters,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return ActionUtils.formatParams(
|
|
|
+ formattedForm,
|
|
|
+ this.pagination,
|
|
|
+ this.sorts
|
|
|
+ );
|
|
|
},
|
|
|
// 处理分页事件
|
|
|
- handlePaginationChange (page) {
|
|
|
- ActionUtils.setPagination(this.pagination, page)
|
|
|
- this.loadData()
|
|
|
+ handlePaginationChange(page) {
|
|
|
+ ActionUtils.setPagination(this.pagination, page);
|
|
|
+ this.loadData();
|
|
|
},
|
|
|
// 处理排序
|
|
|
- handleSortChange (sort) {
|
|
|
- ActionUtils.setSorts(this.sorts, sort)
|
|
|
- this.loadData()
|
|
|
+ handleSortChange(sort) {
|
|
|
+ ActionUtils.setSorts(this.sorts, sort);
|
|
|
+ this.loadData();
|
|
|
},
|
|
|
- handleLinkClick (data, columns) {
|
|
|
- this.handleEdit(data.id)
|
|
|
+ handleLinkClick(data, columns) {
|
|
|
+ this.handleEdit(data.id);
|
|
|
},
|
|
|
// 查询
|
|
|
- search () {
|
|
|
+ search() {
|
|
|
if (this.isDisable) {
|
|
|
- this.$message.error('请勿快速点击!')
|
|
|
- return
|
|
|
+ this.$message.error("请勿快速点击!");
|
|
|
+ return;
|
|
|
}
|
|
|
- this.loadData()
|
|
|
- this.numbersClick()
|
|
|
+ this.loadData();
|
|
|
+ this.numbersClick();
|
|
|
},
|
|
|
// 防止多次快速查询
|
|
|
- numbersClick () {
|
|
|
- this.isDisable = true
|
|
|
+ numbersClick() {
|
|
|
+ this.isDisable = true;
|
|
|
setTimeout(() => {
|
|
|
- this.isDisable = false
|
|
|
- }, 1000)
|
|
|
+ this.isDisable = false;
|
|
|
+ }, 1000);
|
|
|
},
|
|
|
// 处理按钮事件
|
|
|
- handleAction (command, position, selection, data) {
|
|
|
+ handleAction(command, position, selection, data) {
|
|
|
switch (command) {
|
|
|
- case 'search': // 查询
|
|
|
- ActionUtils.setFirstPagination(this.pagination)
|
|
|
- this.search()
|
|
|
- break
|
|
|
- case 'remove':
|
|
|
+ case "search": // 查询
|
|
|
+ ActionUtils.setFirstPagination(this.pagination);
|
|
|
+ this.search();
|
|
|
+ break;
|
|
|
+ case "remove":
|
|
|
if (!data || !data.length) {
|
|
|
- this.$message.warning('请选择数据!')
|
|
|
- return
|
|
|
+ this.$message.warning("请选择数据!");
|
|
|
+ return;
|
|
|
}
|
|
|
if (data.length > 10) {
|
|
|
- this.$message.warning('单次最多只能删除十条!')
|
|
|
- return
|
|
|
+ this.$message.warning("单次最多只能删除十条!");
|
|
|
+ return;
|
|
|
}
|
|
|
- this.handleDelete(data, selection)
|
|
|
- break
|
|
|
- case 'detail': // 明细
|
|
|
- ActionUtils.selectedRecord(selection).then((id) => {
|
|
|
- this.handleEdit(id)
|
|
|
- this.title = '信息'
|
|
|
- }).catch(() => {})
|
|
|
- break
|
|
|
+ this.handleDelete(data, selection);
|
|
|
+ break;
|
|
|
+ case "detail": // 明细
|
|
|
+ ActionUtils.selectedRecord(selection)
|
|
|
+ .then((id) => {
|
|
|
+ this.handleEdit(id);
|
|
|
+ this.title = "信息";
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ break;
|
|
|
default:
|
|
|
- break
|
|
|
+ break;
|
|
|
}
|
|
|
},
|
|
|
- handleDelete (data, selection) {
|
|
|
- this.$confirm('将删除选中运行记录与对应数据表数据,删除之后无法恢复, 是否确定?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
- showClose: false,
|
|
|
- closeOnClickModal: false
|
|
|
- }).then(() => {
|
|
|
- const formKeyArr = []
|
|
|
- const delList = {}
|
|
|
- data.forEach(item => {
|
|
|
- const { bizKey, formKey } = item
|
|
|
+ handleDelete(data, selection) {
|
|
|
+ this.$confirm(
|
|
|
+ "将删除选中运行记录与对应数据表数据,删除之后无法恢复, 是否确定?",
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ showClose: false,
|
|
|
+ closeOnClickModal: false,
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ const formKeyArr = [];
|
|
|
+ const delList = {};
|
|
|
+ data.forEach((item) => {
|
|
|
+ const { bizKey, formKey } = item;
|
|
|
if (!delList[formKey]) {
|
|
|
- delList[formKey] = []
|
|
|
+ delList[formKey] = [];
|
|
|
}
|
|
|
- delList[formKey].push(bizKey)
|
|
|
+ delList[formKey].push(bizKey);
|
|
|
if (!formKeyArr.includes(formKey)) {
|
|
|
- formKeyArr.push(formKey)
|
|
|
+ formKeyArr.push(formKey);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
// console.log(delList, formKeyArr)
|
|
|
- const sql = `select a.bo_code_, b.key_ from ibps_form_bo a, ibps_form_def b where a.form_id_ = b.id_ and find_in_set(b.key_, '${formKeyArr.join(',')}')`
|
|
|
+ const sql = `select a.bo_code_, b.key_ from ibps_form_bo a, ibps_form_def b where a.form_id_ = b.id_ and find_in_set(b.key_, '${formKeyArr.join(
|
|
|
+ ","
|
|
|
+ )}')`;
|
|
|
// 获取选中记录对应的数据表code
|
|
|
- curdPost('sql', sql).then(res => {
|
|
|
- const result = res.variables && res.variables.data
|
|
|
- const codeList = {}
|
|
|
- result.forEach(m => {
|
|
|
- codeList[m.key_] = m.bo_code_
|
|
|
- })
|
|
|
- const req = `{"tableName":"ibps_bpm_inst_his","paramWhere":"{id_:'${selection.join(',')}'}"}`
|
|
|
- // 删除选中记录
|
|
|
- curdPost('batchDelete', req).then(() => {
|
|
|
- // 循环删除对应数据表数据
|
|
|
- Object.keys(codeList).forEach(k => {
|
|
|
- const temp = `{"tableName":"t_${codeList[k]}","paramWhere":"{id_:'${delList[k].join(',')}'}"}`
|
|
|
- curdPost('batchDelete', temp)
|
|
|
- })
|
|
|
- this.$message.success('删除成功!')
|
|
|
- this.search()
|
|
|
+ curdPost("sql", sql)
|
|
|
+ .then((res) => {
|
|
|
+ const result = res.variables && res.variables.data;
|
|
|
+ const codeList = {};
|
|
|
+ result.forEach((m) => {
|
|
|
+ codeList[m.key_] = m.bo_code_;
|
|
|
+ });
|
|
|
+ const req = `{"tableName":"ibps_bpm_inst_his","paramWhere":"{id_:'${selection.join(
|
|
|
+ ","
|
|
|
+ )}'}"}`;
|
|
|
+ // 删除选中记录
|
|
|
+ curdPost("batchDelete", req).then(() => {
|
|
|
+ // 循环删除对应数据表数据
|
|
|
+ Object.keys(codeList).forEach((k) => {
|
|
|
+ const temp = `{"tableName":"t_${
|
|
|
+ codeList[k]
|
|
|
+ }","paramWhere":"{id_:'${delList[k].join(
|
|
|
+ ","
|
|
|
+ )}'}"}`;
|
|
|
+ curdPost("batchDelete", temp);
|
|
|
+ });
|
|
|
+ this.$message.success("删除成功!");
|
|
|
+ this.search();
|
|
|
+ });
|
|
|
})
|
|
|
- }).catch(() => {
|
|
|
- this.$message.error('获取数据表key值出错,请联系开发人员!')
|
|
|
- })
|
|
|
- })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message.error(
|
|
|
+ "获取数据表key值出错,请联系开发人员!"
|
|
|
+ );
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
- handleNodeClick (typeId, typeName) {
|
|
|
- this.tableTitle = typeName.name
|
|
|
- this.typeId = typeId
|
|
|
- this.loadData()
|
|
|
+ handleNodeClick(typeId, typeName) {
|
|
|
+ this.tableTitle = typeName.name;
|
|
|
+ this.typeId = typeId;
|
|
|
+ this.loadData();
|
|
|
},
|
|
|
- handleExpandCollapse (isExpand) {
|
|
|
- this.width = isExpand ? 230 : 30
|
|
|
+ handleExpandCollapse(isExpand) {
|
|
|
+ this.width = isExpand ? 230 : 30;
|
|
|
},
|
|
|
// 处理编辑
|
|
|
- handleEdit (id = '') {
|
|
|
- this.instanceId = id
|
|
|
- this.dialogFormVisible = true
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ handleEdit(id = "") {
|
|
|
+ this.instanceId = id;
|
|
|
+ this.dialogFormVisible = true;
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
- .div_operation {
|
|
|
- cursor: pointer;
|
|
|
+.div_operation {
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.sub_operation {
|
|
|
+ width: 100%;
|
|
|
+ height: 20px;
|
|
|
+ line-height: 20px;
|
|
|
+ color: #08c0b7;
|
|
|
+ // color: #85ce61;
|
|
|
+ cursor: pointer;
|
|
|
+ &:before {
|
|
|
+ font-size: 18px;
|
|
|
+ margin-right: 5px;
|
|
|
}
|
|
|
- .sub_operation {
|
|
|
- width: 100%;
|
|
|
- height: 20px;
|
|
|
- line-height: 20px;
|
|
|
- color: #08c0b7;
|
|
|
- // color: #85ce61;
|
|
|
- cursor: pointer;
|
|
|
- &:before {
|
|
|
- font-size: 18px;
|
|
|
- margin-right: 5px;
|
|
|
- }
|
|
|
- // &:last-child {
|
|
|
- // margin-top: 14px;
|
|
|
- // }
|
|
|
+ // &:last-child {
|
|
|
+ // margin-top: 14px;
|
|
|
+ // }
|
|
|
+}
|
|
|
+.sub_content {
|
|
|
+ .title {
|
|
|
+ margin: 0;
|
|
|
+ margin-top: 6px;
|
|
|
+ font-weight: bold;
|
|
|
}
|
|
|
- .sub_content {
|
|
|
- .title {
|
|
|
- margin: 0;
|
|
|
+ .sub_item {
|
|
|
+ display: flex;
|
|
|
+ align-items: baseline;
|
|
|
+ .desc {
|
|
|
margin-top: 6px;
|
|
|
- font-weight: bold;
|
|
|
}
|
|
|
- .sub_item {
|
|
|
- display: flex;
|
|
|
- align-items: baseline;
|
|
|
- .desc {
|
|
|
- margin-top: 6px;
|
|
|
- }
|
|
|
- > div:last-child {
|
|
|
- width: calc(100% - 45px) !important;
|
|
|
- }
|
|
|
+ > div:last-child {
|
|
|
+ width: calc(100% - 45px) !important;
|
|
|
}
|
|
|
}
|
|
|
- .content_item {
|
|
|
- // max-height: 200px;
|
|
|
- margin-bottom: 4px;
|
|
|
- &:first-child{
|
|
|
- .sub_content .title {
|
|
|
- margin-top: 0px;
|
|
|
- }
|
|
|
- }
|
|
|
- ::v-deep .el-upload-list__item {
|
|
|
- line-height: 18px;
|
|
|
+}
|
|
|
+.content_item {
|
|
|
+ // max-height: 200px;
|
|
|
+ margin-bottom: 4px;
|
|
|
+ &:first-child {
|
|
|
+ .sub_content .title {
|
|
|
+ margin-top: 0px;
|
|
|
}
|
|
|
}
|
|
|
- .popverClass_sub {
|
|
|
- .div_content {
|
|
|
- max-height: 300px;
|
|
|
- overflow-y: auto;
|
|
|
- // .content_checkbox {
|
|
|
- // .el-checkbox-group {
|
|
|
- // display: flex;
|
|
|
- // flex-direction: column;
|
|
|
- // z-index: 999;
|
|
|
- // }
|
|
|
- // z-index: 999;
|
|
|
- // }
|
|
|
- // .content_item {
|
|
|
- // z-index: 999;
|
|
|
- // margin-top: 20px;
|
|
|
- // display: flex;
|
|
|
- // justify-content: flex-end;
|
|
|
- // .el-button {
|
|
|
- // padding: 7px 14px;
|
|
|
- // }
|
|
|
- // }
|
|
|
- }
|
|
|
+ ::v-deep .el-upload-list__item {
|
|
|
+ line-height: 18px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.popverClass_sub {
|
|
|
+ .div_content {
|
|
|
+ max-height: 300px;
|
|
|
+ overflow-y: auto;
|
|
|
+ // .content_checkbox {
|
|
|
+ // .el-checkbox-group {
|
|
|
+ // display: flex;
|
|
|
+ // flex-direction: column;
|
|
|
+ // z-index: 999;
|
|
|
+ // }
|
|
|
+ // z-index: 999;
|
|
|
+ // }
|
|
|
+ // .content_item {
|
|
|
+ // z-index: 999;
|
|
|
+ // margin-top: 20px;
|
|
|
+ // display: flex;
|
|
|
+ // justify-content: flex-end;
|
|
|
+ // .el-button {
|
|
|
+ // padding: 7px 14px;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
+}
|
|
|
</style>
|