Преглед на файлове

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

zhangjingyuan преди 2 години
родител
ревизия
d694ce6bf5

+ 264 - 221
src/business/platform/bpmn/form-ext/reject.vue

@@ -1,229 +1,272 @@
 <template>
-  <el-dialog
-    :visible.sync="dialogVisible"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    :title="actionTitle"
-    :class="className"
-    class="bpmn-reject-dialog"
-    append-to-body
-    top="30vh"
-    width="40%"
-    @open="getFormData"
-    @close="closeDialog"
-  >
-    <el-form
-      ref="form"
-      v-loading="dialogLoading"
-      :element-loading-text="$t('common.loading')"
-      :model="form"
-      :rules="rules"
-      label-width="120px"
-      @submit.native.prevent
+    <el-dialog
+        :visible.sync="dialogVisible"
+        :close-on-click-modal="false"
+        :close-on-press-escape="false"
+        :title="actionTitle"
+        :class="className"
+        class="bpmn-reject-dialog"
+        append-to-body
+        top="30vh"
+        width="40%"
+        @open="getFormData"
+        @close="closeDialog"
     >
-      <el-form-item v-if="actionName === 'reject' " label="退回位置:" prop="rejectMode">
-        <el-radio-group v-model="form.rejectMode" @change="changeBackHandMode">
-          <el-radio label="reject">退回上一步</el-radio>
-          <el-radio label="rejectDest">退回指定步骤</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <p style="color: #0000CC;width: 100%; text-align:center; height:80px;font-size: 18px;" v-if="actionTitle=='退回检测'"><i class="el-icon-sort"/> 请确定退回,当前检测任务将重新检测!</p>
-    <!--  <el-form-item
-        v-if="actionName === 'reject' || actionName === 'rejectToStart' && actionTitle!='退回检测'  "
-        label="返回方式:"
-        prop="backHandMode"
-      >
-        <el-radio-group v-model="form.backHandMode" @change="changeBackHandMode">
-          <el-radio label="normal">按流程图重新执行</el-radio>
-          <el-radio label="direct">回到当前任务</el-radio>
-        </el-radio-group>
-
-      </el-form-item> -->
-      <el-form-item
-        v-if="actionName === 'reject' && form.rejectMode==='rejectDest'"
-        prop="destination"
-      >
-        <span slot="label" v-html="'驳回到节点<br>('+(form.backHandMode==='direct'?'直来直往':'按流程图')+'):'" />
-        <el-select v-model="form.destination" placeholder="请选择" style="margin-top: 20px;">
-          <el-option v-for="item in userNodeList " :key="item.nodeId" :value="item.nodeId" :label="item.name" />
-        </el-select>
-      </el-form-item>
-      <el-form-item v-if="!hideOpinion" label="审批意见:" prop="opinion">
-        <approval-opinion
-          v-model="form.opinion"
-          :action="action"
-        />
-      </el-form-item>
-
-    </el-form>
-    <div slot="footer" class="el-dialog--center">
-      <el-button type="primary" icon="ibps-icon-save" @click="handleSave()">确 定 退 回</el-button>
-      <el-button icon="el-icon-circle-close" type="danger" @click="closeDialog()">取 消</el-button>
-    </div>
-  </el-dialog>
+        <el-form
+            ref="form"
+            v-loading="dialogLoading"
+            :element-loading-text="$t('common.loading')"
+            :model="form"
+            :rules="rules"
+            label-width="120px"
+            @submit.native.prevent
+        >
+            <el-form-item
+                v-if="actionName === 'reject'"
+                label="退回位置:"
+                prop="rejectMode"
+            >
+                <el-radio-group
+                    v-model="form.rejectMode"
+                    @change="changeBackHandMode"
+                >
+                    <el-radio label="reject">退回上一步</el-radio>
+                    <el-radio label="rejectDest">退回指定步骤</el-radio>
+                </el-radio-group>
+            </el-form-item>
+            <!-- <p
+                style="
+                    color: #0000cc;
+                    width: 100%;
+                    text-align: center;
+                    height: 80px;
+                    font-size: 18px;
+                "
+                v-if="actionTitle == '退回检测'"
+            >
+                <i class="el-icon-sort" /> 请确定退回,当前检测任务将重新检测!
+            </p>
+            <el-form-item
+                v-if="actionName === 'reject' || (actionName === 'rejectToStart' && actionTitle != '退回检测')"
+                label="返回方式:"
+                prop="backHandMode"
+            >
+                <el-radio-group
+                    v-model="form.backHandMode"
+                    @change="changeBackHandMode"
+                >
+                    <el-radio label="normal">按流程图重新执行</el-radio>
+                    <el-radio label="direct">回到当前任务</el-radio>
+                </el-radio-group>
+            </el-form-item> -->
+            <el-form-item
+                v-if="actionName === 'reject' && form.rejectMode === 'rejectDest'"
+                prop="destination"
+            >
+                <span
+                    slot="label"
+                    v-html="'驳回到节点<br>(' +(form.backHandMode === 'direct' ? '直来直往' : '按流程图') + '):' "
+                />
+                <el-select
+                    v-model="form.destination"
+                    placeholder="请选择"
+                    style="margin-top: 20px;"
+                >
+                    <el-option
+                        v-for="item in userNodeList"
+                        :key="item.nodeId"
+                        :value="item.nodeId"
+                        :label="item.name"
+                    />
+                </el-select>
+            </el-form-item>
+            <el-form-item v-if="!hideOpinion" label="审批意见:" prop="opinion">
+                <approval-opinion v-model="form.opinion" :action="action" />
+            </el-form-item>
+        </el-form>
+        <div slot="footer" class="el-dialog--center">
+            <el-button
+                type="primary"
+                icon="ibps-icon-save"
+                @click="handleSave()"
+            >确 定 退 回</el-button>
+            <el-button
+                icon="el-icon-circle-close"
+                type="danger"
+                @click="closeDialog()"
+            >取 消</el-button>
+        </div>
+    </el-dialog>
 </template>
 <script>
-import { toReject, toRejectToPrevious, toRejectToStart } from '@/api/platform/bpmn/bpmTask'
-import ApprovalOpinion from '@/business/platform/bpmn/components/approval-opinion'
-import { queryIncludeNull } from '@/api/platform/bpmn/bpmCommonStatment'
-import ActionUtils from '@/utils/action'
+    import { toReject, toRejectToPrevious, toRejectToStart } from '@/api/platform/bpmn/bpmTask'
+    import ApprovalOpinion from '@/business/platform/bpmn/components/approval-opinion'
+    import { queryIncludeNull } from '@/api/platform/bpmn/bpmCommonStatment'
+    import ActionUtils from '@/utils/action'
 
