|
|
@@ -162,7 +162,15 @@
|
|
|
>
|
|
|
</el-switch>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="审批签名:" prop="signature">
|
|
|
+ <el-form-item
|
|
|
+ label="审批签名:"
|
|
|
+ prop="signature"
|
|
|
+ :rules="{
|
|
|
+ required: this.isCategory == 1,
|
|
|
+ message: '请上传审批签名',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }"
|
|
|
+ >
|
|
|
<WithView
|
|
|
:assetName="''"
|
|
|
v-model="form.signature"
|
|
|
@@ -1172,6 +1180,7 @@
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
import aptitudeDialog from '@/views/factoryModel/jobManagement/components/aptitudeDialog.vue';
|
|
|
import criticalProcess from './criticalProcess.vue';
|
|
|
+ import { parameterGetByCode } from '@/api/system/dictionary/index.js';
|
|
|
|
|
|
// D:\中赢\kd-aiot-frontend\src\views\system\user
|
|
|
|
|
|
@@ -1231,7 +1240,7 @@
|
|
|
};
|
|
|
return {
|
|
|
defaultForm,
|
|
|
-
|
|
|
+ isCategory: '0', //是否启用个人电子签。0 不启用,1启用
|
|
|
// 表单数据
|
|
|
form: { ...defaultForm },
|
|
|
disabled: false,
|
|
|
@@ -1910,6 +1919,11 @@
|
|
|
this.getFactoryList();
|
|
|
console.log(this.institutionList, '========');
|
|
|
this.getProfessionList();
|
|
|
+ parameterGetByCode({
|
|
|
+ code: 'main_is_personal_electronic_signature'
|
|
|
+ }).then((res) => {
|
|
|
+ this.isCategory = res.value;
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
chooseAptitude(data) {
|
|
|
@@ -2042,7 +2056,13 @@
|
|
|
|
|
|
/* 保存编辑 */
|
|
|
save() {
|
|
|
- this.$refs.form.validate((valid) => {
|
|
|
+ this.$refs.form.validate((valid, obj) => {
|
|
|
+ if (obj) {
|
|
|
+ let messages = Object.keys(obj).map((key) => obj[key][0]);
|
|
|
+ if (messages.length > 0) {
|
|
|
+ this.$message.warning(messages[0].message);
|
|
|
+ }
|
|
|
+ }
|
|
|
if (!valid) {
|
|
|
return false;
|
|
|
}
|