| 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-add-or-update.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\modules\\activiti\\demo\\correction-add-or-update.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 // 是否显示流程启动组件\r\n processVisible: true,\r\n visible: 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 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 this.getInfo()\r\n }\r\n // 将业务组件对象赋值给流程(回调时需要用到)\r\n this.$refs.renProcessStart.rootObj = this\r\n // 配置回调函数\r\n this.$refs.renProcessStart.callbacks = {\r\n startProcessSuccessCallback: this.closeCurrentDialog,\r\n startProcessErrorCallback: this.startProcessErrorCallback,\r\n formSaveSuccessCallback: null,\r\n formSaveErrorCallback: null\r\n }\r\n // 配置流程定义KEY\r\n this.$refs.renProcessStart.dataForm.processDefinitionKey = 'correctionprocess'\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 closeCurrentDialog () {\r\n this.visible = false\r\n this.$emit('refreshDataList')\r\n }\r\n }\r\n}\r\n",{"version":3,"sources":["correction-add-or-update.vue"],"names":[],"mappings":";AAkCA;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-add-or-update.vue","sourceRoot":"src/views/modules/activiti/demo","sourcesContent":["<template>\r\n <el-dialog :visible.sync=\"visible\" :title=\"!dataForm.id ? $t('add') : $t('update')\" :close-on-click-modal=\"false\" :close-on-press-escape=\"false\">\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\" :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\" 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\" 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\" :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\" :placeholder=\"$t('correction.achievement')\"></el-input>\r\n </el-form-item>\r\n </el-form>\r\n <template slot=\"footer\">\r\n <el-button @click=\"visible = false\">{{ $t('cancel') }}</el-button>\r\n <!-- 流程启动组件 -->\r\n <ren-process-start v-if=\"processVisible\" updateInstanceIdUrl=\"/act/demo/correction/updateInstanceId\" saveFormUrl=\"/act/demo/correction\" dataFormName=\"dataForm\" ref=\"renProcessStart\" ></ren-process-start>\r\n </template>\r\n </el-dialog>\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 // 是否显示流程启动组件\r\n processVisible: true,\r\n visible: 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 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 this.getInfo()\r\n }\r\n // 将业务组件对象赋值给流程(回调时需要用到)\r\n this.$refs.renProcessStart.rootObj = this\r\n // 配置回调函数\r\n this.$refs.renProcessStart.callbacks = {\r\n startProcessSuccessCallback: this.closeCurrentDialog,\r\n startProcessErrorCallback: this.startProcessErrorCallback,\r\n formSaveSuccessCallback: null,\r\n formSaveErrorCallback: null\r\n }\r\n // 配置流程定义KEY\r\n this.$refs.renProcessStart.dataForm.processDefinitionKey = 'correctionprocess'\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 closeCurrentDialog () {\r\n this.visible = false\r\n this.$emit('refreshDataList')\r\n }\r\n }\r\n}\r\n</script>\r\n"]}]}
|