-export default {
-  components: {
-    ApprovalOpinion
-  },
-  props: {
-    className: String,
-    visible: Boolean,
-    action: String,
-    title: String,
-    taskId: String,
-    data: [String, Object],
-    hideOpinion: { // 隐藏意见
-      type: Boolean,
-      default: false
-    },
-    formOpinion: { // 表单意见
-      type: String
-    }
-  },
-  data() {
-    return {
-      dialogVisible: this.visible,
-      dialogLoading: false,
-      formName: 'form',
-      formLabelWidth: '130px',
-      actionName: '',
-      userNodeList: [],
-      bpmExecUserNode: [],
-      bpmExecGoMapUserNode: [],
-      form: {
-        rejectMode: 'reject',
-        backHandMode: 'normal',
-        destination: '',
-        opinion: ''
-      },
-      rules: {
-        destination: [{ required: true, message: this.$t('validate.required') }],
-        opinion: [{ required: true, message: this.$t('validate.required') }]
-      }
-    }
-  },
-  computed: {
-    actionTitle() {
-      if (this.title) {
-        return this.title
-      }
-      if (this.actionName === 'rejectToPrevious') {
-        return '驳回上一步'
-      } else if (this.actionName === 'rejectToStart') {
-        return '驳回发起人'
-      } else if (this.actionName === 'reject') {
-        return '驳回审批'
-      } else {
-        return '驳回'
-      }
-    }
-  },
-  watch: {
-    visible: {
-      handler: function(val, oldVal) {
-        this.dialogVisible = this.visible
-        this.actionName = this.action
-      },
-      immediate: true
-    }
-  },
-  methods: {
-    openedDialog() {
-      if (this.$utils.isNotEmpty(this.formOpinion)) {
-        this.form.opinion = this.formOpinion
-      } else {
-        queryIncludeNull(ActionUtils.formatParams(
-          {
-            'Q^ACTION_^S': this.action,
-            'Q^CREATE_BY_^S': this.$store.getters.userId
-          })).then(response => {
-          const data = response.variables && response.variables.def ? response.variables.def.value || '' : ''
-          if (this.$utils.isNotEmpty(data)) {
-            this.form.opinion = data
-          }
-        })
-      }
-    },
-    changeBackHandMode() {
-      if (this.actionName === 'reject' && this.form.rejectMode === 'rejectDest') {
-        this.formValidate()
-        this.userNodeList = this.form.backHandMode === 'normal' ? this.bpmExecGoMapUserNode : this.bpmExecUserNode
-      }
-    },
-    closeDialog() {
-      this.form.opinion = ''
-      this.$emit('close', false)
-    },
-    handleSave() {
-      this.$refs[this.formName].validate(valid => {
-        if (valid) {
-          this.$emit('action-event', this.action, this.form)
-        } else {
-          ActionUtils.saveErrorMessage()
+    export default {
+        components: {
+            ApprovalOpinion
+        },
+        props: {
+            className: String,
+            visible: Boolean,
+            action: String,
+            title: String,
+            taskId: String,
+            data: [String, Object],
+            hideOpinion: {
+                // 隐藏意见
+                type: Boolean,
+                default: false
+            },
+            formOpinion: {
+                // 表单意见
+                type: String
+            }
+        },
+        data() {
+            return {
+                dialogVisible: this.visible,
+                dialogLoading: false,
+                formName: 'form',
+                formLabelWidth: '130px',
+                actionName: '',
+                userNodeList: [],
+                bpmExecUserNode: [],
+                bpmExecGoMapUserNode: [],
+                form: {
+                    rejectMode: 'reject',
+                    backHandMode: 'normal',
+                    destination: '',
+                    opinion: ''
+                },
+                rules: {
+                    destination: [
+                        {
+                            required: true,
+                            message: this.$t('validate.required')
+                        }
+                    ],
+                    opinion: [
+                        {
+                            required: true,
+                            message: this.$t('validate.required')
+                        }
+                    ]
+                }
+            }
+        },
+        computed: {
+            actionTitle() {
+                if (this.title) {
+                    return this.title
+                }
+                if (this.actionName === 'rejectToPrevious') {
+                    return '驳回上一步'
+                } else if (this.actionName === 'rejectToStart') {
+                    return '驳回发起人'
+                } else if (this.actionName === 'reject') {
+                    return '驳回审批'
+                } else {
+                    return '驳回'
+                }
+            }
+        },
+        watch: {
+            visible: {
+                handler: function (val, oldVal) {
+                    this.dialogVisible = this.visible
+                    this.actionName = this.action
+                },
+                immediate: true
+            }
+        },
+        methods: {
+            openedDialog() {
+                if (this.$utils.isNotEmpty(this.formOpinion)) {
+                    this.form.opinion = this.formOpinion
+                } else {
+                    queryIncludeNull(
+                        ActionUtils.formatParams({
+                            'Q^ACTION_^S': this.action,
+                            'Q^CREATE_BY_^S': this.$store.getters.userId
+                        })
+                    ).then((response) => {
+                        const data = response.variables && response.variables.def ? response.variables.def.value || '' : ''
+                        if (this.$utils.isNotEmpty(data)) {
+                            this.form.opinion = data
+                        }
+                    })
+                }
+            },
+            changeBackHandMode() {
+                if (this.actionName === 'reject' && this.form.rejectMode === 'rejectDest') {
+                    this.formValidate()
+                    this.userNodeList = this.form.backHandMode === 'normal' ? this.bpmExecGoMapUserNode : this.bpmExecUserNode
+                }
+            },
+            closeDialog() {
+                this.form.opinion = ''
+                this.$emit('close', false)
+            },
+            handleSave() {
+                this.$refs[this.formName].validate((valid) => {
+                    if (valid) {
+                        this.$emit('action-event', this.action, this.form)
+                    } else {
+                        ActionUtils.saveErrorMessage()
+                    }
+                })
+            },
+            /**
+             * 表单验证
+             */
+            formValidate() {
+                this.$nextTick(() => {
+                    this.$refs[this.formName].validate(() => {})
+                })
+            },
+            getFormData() {
+                this.openedDialog()
+                this.$nextTick(() => {
+                    this.$refs[this.formName].resetFields()
+                })
+                this.dialogLoading = true
+                switch (this.actionName) {
+                    case 'reject': // 驳回
+                        toReject({ taskId: this.taskId }).then((response) => {
+                            this.formValidate()
+                            this.dialogLoading = false
+                            const data = response.data
+                            this.userNodeList = this.bpmExecUserNode = data.bpmExecUserNode
+                            this.bpmExecGoMapUserNode = data.bpmExecGoMapUserNode
+                        }).catch(() => {
+                            this.dialogLoading = false
+                        })
+                        break
+                    case 'rejectToPrevious': // 驳回上一步
+                        toRejectToPrevious({ taskId: this.taskId }).then((response) => {
+                            this.formValidate()
+                            this.dialogLoading = false
+                            // TODO:默认意见
+                        }).catch(() => {
+                            this.dialogLoading = false
+                        })
+                        break
+                    case 'rejectToStart':
+                        toRejectToStart({ taskId: this.taskId }).then((response) => {
+                            this.formValidate()
+                            this.dialogLoading = false
+                            // TODO:默认意见
+                        }).catch(() => {
+                            this.dialogLoading = false
+                        })
+                        break
+                    default:
+                        break
+                }
+            }
         }
-      })
-    },
-    /**
-     * 表单验证
-     */
-    formValidate() {
-      this.$nextTick(() => {
-        this.$refs[this.formName].validate(() => {})
-      })
-    },
-    getFormData() {
-      this.openedDialog()
-      this.$nextTick(() => {
-        this.$refs[this.formName].resetFields()
-      })
-      this.dialogLoading = true
-      switch (this.actionName) {
-        case 'reject': // 驳回
-          toReject({
-            taskId: this.taskId
-          }).then(response => {
-            this.formValidate()
-            this.dialogLoading = false
-            const data = response.data
-            this.userNodeList = this.bpmExecUserNode = data.bpmExecUserNode
-            this.bpmExecGoMapUserNode = data.bpmExecGoMapUserNode
-          }).catch(() => {
-            this.dialogLoading = false
-          })
-          break
-        case 'rejectToPrevious': // 驳回上一步
-          toRejectToPrevious({
-            taskId: this.taskId
-          }).then(response => {
-            this.formValidate()
-            this.dialogLoading = false
-            // TODO:默认意见
-          }).catch(() => {
-            this.dialogLoading = false
-          })
-          break
-        case 'rejectToStart':
-          toRejectToStart({
-            taskId: this.taskId
-          }).then(response => {
-            this.formValidate()
-            this.dialogLoading = false
-            // TODO:默认意见
-          }).catch(() => {
-            this.dialogLoading = false
-          })
-          break
-        default:
-          break
-      }
     }
-  }
-}
 </script>

+ 6 - 8
src/business/platform/bpmn/form/action.js

@@ -17,7 +17,6 @@ export default {
         // 设置是否过审的状态
         setData(title) {
             let data = title
-            console.log(this.getFormEL())
             if (!title) {
                 //获取当前流程步骤名
                 data = "已" + this.getFormEL().formDefData.flowName
@@ -108,11 +107,12 @@ export default {
                 case 'rejectToStart':// 驳回发起人
                 case 'reject':// 驳回
                     this.setData("已退回")
-                    if (this.isBpmOpinionHide && actionName === 'rejectToPrevious') {
-                        this.handleDirectActionEvent(actionName)
-                    } else {
-                        this.rejectDialogVisible = true
-                    }
+                    // if (this.isBpmOpinionHide && actionName === 'rejectToPrevious') {
+                    //     this.handleDirectActionEvent(actionName)
+                    // } else {
+                    //     this.rejectDialogVisible = true
+                    // }
+                    this.rejectDialogVisible = true
                     break
                 case 'delegate':// 转办
                     this.delegateReadonly = false
@@ -425,7 +425,6 @@ export default {
                 })
             }).catch((err) => {
                 loading.close()
-                console.error(err)
             })
         },
         /**
@@ -459,7 +458,6 @@ export default {
                 })
             }).catch((err) => {
                 loading.close()
-                console.error(err)
             })
         },
         /**

+ 2 - 2
src/business/platform/data/templaterender/components/print.vue

@@ -140,7 +140,7 @@
             position: relative;
             width: 244px;
             height: 140px;
-            padding: 4px 2px;
+            padding: 4px 2px 0;
             margin: 0 auto 20px;
             border: 1px solid #000;
             border-radius: 4px;
@@ -158,7 +158,7 @@
             .barcode {
                 position: absolute;
                 text-align: center;
-                bottom: 0px;
+                bottom: 4px;
                 left: 0;
                 right: 0;
             }

+ 170 - 186
src/business/platform/form/formrender/dialog.vue

@@ -1,49 +1,10 @@
 <template>
-  <el-dialog
-    ref="dialog"
-    :visible.sync="dialogVisible"
-    :close-on-click-modal="false"
-    class="form-renderer-dialog"
-    :width="width"
-    :top="top"
-    :title="title"
-    :custom-class="customClass"
-    append-to-body
-    @open="loadFormData"
-    @close="closeDialog"
-  >
-    <ibps-formrender
-      v-if="dialogVisible && formDef"
-      ref="formrender"
-      :form-def="formDefData"
-      :data="formData"
-      :isDialog="true"
-      :mode="mode"
-      @load="loadFormrender"
-      @cur-active-step="(val)=>curActiveStep=val"
-    />
-    <div slot="footer" class="el-dialog--center">
-      <template>
-        <el-button
-          v-for="button in stepButtons"
-          :key="button.key"
-          :size="button.size||$ELEMENT.size"
-          :icon="'ibps-icon-'+button.icon"
-          :autofocus="false"
-          :disabled="disabledStepButton(button.key)"
-          :loading="stepLoading"
-          @click="()=>{ handleStepButtonEvent(button)}"
-        >{{ button.label }}
-        </el-button>
-        <span class="ibps-pr-10">&nbsp;</span>
-      </template>
-
-      <ibps-toolbar
-        :actions="toolbars"
-        @action-event="handleActionEvent"
-      />
-    </div>
-  </el-dialog>
+    <el-dialog ref="dialog" :visible.sync="dialogVisible" :close-on-click-modal="false" class="form-renderer-dialog" :width="width" :top="top" :title="getTitle(title)" :custom-class="customClass"  append-to-body @open="loadFormData" @close="closeDialog">
+        <ibps-formrender v-if="dialogVisible && formDef" ref="formrender" :form-def="formDefData" :data="formData" :isDialog="true" :mode="mode" :readonly="editFromType == 'consult'" @load="loadFormrender" @cur-active-step="(val) => (curActiveStep = val)" />
+        <div slot="footer" class="el-dialog--center">
+            <ibps-toolbar :actions="editFromType != 'consult' ? toolbars : toolbarsConsult" @action-event="handleActionEvent" />
+        </div>
+    </el-dialog>
 </template>
 <script>
 import ActionUtils from '@/utils/action'
@@ -51,160 +12,183 @@ import Vue from 'vue'
 Vue.component('ibps-formrender', () => import('@/business/platform/form/formrender/index.vue'))
 
 export default {
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    title: {
-      type: String
-    },
-    customClass: {
-      type: String
-    },
-    width: {
-      type: String,
-      default: '80%'
-    },
-    top: {
-      type: String,
-      default: '0'
-    },
-    formDef: { // 表单定义
-      type: Object
+    props: {
+        visible: {
+            type: Boolean,
+            default: false
+        },
+        title: {
+            type: String
+        },
+        customClass: {
+            type: String
+        },
+        width: {
+            type: String,
+            default: '80%'
+        },
+        top: {
+            type: String,
+            default: '0'
+        },
+        formDef: {
+            // 表单定义
+            type: Object
+        },
+        data: {
+            // 表单数据
+            type: Object
+        },
+        mode: {
+            // 表单模式
+            type: String
+        },
+        editFromType: {
+            type: String,
+            default: 'add'
+        }
     },
-    data: { // 表单数据
-      type: Object
+    data() {
+        return {
+            dialogVisible: this.visible,
+            formDefData: null,
+            formData: {},
+            formOpinionData: {},
+            toolbars: [
+                { key: 'confirm', label: '确定'},
+                { key: 'cancel'}
+            ],
+            // 查阅按钮
+            toolbarsConsult: [{ key: 'cancel' }],
+            stepButtons: [],
+            curActiveStep: 0,
+            stepNum: 3,
+            stepLoading: false
+        }
     },
-    mode: { // 表单模式
-      type: String
-    }
-  },
-  data() {
-    return {
-      dialogVisible: this.visible,
-      formDefData: null,
-      formData: {},
-      formOpinionData: {},
-      toolbars: [
-        { key: 'confirm', label: '确定' },
-        { key: 'cancel' }
-      ],
-      stepButtons: [],
-      curActiveStep: 0,
-      stepNum: 3,
-      stepLoading: false
-    }
-  },
-  watch: {
-    visible: {
-      handler: function(val, oldVal) {
-        this.dialogVisible = this.visible
-      },
-      immediate: true
-    }
-  },
-  methods: {
-    handleActionEvent({ key }) {
-      switch (key) {
-        case 'confirm':
-        this.handleConfirm(key)
-          break
-        case 'cancel' :
-          this.closeDialog()
-          break
-        default:
-          break
-      }
+    watch: {
+        visible: {
+            handler: function (val, oldVal) {
+                this.dialogVisible = this.visible
+            },
+            immediate: true
+        }
     },
-    handleConfirm(key) {
-      // 验证表单是否正确
-      this.validate(valid => {
-        if (valid) {
-          // 表单提交校验
-          this.formSubmitVerify((result, errorMsg) => {
-            if (!result) {
-              this.$message.closeAll()
-              return this.$message.warning(errorMsg)
+    methods: {
+        getTitle(title) {
+            let data = '添加'
+            if (this.editFromType == 'add') {
+                data = '添加'
+            } else if (this.editFromType == 'edit') {
+                data = '编辑'
+            } else if (this.editFromType == 'consult') {
+                data = '查阅'
             }
+            let titleData = title ? ' - ' : ''
+            return title + titleData + data
+        },
+        handleActionEvent({ key }) {
+            switch (key) {
+                case 'confirm':
+                    this.handleConfirm(key)
+                    break
+                case 'cancel':
+                    this.closeDialog()
+                    break
+                default:
+                    break
+            }
+        },
+        handleConfirm(key) {
+            // 验证表单是否正确
+            this.validate((valid) => {
+                if (valid) {
+                    // 表单提交校验
+                    this.formSubmitVerify((result, errorMsg) => {
+                        if (!result) {
+                            this.$message.closeAll()
+                            return this.$message.warning(errorMsg)
+                        }
 
-            this.$emit('action-event', key, this.getFormData())
-          })
-        } else {
-          this.formErrorToast()
-        }
-      })
-    },
-    getForm() {
-      return this.$refs.formrender
-    },
-    /**
-     * 获取表单验证
-     */
-    validate(callback) {
-      this.getForm().validate((valid, invalidFields) => {
-        callback(valid, invalidFields)
-      })
-    },
-    formErrorToast() {
-      ActionUtils.saveErrorMessage()
-    },
-    // 处理表单提交验证
-    formSubmitVerify(callback) {
-      this.getForm().formSubmitVerify(callback)
-    },
-    /**
-     * 获取表单数据
-     */
-    getFormData() {
-      return this.getForm().getFormData()
-    },
+                        this.$emit('action-event', key, this.getFormData())
+                    })
+                } else {
+                    this.formErrorToast()
+                }
+            })
+        },
+        getForm() {
+            return this.$refs.formrender
+        },
+        /**
+         * 获取表单验证
+         */
+        validate(callback) {
+            this.getForm().validate((valid, invalidFields) => {
+                callback(valid, invalidFields)
+            })
+        },
+        formErrorToast() {
+            ActionUtils.saveErrorMessage()
+        },
+        // 处理表单提交验证
+        formSubmitVerify(callback) {
+            this.getForm().formSubmitVerify(callback)
+        },
+        /**
+         * 获取表单数据
+         */
+        getFormData() {
+            return this.getForm().getFormData()
+        },
 
