a9e77ff04e749628d468076472651e44.json 9.6 KB

1
  1. {"remainingRequest":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\modules\\activiti\\demo\\correction-process.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\modules\\activiti\\demo\\correction-process.vue","mtime":1581948666000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["\r\n// 引入工作流公共方法\r\nimport processModule from '@/mixins/process-module'\r\nexport default {\r\n // 注入公共方法\r\n mixins: [processModule],\r\n data () {\r\n return {\r\n visible: false,\r\n // 表单属性是否可编辑\r\n fieldDisabled: false,\r\n dataForm: {\r\n id: '',\r\n applyPost: '',\r\n entryDate: '',\r\n correctionDate: '',\r\n workContent: '',\r\n achievement: '',\r\n creator: '',\r\n createDate: ''\r\n }\r\n }\r\n },\r\n created () {\r\n // 将业务KEY赋值给表单\r\n this.dataForm.id = this.$route.params.businessKey\r\n this.init()\r\n // 流程回调\r\n var callbacks = {\r\n startProcessSuccessCallback: this.closeCurrentTab,\r\n startProcessErrorCallback: this.startProcessErrorCallback,\r\n taskHandleSuccessCallback: this.closeCurrentTab,\r\n taskHandleErrorCallback: this.taskHandleErrorCallback,\r\n formSaveSuccessCallback: null,\r\n formSaveErrorCallback: null\r\n }\r\n // 初始化综合组件\r\n this.initProcessMultiple(callbacks)\r\n },\r\n computed: {\r\n dataRule () {\r\n return {\r\n applyPost: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n entryDate: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n correctionDate: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n workContent: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n achievement: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n createTime: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ]\r\n }\r\n }\r\n },\r\n methods: {\r\n init () {\r\n this.visible = true\r\n this.$nextTick(() => {\r\n this.$refs['dataForm'].resetFields()\r\n if (this.dataForm.id) {\r\n // 如业务KEY已存在,不允许编辑\r\n this.fieldDisabled = true\r\n this.getInfo()\r\n }\r\n })\r\n },\r\n // 获取信息\r\n getInfo () {\r\n this.$http.get(`/act/demo/correction/${this.dataForm.id}`).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n this.dataForm = {\r\n ...this.dataForm,\r\n ...res.data\r\n }\r\n }).catch(() => {})\r\n },\r\n // 启动流程出错回调\r\n startProcessErrorCallback (data) {\r\n console.log(data)\r\n },\r\n // 任务处理出错回调\r\n taskHandleErrorCallback (data) {\r\n }\r\n }\r\n}\r\n",{"version":3,"sources":["correction-process.vue"],"names":[],"mappings":";AAgCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"correction-process.vue","sourceRoot":"src/views/modules/activiti/demo","sourcesContent":["<!-- 流程业务表单 -->\r\n<template>\r\n <el-card shadow=\"never\" class=\"aui-card--fill\">\r\n <el-form :model=\"dataForm\" :rules=\"dataRule\" ref=\"dataForm\" @keyup.enter.native=\"dataFormSubmitHandle()\" :label-width=\"$i18n.locale === 'en-US' ? '120px' : '80px'\">\r\n <el-form-item :label=\"$t('correction.post')\" prop=\"applyPost\">\r\n <el-input v-model=\"dataForm.applyPost\" :disabled=\"fieldDisabled\" :placeholder=\"$t('correction.post')\"></el-input>\r\n </el-form-item>\r\n <el-row :gutter=\"40\">\r\n <el-col :span=\"12\">\r\n <el-form-item :label=\"$t('correction.entryDate')\" prop=\"entryDate\">\r\n <el-date-picker v-model=\"dataForm.entryDate\" :disabled=\"fieldDisabled\" value-format=\"yyyy-MM-dd\" :placeholder=\"$t('correction.entryDate')\" style=\"width: 100%\"></el-date-picker>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :span=\"12\">\r\n <el-form-item :label=\"$t('correction.correctionDate')\" prop=\"correctionDate\">\r\n <el-date-picker v-model=\"dataForm.correctionDate\" :disabled=\"fieldDisabled\" value-format=\"yyyy-MM-dd\" :placeholder=\"$t('correction.correctionDate')\" style=\"width: 100%\"></el-date-picker>\r\n </el-form-item>\r\n </el-col>\r\n </el-row>\r\n <el-form-item :label=\"$t('correction.workContent')\" prop=\"workContent\">\r\n <el-input type=\"textarea\" v-model=\"dataForm.workContent\" :disabled=\"fieldDisabled\" :placeholder=\"$t('correction.workContent')\"></el-input>\r\n </el-form-item>\r\n <el-form-item :label=\"$t('correction.achievement')\" prop=\"achievement\">\r\n <el-input type=\"textarea\" v-model=\"dataForm.achievement\" :disabled=\"fieldDisabled\" :placeholder=\"$t('correction.achievement')\"></el-input>\r\n </el-form-item>\r\n </el-form>\r\n <!-- 流程综合组件 -->\r\n <ren-process-multiple v-if=\"processVisible\" updateInstanceIdUrl=\"/act/demo/correction/updateInstanceId\" saveFormUrl=\"/act/demo/correction\" dataFormName=\"dataForm\" ref=\"renProcessMultiple\" ></ren-process-multiple>\r\n </el-card>\r\n</template>\r\n\r\n<script>\r\n// 引入工作流公共方法\r\nimport processModule from '@/mixins/process-module'\r\nexport default {\r\n // 注入公共方法\r\n mixins: [processModule],\r\n data () {\r\n return {\r\n visible: false,\r\n // 表单属性是否可编辑\r\n fieldDisabled: false,\r\n dataForm: {\r\n id: '',\r\n applyPost: '',\r\n entryDate: '',\r\n correctionDate: '',\r\n workContent: '',\r\n achievement: '',\r\n creator: '',\r\n createDate: ''\r\n }\r\n }\r\n },\r\n created () {\r\n // 将业务KEY赋值给表单\r\n this.dataForm.id = this.$route.params.businessKey\r\n this.init()\r\n // 流程回调\r\n var callbacks = {\r\n startProcessSuccessCallback: this.closeCurrentTab,\r\n startProcessErrorCallback: this.startProcessErrorCallback,\r\n taskHandleSuccessCallback: this.closeCurrentTab,\r\n taskHandleErrorCallback: this.taskHandleErrorCallback,\r\n formSaveSuccessCallback: null,\r\n formSaveErrorCallback: null\r\n }\r\n // 初始化综合组件\r\n this.initProcessMultiple(callbacks)\r\n },\r\n computed: {\r\n dataRule () {\r\n return {\r\n applyPost: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n entryDate: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n correctionDate: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n workContent: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n achievement: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n createTime: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ]\r\n }\r\n }\r\n },\r\n methods: {\r\n init () {\r\n this.visible = true\r\n this.$nextTick(() => {\r\n this.$refs['dataForm'].resetFields()\r\n if (this.dataForm.id) {\r\n // 如业务KEY已存在,不允许编辑\r\n this.fieldDisabled = true\r\n this.getInfo()\r\n }\r\n })\r\n },\r\n // 获取信息\r\n getInfo () {\r\n this.$http.get(`/act/demo/correction/${this.dataForm.id}`).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n this.dataForm = {\r\n ...this.dataForm,\r\n ...res.data\r\n }\r\n }).catch(() => {})\r\n },\r\n // 启动流程出错回调\r\n startProcessErrorCallback (data) {\r\n console.log(data)\r\n },\r\n // 任务处理出错回调\r\n taskHandleErrorCallback (data) {\r\n }\r\n }\r\n}\r\n</script>\r\n"]}]}