|
@@ -120,16 +120,11 @@
|
|
|
<!-- <component :is="approveComponent"></component> -->
|
|
|
<el-form-item label="审批内容:" class="self-form-item" prop="flowContent">
|
|
|
<div style="display: flex" v-if="!isDetail">
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- :autosize="{ minRows: 5 }"
|
|
|
- v-model="sizeForm.flowContent"
|
|
|
- :disabled="true"
|
|
|
- ></el-input>
|
|
|
- <dg-button style="margin-left: 10px" @click="handleChoice">选择</dg-button>
|
|
|
+ <el-input type="textarea" :autosize="{ minRows: 5 }" :value="flowContentStr" :disabled="true"></el-input>
|
|
|
+ <dg-button style="margin-left: 10px" @click="handleChoice" v-if="sizeForm.applyType">选择</dg-button>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
- {{ sizeForm.flowContent }}
|
|
|
+ {{ flowContentStr }}
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</dg-col>
|
|
@@ -348,13 +343,25 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
applyContentCom: appFuncForm,
|
|
|
- show: false
|
|
|
+ show: false,
|
|
|
+ applyContentOperateObj: {
|
|
|
+ 'function-auth-apply': '申请访问资源:',
|
|
|
+ 'service-auth-apply': '申请服务:'
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
components: {},
|
|
|
computed: {
|
|
|
isDetail() {
|
|
|
return this.type == 'detail';
|
|
|
+ },
|
|
|
+ flowContentStr() {
|
|
|
+ let str = '';
|
|
|
+ if (this.sizeForm.flowContent) {
|
|
|
+ const { visitorName, visitResourceName } = JSON.parse(this.sizeForm.flowContent);
|
|
|
+ str = `${visitorName}${this.applyContentOperateObj[this.sizeForm.businessCode]}${visitResourceName}`;
|
|
|
+ }
|
|
|
+ return str;
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -391,10 +398,11 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- // 切换审批类型
|
|
|
+ // 切换审批类型,清空审批内容
|
|
|
handleChangeApplyType(val) {
|
|
|
this.sizeForm.flowContent = '';
|
|
|
- this.sizeForm.resourceInfoDTO = [];
|
|
|
+ this.sizeForm.resourceInfos = [];
|
|
|
+ this.applySelectKeys = [];
|
|
|
this.getProcessName(val);
|
|
|
},
|
|
|
// 取消/关闭
|
|
@@ -409,13 +417,14 @@ export default {
|
|
|
},
|
|
|
// 提交
|
|
|
handleSubmit() {
|
|
|
- if (this.sizeForm.applyType !== 'APP_FUN_AUTH') return;
|
|
|
- this.$refs.ruleForm.validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.sizeForm.operateType = '2';
|
|
|
- this.save();
|
|
|
- }
|
|
|
- });
|
|
|
+ if (this.sizeForm.applyType == 'APP_FUN_AUTH' || !this.sizeForm.applyType) {
|
|
|
+ this.$refs.ruleForm.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.sizeForm.operateType = '2';
|
|
|
+ this.save();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
save() {
|
|
|
const { resourceInfos, applyId, userType, userName, userCode, ...otherInfo } = this.sizeForm;
|
|
@@ -471,11 +480,11 @@ export default {
|
|
|
success(approveContent, selectKeys, resourceInfos = []) {
|
|
|
vm.sizeForm.resourceInfos = resourceInfos;
|
|
|
vm.applySelectKeys = selectKeys;
|
|
|
- const prefix =
|
|
|
- vm.sizeForm.applyType !== 'SERVICE_AUTH'
|
|
|
- ? vm.sizeForm.applicantName + '申请访问资源:'
|
|
|
- : vm.sizeForm.applyId + '申请访问服务';
|
|
|
- vm.sizeForm.flowContent = prefix + approveContent;
|
|
|
+ const visitorName =
|
|
|
+ vm.sizeForm.applyType !== 'SERVICE_AUTH' ? vm.sizeForm.applicantName : vm.sizeForm.applyId;
|
|
|
+ const visitResourceName = approveContent;
|
|
|
+ const resourceObj = { visitorName, visitResourceName };
|
|
|
+ vm.sizeForm.flowContent = JSON.stringify(resourceObj);
|
|
|
layer.close(layer.dialogIndex);
|
|
|
},
|
|
|
close() {
|