-    // 关闭当前窗口
-    closeDialog() {
-      this.formDefData = null
-      this.formData = null
-      this.$emit('close', false)
-    },
-    loadFormData() {
-      this.formDefData = JSON.parse(JSON.stringify(this.formDef))
-      this.formData = JSON.parse(JSON.stringify(this.data))
-    },
-    loadFormrender(form) {
-      const stepButtons = form.stepButtons
-      if (this.$utils.isEmpty(stepButtons)) { return }
-      this.stepButtons = stepButtons
-      this.stepNum = form.stepNum
-    },
-    disabledStepButton(key) {
-      if (key === 'prev') {
-        return this.curActiveStep === 0
-      } else {
-        return this.stepNum - 1 === this.curActiveStep
-      }
-    },
-    handleStepButtonEvent(button) {
-      this.getForm().handleStepButtonEvent(button)
+        // 关闭当前窗口
+        closeDialog() {
+            this.formDefData = null
+            this.formData = null
+            this.$emit('close', false)
+        },
+        loadFormData() {
+            this.formDefData = JSON.parse(JSON.stringify(this.formDef))
+            this.formData = JSON.parse(JSON.stringify(this.data))
+        },
+        loadFormrender(form) {
+            const stepButtons = form.stepButtons
+            if (this.$utils.isEmpty(stepButtons)) {
+                return
+            }
+            this.stepButtons = stepButtons
+            this.stepNum = form.stepNum
+        },
+        disabledStepButton(key) {
+            if (key === 'prev') {
+                return this.curActiveStep === 0
+            } else {
+                return this.stepNum - 1 === this.curActiveStep
+            }
+        },
+        handleStepButtonEvent(button) {
+            this.getForm().handleStepButtonEvent(button)
+        }
     }
