diff --git a/src/views/kc/config/KcExportConfigTpkwcqkjzglxList.vue b/src/views/kc/config/KcExportConfigTpkwcqkjzglxList.vue
index 2e32dda..c5de35d 100644
--- a/src/views/kc/config/KcExportConfigTpkwcqkjzglxList.vue
+++ b/src/views/kc/config/KcExportConfigTpkwcqkjzglxList.vue
@@ -9,7 +9,7 @@
-
+
@@ -274,7 +274,7 @@
}
function onExport() {
- if(!queryParam.value.dwmc) {
+ if(!!roleList.value.filter(x => x.roleCode == 'admin' ).length && !queryParam.value.dwmc) {
createMessage.warn('请选择导出的单位');
return ;
}
diff --git a/src/views/kc/config/components/KcExportConfigTpkwcqkjzglxForm.vue b/src/views/kc/config/components/KcExportConfigTpkwcqkjzglxForm.vue
index fdeced2..e45804e 100644
--- a/src/views/kc/config/components/KcExportConfigTpkwcqkjzglxForm.vue
+++ b/src/views/kc/config/components/KcExportConfigTpkwcqkjzglxForm.vue
@@ -3,7 +3,7 @@
-
+
@@ -13,27 +13,27 @@
-
+
-
+
-
+
-
+
-
+
@@ -51,6 +51,7 @@
import { saveOrUpdate } from '../KcExportConfigTpkwcqkjzglx.api';
import { Form } from 'ant-design-vue';
import { duplicateValidate } from '/@/utils/helper/validator'
+ import { getSysConfig } from '/@/views/site/utils/index';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
@@ -64,6 +65,11 @@
id: '',
gh: '',
tklx: '',
+ dwmc: '',
+ sf: '',
+ xm: '',
+ zt: '',
+ ytkcs: '',
});
const { createMessage } = useMessage();
const labelCol = ref({ xs: { span: 24 }, sm: { span: 5 } });
@@ -73,6 +79,11 @@
const validatorRules = {
gh: [{ required: true, message: '请输入教师!'}, { validator: ghDuplicatevalidate }],
tklx: [{ required: true, message: '请输入听课类型!'},],
+ dwmc: [{ required: true, message: '请输入单位名称!'},],
+ xm: [{ required: true, message: '请输入教师姓名!'},],
+ zt: [{ required: true, message: '请输入状态!'},],
+ sf: [{ required: true, message: '请输入身份!'},],
+ ytkcs: [{ required: true, message: '请输入每学期应听课次数!'},],
};
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
@@ -146,7 +157,12 @@
}
async function ghDuplicatevalidate(_r, value) {
- return duplicateValidate('kc_export_config_tpkwcqkjzglx', `CONCAT(gh,'-',tklx)`, value + '-' + formData.tklx, formData.id || '')
+ let config = getSysConfig()
+ if(formData.id){
+ return duplicateValidate('kc_export_config_tpkwcqkjzglx', `CONCAT(xqxn,'-',gh,'-',tklx)`, formData.xqxn + '-' + value + '-' + formData.tklx, formData.id)
+ }else {
+ return duplicateValidate('kc_export_config_tpkwcqkjzglx', `CONCAT(xqxn,'-',gh,'-',tklx)`, config.flag1 + '-' + value + '-' + formData.tklx, '')
+ }
}
defineExpose({