-  }
 }
 </script>
 <style lang="scss" >
-  .form-renderer-dialog{
+.form-renderer-dialog {
     .el-dialog__body {
-      padding: 10px 0 5px 0;
+        padding: 10px 0 5px 0;
     }
-    .el-dialog__headerbtn{
-      z-index: 99999;
+    .el-dialog__headerbtn {
+        z-index: 99999;
     }
     @media print {
-      .el-dialog__headerbtn {
-        display: none !important
-      }
-      .hidden-print{
-        padding: 0;
-        margin:  0;
-      }
+        .el-dialog__headerbtn {
+            display: none !important;
+        }
+        .hidden-print {
+            padding: 0;
+            margin: 0;
+        }
     }
-  }
+}
 </style>

+ 7 - 21
src/business/platform/form/formrender/dynamic-form/dynamic-form-table.vue

@@ -6,10 +6,7 @@
                 <div class="panel-heading ibps-clearfix">
                     <div v-if="!formDialogVisible" class="ibps-fl dynamic-form-table__label table-tetle-style">{{ field.label }}</div>
                     <!--弹窗模式对话框-->
-                    <formrender-dialog ref="jyxtEdit" v-if="formDialogVisible" :title="field.label" :form-def="dialogFormDef" :data="dialogFormData" :mode="mode" :editFromType="editFromType" @close="deleteEdit()" @action-event="handleFormDialogActionEvent" />
                     <div v-if="toolbarButtons && toolbarButtons.length > 0" class="ibps-fr hidden-print">
-                        <!-- :visible="formDialogVisible"-->
-
                         <el-button-group>
                             <el-button v-for="(button, index) in toolbarButtons" :key="index" :type="button.type" :icon="button.icon" @click="handleActionEvent(button, index)">
                                 {{ button.label }}
@@ -23,7 +20,6 @@
                         <el-table-column v-if="field.field_options.index" type="index" :label="field.field_options.index_name ? field.field_options.index_name : '序号'" :width="field.field_options.index_width ? field.field_options.index_width : 50" />
                         <template v-for="(column, j) in displayColumns">
                             <el-table-column show-overflow-tooltip v-if="!columnHidden(column) && column.field_type != 'desc' && column.label != ''" :key="j" :prop="column.name" :width="column.field_options.custom_class || null">
-                                <!--  :width="column.field_options.is_label_width ?column.field_options.label_width + (column.field_options.label_width_unit || 'px') :null"-->
                                 <template slot="header">
                                     {{ $utils.isNotEmpty(column.field_options.units) ? column.label + '(' + column.field_options.units + ')' : column.label }}
                                     <ibps-help v-if="column && column.desc && descPosition === 'lableIcon'" type="tooltip" :content="$utils.formatText(column.desc)" />
@@ -98,6 +94,8 @@
 
         <import-table :visible="importTableDialogVisible" :title="field.label" @close="(visible) => (importTableDialogVisible = visible)" @action-event="handleImportTableActionEvent" />
         <component :is="dialogTemplate" v-if="dialogTemplate" ref="dialogTemplate" v-bind="dialogTemplateAtts" />
+
+        <formrender-dialog ref="jyxtEdit" :visible="formDialogVisible" :title="field.label" :form-def="dialogFormDef" :data="dialogFormData" :mode="mode" :editFromType="editFromType" custom-class="ibps-dialog-80" @close="(visible) => (formDialogVisible = visible)" @action-event="handleFormDialogActionEvent" />
     </div>
 </template>
 <script>
@@ -112,7 +110,7 @@ import FormFieldUtil from '../../utils/formFieldUtil'
 import { hasPermission } from '@/business/platform/form/constants/tableButtonTypes'
 
 import CustomDialog from '@/business/platform/data/templaterender/custom-dialog/dialog'
-import FormrenderDialog from '@/business/platform/form/formrender/editForm'
+import FormrenderDialog from '@/business/platform/form/formrender/dialog'
 import ImportTable from './components/import-table'
 import IbpsExport from '@/plugins/export'
 import IbpsImport from '@/plugins/import'
@@ -309,19 +307,6 @@ export default {
         }
     },
     beforeDestroy() {
-        /* this.dataModel = null
-    this.copDataModel =null
-    this.fieldRights = null
-    this.tableRights = null
-    this.columnsRights = null
-    this.buttonsRights = null
-    this.customDialogDynamicParams = null
-    this.customDialogCustom = null
-    this.dialogFormDef = null
-    this.dialogFormData = null
-    this.dialogTemplate = null
-    this.dialogTemplateAtts = null
-    this.handleCout = null */
         this.dynamicShow = false
         // 注销当前表格保存在window[this.mainCode+'TableRefs']的this
         this.destoryTable()
@@ -565,9 +550,9 @@ export default {
             this.initRunCalFormula(this.dataModel.length - 1)
             // 后置事件
             this.afterScript(this.actionCode, this.actionPosition)
-            /*  if (this.$refs.elTable) {
-          this.$refs.elTable.doLayout()
-        } */
+            if (this.$refs.elTable) {
+                this.$refs.elTable.doLayout()
+            }
         },
         /**
          * 获取选择的记录
@@ -897,6 +882,7 @@ export default {
             } else {
                 this.addData(data)
             }
+            this.formDialogVisible = false
         },
         // =====================自定义对话框=====================
 

+ 4 - 2
src/plugins/export/_export2Excel.js

@@ -141,7 +141,9 @@ export function export_json_to_excel(th, jsonData, defaultTitle, options = { mer
   wb.SheetNames.push(ws_name)
   wb.Sheets[ws_name] = ws
 
-  var wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: false, type: 'binary' })
+//   var wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: false, type: 'binary' })
+  var wbout = XLSX.write(wb, { bookType: 'xls', bookSST: false, type: 'binary' })
   var title = defaultTitle || '列表'
-  FileSaver.saveAs(new Blob([s2ab(wbout)], { type: 'application/octet-stream' }), title + '.xlsx')
+//   FileSaver.saveAs(new Blob([s2ab(wbout)], { type: 'application/octet-stream' }), title + '.xlsx')
+FileSaver.saveAs(new Blob([s2ab(wbout)], { type: 'application/octet-stream' }), title + '.xls')
 }

+ 19 - 3
src/views/platform/bpmn/bpmInstHis/corresponding/index.js

@@ -27,11 +27,20 @@ export const listTypeData = {
 const neishen = '859879582994530304'
 const guanshen = '859879751135789056'
 
+// 特殊类型值
 let specialType = {}
+// 不符合项整改项归档信息
 let specialBtn = {}
+// 不符合项整改项查询参数
 let specialParams = {}
+// 不符合项整改项查询数据表
 let specialTable = {}
+// 不符合项整改项查询外键
 let specialField = {}
+// 整体状态查询数据表
+let stateTable = {}
+// 整体状态查询外键
+let stateField = {}
 
 specialType[neishen] = [
     '首次会议签到',
@@ -42,7 +51,8 @@ specialType[neishen] = [
     '不符合项整改'
 ]
 specialType[guanshen] = [
-    
+    // '管审计划',
+    '签到纪要'
 ]
 
 specialBtn[neishen] = {
@@ -61,14 +71,20 @@ specialParams[guanshen] = 'id_, gai_jin_qian_jian as beforeImprove, fu_jian_ as
 
 specialTable[neishen] = 't_bfhxbgyjzcsjlbx'
 specialTable[guanshen] = 't_glpsjhb'
-
 specialField[neishen] = 'ji_hua_zong_wai_j'
 specialField[guanshen] = 'zong_wai_jian_'
 
+stateTable[neishen] = 't_nbss'
+stateTable[guanshen] = 't_gglpsjhx'
+stateField[neishen] = 'ji_hua_zong_wai_j'
+stateField[guanshen] = 'id_'
+
 export {
     specialType,
     specialBtn,
     specialParams,
     specialTable,
-    specialField
+    specialField,
+    stateTable,
+    stateField
 }

+ 30 - 14
src/views/platform/bpmn/bpmInstHis/list.vue

@@ -166,7 +166,7 @@
     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, specialField } from './corresponding/index'
+    import { specialType, specialBtn, specialParams, specialTable, stateTable, stateField, specialField } from './corresponding/index'
     
     export default {
         components: {
@@ -239,7 +239,7 @@
                         // { prop: 'subject', label: '任务标题', link: 'dialog', width: 250 },
                         { prop: 'tYear', label: '年份', width: 60 },
                         { prop: 'tDept', label: '部门', width: 90 },
-                        { prop: 'procDefName', label: '表单名称', sortable: 'custom', width: 250 },
+                        { 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}
@@ -270,6 +270,13 @@
             }
         },
         methods: {
+            replaceFormName (row, column, cellValue, index) {
+                let t = cellValue === '管理评审计划'
+                if (t) {
+                    return '管理评审'
+                }
+                return cellValue
+            },
             // 截取事务说明字段内容
             getDesc(row, column, cellValue, index) {
                 let hasDesc = cellValue.includes('#')
@@ -340,22 +347,31 @@
                     special: [],
                     bizKey
                 }
-                let typeIndex = ''
+                let typeIndex = 1
                 // 特殊类型处理
                 if (this.specialType.hasOwnProperty(this.typeId)) {
-                    this.specialType[this.typeId].forEach((item, index) => {
-                        // 判断当前流程在哪一步,以此决定报表展示
-                        if (subject.includes(item)) {
-                            // 数组下标+2为当前报表文件排序
-                            typeIndex = index + 2
+                    // 获取内审管审全局状态,根据此状态过滤报表显示
+                    let 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(typeIndex)
-                if (typeIndex !== '') {
-                    this.record.report = this.record.report.slice(0, typeIndex)
-                }
                 // console.log(this.record)
                 if (this.record.file.length && this.record.table.length) {
                     this.getAllFile(this.record)
@@ -417,7 +433,7 @@
             // 获取内审管审文件
             getSpecicalFile(id) {
                 let sql = `select ${specialParams[this.typeId]} from ${specialTable[this.typeId]} where ${specialField[this.typeId]} = '${id}'`
-                console.log(sql)
+                // console.log(sql)
                 curdPost('sql', sql).then(res => {
                     const { data = [] } = res.variables || {}
                     if (data.length) {
@@ -660,4 +676,4 @@
             }
         }
     }
-</style>
+</style>

+ 97 - 44
src/views/platform/bpmn/bpmInstHis/oldFilesUploadList.vue

@@ -1,12 +1,11 @@
 <template>
   <div class="main-container">
-
     <div slot="west">
       <ibps-type-tree :width="width"
                       :height="height"
                       title="记录分类"
                       :location="location"
-                      category-key="FLOW_TYPE"
+                      category-key="OLDRECORD_TYPE"
                       @node-click="handleNodeClick"
                       @expand-collapse="handleExpandCollapse" />
     </div>
@@ -40,9 +39,8 @@
                      :def-id="defId"
                      :pk-value="pkValue"
                      :form-key="formKey"
-                     @callback=""
                      :addDataCont="addDataCont"
-                     @close="visible => dialogFormVisible = visible" />``
+                     @close="visible => dialogFormVisible = visible" />
 
     <el-dialog :close-on-click-modal="false"
                :close-on-press-escape="false"
@@ -71,6 +69,7 @@ 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,
@@ -109,7 +108,19 @@ export default {
       height: document.clientHeight,
       reportAll: [],
       listData: [],
-      pagination: { limit: 0, page: 0, totalCount: 0, totalPages: 0 },
+      bianlistData: {
+        dataResult: [],
+        pageResult: {
+          limit: 0,
+          page: 0,
+          totalCount: 0,
+          totalPages: 0
+        }
+      },
+      selectListData: [],
+      pagination: {
+        limit: 20, page: 1
+      },
       paginations: 20,
       page: 1,
       sorts: {},
@@ -138,11 +149,13 @@ export default {
         // 表格字段配置
         columns: [
           { prop: 'fen_lei_', label: '记录表单分类', width: 120 },
-          { prop: 'biao_dan_ming_che', label: '表单名称', width: 300 },
-          { prop: 'nian_du_', label: '年度', width: 120 },
-          { prop: 'bian_zhi_shi_jian', label: '上传时间', width: 150 },
-          { prop: 'bm_name', label: '上传部门', width: 120 },
-          { prop: 'ry_name', label: '上传人', width: 120 },
+          { prop: 'biao_dan_ming_che', label: '表单名称', width: 350 },
+          { prop: 'shi_wu_shuo_ming_', label: '事务说明', width: 350 },
+
+          { prop: 'nian_du_', label: '年度', width: 80 },
+          { 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 }
         ],
       }
@@ -156,8 +169,7 @@ export default {
     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.listConfig.toolbars.push({ key: 'edit' })
         this.selection = true
         return;
       }
@@ -180,7 +192,7 @@ export default {
     openTask(id) {
       this.dialogFormVisible = true
       this.defId = id
-      this.addDataCont = { fenLei: this.tableTitle, fenLeiId: this.typeId, biaoDanMingCheng: '1111' }
+      this.addDataCont = { fenLei: this.tableTitle, fenLeiId: this.typeId }
     },
     // 加载数据
     loadData() {
@@ -203,8 +215,28 @@ export default {
         )
         let sql = 'select * FROM t_ywyxjlb jl  LEFT JOIN lh_bm_ry ry ON ry.ry_id  = jl.bian_zhi_ren_' + nianduWhere + ' order by bian_zhi_shi_jian desc'
         curdPost('sql', sql).then(response => {
-          this.listData = this.handlePage(response.variables.data, this.paginations, this.page)
-
+          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
@@ -236,11 +268,29 @@ export default {
         let sql = `select * FROM t_ywyxjlb jl  LEFT JOIN lh_bm_ry ry ON ry.ry_id  = jl.bian_zhi_ren_   ` + idwhere + ` order by bian_zhi_shi_jian desc`
 
         curdPost('sql', sql).then(response => {
-          this.listData = this.handlePage(response.variables.data, this.paginations, this.page)
-          this.pagination['limit'] = this.paginations
-          this.pagination['page'] = this.page
-          this.pagination['totalCount'] = this.handlePage(response.variables.data, this.paginations, this.page).length
-          this.pagination['totalPages'] = Math.ceil(this.handlePage(response.variables.data, this.paginations, this.page).length / this.paginations);
+          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
@@ -271,43 +321,47 @@ export default {
      */
     getSearcFormData() {
       const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-      this.niandu = params.nianDu ? params.nianDu : '' // 年度
-      this.startTime = params.b ? params.b : '' // 开始时间
-      this.endTime = params.i ? params.i : '' // 结束时间
+      if (JSON.stringify(params) == "{}") {
+        this.niandu = '' // 年度
+        this.startTime = '' // 开始时间
+        this.endTime = '' // 结束时间
+      } else {
+        this.niandu = params.nianDu ? params.nianDu : '' // 年度
+        this.startTime = params.b ? params.b : '' // 开始时间
+        this.endTime = params.i ? params.i : '' // 结束时间
+      }
     },
     /**
      * 处理分页事件
      */
     handlePaginationChange(page) {
-      this.paginations = page.limit
-      this.page = page.page
-      this.loadData()
-    },
-
-    /* 分页数据处理 */
-    handlePage(data, pagination, page) {
-      let handleDatas = []
-      if (data.length !== 0) {
-        for (let i = pagination * page - pagination; i < pagination * page - 1; i++) {
-          if (data[i]) {
-            handleDatas.push(data[i])
-            continue;
-          } else {
-            break;
-          }
+      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])
         }
-        return handleDatas
+        this.bianlistData.dataResult = JSON.parse(JSON.stringify(filterDatas))
       } else {
-        return []
+        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)
     },
+
+
     /**
      * 查询
      */
     search() {
+      this.pagination.limit = 20
+      this.pagination.page = 1
       this.getSearcFormData()
       this.loadData()
-
     },
     /* 防止多次快速查询*/
     numbersClick() {
@@ -437,8 +491,7 @@ export default {
     margin-top: -8px;
   }
 }
-</style>
-<style>
+
 .main-container .div_test {
   cursor: pointer;
 }

+ 69 - 68
src/views/platform/cat/type/manage.vue

@@ -2,68 +2,56 @@
   <ibps-layout ref="layout">
     <!--  -->
     <div slot="west">
-      <ibps-tree
-        :width="width"
-        :height="height"
-        :data="treeData"
-        :options="treeOptions"
-        :contextmenus="treeContextmenus"
-        title="分类管理"
-        @action-event="handleTreeAction"
-        @node-click="handleNodeClick"
-        @expand-collapse="handleExpandCollapse"
-      >
-        <el-select slot="searchForm" v-model="categoryKey" @change="loadTreeData(false)">
-          <el-option
-            v-for="item in categoryOptions"
-            :key="item.id"
-            :label="item.name"
-            :value="item.categoryKey"
-          />
+      <ibps-tree :width="width"
+                 :height="height"
+                 :data="treeData"
+                 :options="treeOptions"
+                 :contextmenus="treeContextmenus"
+                 title="分类管理"
+                 @action-event="handleTreeAction"
+                 @node-click="handleNodeClick"
+                 @expand-collapse="handleExpandCollapse">
+        <el-select slot="searchForm"
+                   v-model="categoryKey"
+                   @change="loadTreeData(false)">
+          <el-option v-for="item in categoryOptions"
+                     :key="item.id"
+                     :label="item.name"
+                     :value="item.categoryKey" />
         </el-select>
       </ibps-tree>
     </div>
 
-    <ibps-container
-      :margin-left="width+'px'"
-      class="page"
-    >
-      <edit
-        v-show="show"
-        :id="editId"
-        ref="editForm"
-        :readonly="readonly"
-        :category-key="categoryKey"
-        :parent-data="nodeData"
-        :is-private="isPrivate"
-        :random-num="randomNum"
-        display-type="edit"
-        @callback="loadTreeData"
-      />
-      <el-alert
-        v-show="!show"
-        :closable="false"
-        title="请选择左边菜单右键进行操作!"
-        type="warning"
-        show-icon
-        style="height:50px;"
-      />
+    <ibps-container :margin-left="width+'px'"
+                    class="page">
+      <edit v-show="show"
+            :id="editId"
+            ref="editForm"
+            :readonly="readonly"
+            :category-key="categoryKey"
+            :parent-data="nodeData"
+            :is-private="isPrivate"
+            :random-num="randomNum"
+            display-type="edit"
+            @callback="loadTreeData" />
+      <el-alert v-show="!show"
+                :closable="false"
+                title="请选择左边菜单右键进行操作!"
+                type="warning"
+                show-icon
+                style="height:50px;" />
     </ibps-container>
 
     <!-- 数据字典 -->
-    <import-xml
-      :id="editId"
-      :visible="importFormVisible"
-      @callback="callback"
-      @close="visible => importFormVisible = visible"
-    />
-    <sort
-      :id="editId"
-      :visible="sortFormVisible"
-      title="分类排序"
-      @callback="callback"
-      @close="visible => sortFormVisible = visible"
-    />
+    <import-xml :id="editId"
+                :visible="importFormVisible"
+                @callback="callback"
+                @close="visible => importFormVisible = visible" />
+    <sort :id="editId"
+          :visible="sortFormVisible"
+          title="分类排序"
+          @callback="callback"
+          @close="visible => sortFormVisible = visible" />
   </ibps-layout>
 </template>
 <script>
@@ -82,6 +70,12 @@ export default {
     Edit
   },
   mixins: [FixHeight],
+  props: {
+    categoryKey: {
+      type: String,
+      default: 'FLOW_TYPE'
+    },
+  },
   data() {
     return {
       width: 200,
@@ -95,49 +89,56 @@ export default {
       // 树配置
       treeOptions: { 'rootPId': '-1' },
       treeContextmenus: [
-        { icon: 'add',
+        {
+          icon: 'add',
           label: '添加分类',
           value: 'add',
-          rights: function(menu, data, isRoot) {
+          rights: function (menu, data, isRoot) {
             if (isRoot) return true
             if (data.struType === '0') return false // 平铺结构类型不允许添加子分类
             if (!(data.ownerId === '0' || this.$utils.isEmpty(data.ownerId))) {
               return false
             }
             return true
-          } },
-        { icon: 'add',
+          }
+        },
+        {
+          icon: 'add',
           label: '添加私有分类',
           value: 'addPrivate',
-          rights: function(menu, data, isRoot) {
+          rights: function (menu, data, isRoot) {
             if (data.struType === '0') return false // 平铺结构类型不允许添加子分类
             return true
-          } },
+          }
+        },
         { icon: 'edit', label: '编辑分类', value: 'edit', rights: ['node'] },
         { icon: 'delete', label: '删除分类', value: 'remove', rights: ['node'] },
         { type: 'divided' },
         { icon: 'export', label: '导出', value: 'export' },
         { icon: 'import', label: '导入', value: 'import' },
-        { type: 'divided',
-          rights: function(menu, data, isRoot) {
+        {
+          type: 'divided',
+          rights: function (menu, data, isRoot) {
             if (isRoot) return true
             if (data.isLeaf === 'Y') return false
             return true
-          } },
-        { icon: 'sort',
+          }
+        },
+        {
+          icon: 'sort',
           label: '子节点排序',
           value: 'sort',
-          rights: function(menu, data, isRoot) {
+          rights: function (menu, data, isRoot) {
             if (isRoot) return true
             if (data.isLeaf === 'Y') return false
             return true
-          } }
+          }
+        }
       ],
       treeData: [],
       nodeData: {},
       isPrivate: false,
       type: {},
-      categoryKey: 'FLOW_TYPE',
       categoryOptions: [],
       show: false
     }

+ 17 - 0
src/views/platform/cat/type/oldRecordTypeSelect.vue

@@ -0,0 +1,17 @@
+<template>
+  <manage categoryKey="OLDRECORD_TYPE"></manage>
+</template>
+<script>
+import Manage from './manage'
+export default {
+  components: {
+    Manage
+  },
+  data() {
+    return {
+
+    }
+  },
+
+}
+</script>

+ 26 - 10
src/views/system/dashboard/components/new-home.vue

@@ -10,6 +10,7 @@
                             :height="height"
                             title=""
                             category-key="FLOW_TYPE"
+                            :hasPermission="true"
                             @node-click="handleNodeClick"
                             @expand-collapse="handleExpandCollapse"
                         />
@@ -595,14 +596,24 @@
                     parameters: [],
                     sorts: []
                 }
-                let sql = `select id_, shi_wu_id_ as taskId from t_gqswb where position('${userId}' in chu_li_ren_id_)`
-                Promise.all([pending(params), curdPost('sql', sql)]).then(([res1, res2]) => {
+                let sql = `select id_, shi_wu_id_ as taskId from t_gqswb where position('${userId}' in chu_li_ren_id_) FOR UPDATE`
+                // Promise.all([pending(params), curdPost('sql', sql)]).then(([res1, res2]) => {
+                //     let workData = res1.data && res1.data.dataResult
+                //     let noticeData = res2.variables && res2.variables.data
+                //     if (!workData || !workData.length) {
+                //         return
+                //     }
+                //     this.dealData(workData, noticeData)
+                // })
+                pending(params).then(res1 => {
                     let workData = res1.data && res1.data.dataResult
-                    let noticeData = res2.variables && res2.variables.data
-                    if (!workData || !workData.length) {
-                        return
-                    }
-                    this.dealData(workData, noticeData)
+                    curdPost('sql', sql).then(res2 => {
+                        let noticeData = res2.variables && res2.variables.data
+                        if (!workData || !workData.length) {
+                            return
+                        }
+                        this.dealData(workData, noticeData)
+                    })
                 })
             },
             // 处理数据
@@ -626,6 +637,7 @@
                     }
                     result.all.push(item)
                 })
+                // console.log('处理后数据:', result)
                 // 有过期数据才执行过期数据处理
                 if (result.expire.length) {
                     this.dealExpile(result.expire, noticeList)
@@ -661,6 +673,8 @@
             },
             // 处理已过期数据
             dealExpile(data, noticeList) {
+                // console.log('已过期流程数据:', data)
+                // console.log('过期事务表数据:', noticeList)
                 const { userId } = this.$store.getters
                 let addList = []
                 let sendList = []
@@ -711,7 +725,8 @@
                             subject: msgTitle[item.workType],
                             content: `<p>事务【${item.workName}】${msgContent[item.workType]}<p>`,
                             receiverId: userId,
-                            canreply: '0'
+                            canreply: '0',
+                            taskId: item.taskId
                         }
                         sendList.push(msg)
                     }
@@ -720,7 +735,7 @@
                     tableName: 't_gqswb',
                     paramWhere: addList
                 }
-                console.log(addList, sendList)
+                // console.log('新增过期事务表数据:', addList, '发送消息数据', sendList)
                 if (addList.length) {
                     curdPost('add', JSON.stringify(addParams))
                 }
@@ -738,6 +753,7 @@
                         deleteList.push(item.id_)
                     }
                 })
+                // console.log('过期事务表中需删除的数据:', deleteList)
                 if (!deleteList.length) {
                     return
                 }
@@ -917,4 +933,4 @@
         background: #f9ffff;
         color: #000000;
     }
-</style>
+</style>

+ 2 - 1
src/views/system/jbdHome/board/checkBoard.vue

@@ -69,7 +69,8 @@
                         data: [],
                         rowNum: 7,
                         // columnWidth: ['300','100','150','150','100']
-                        columnWidth: ['400','150','150','100']
+                        columnWidth: ['400','150','150','100'],
+                        waitTime: 1500
                     },
                     acceptData:[],
                     taskData: [],

+ 1 - 1
src/views/system/jbdScan/goods/kucuntag.vue

@@ -147,7 +147,7 @@ export default {
       this.getLook(idStr)
     },
     getLook(id) {
-      let sql = `select * from t_cgysjlb where wai_jian_ in (${id})`
+      let sql = `select * from t_cgysjlb where wai_jian_ in (${id}) UNION ALL SELECT * FROM t_wlzpysjlb WHERE wai_jian_ IN (${id})`
       repostCurd("sql", sql).then(res => {
         if (res.state === 200) {
           for (var i of res.variables.data) {