联调 【干扰源用户管理】、【敏感及重要用户】需要增加【新增】、【模板下载】、【批量导入】功能,参考内网pms3.0调整
This commit is contained in:
@@ -508,7 +508,7 @@
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="close()">取消</el-button>
|
||||
<el-button type="primary" @click="confirmForm(true)">保存</el-button>
|
||||
<el-button type="primary" @click="confirmForm(false)">提交审批</el-button>
|
||||
<el-button type="primary" v-if="control" @click="confirmForm(false)">提交审批</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -536,6 +536,7 @@ const dialogFormVisible = ref(false)
|
||||
// .doc,.docx,.xlsx,.xls,.pdf
|
||||
const acceptType = ''
|
||||
const form: any = ref({})
|
||||
const control: any = ref(true)
|
||||
const ruleFormRef: any = ref(null)
|
||||
//字典获取所在地市
|
||||
const areaOptionList = dictData
|
||||
@@ -554,7 +555,7 @@ const evaluationTypeList = dictData.getBasicData('Evaluation_Type')
|
||||
const evaluationDeptList = dictData.getBasicData('evaluation_dept')
|
||||
|
||||
//用户性质数组
|
||||
const userTypeList = reactive([
|
||||
const userTypeList: any = ref([
|
||||
{
|
||||
label: '新建电网工程',
|
||||
value: 0
|
||||
@@ -948,7 +949,7 @@ const open = async (row: any) => {
|
||||
})
|
||||
} else {
|
||||
resendId.value = ''
|
||||
form.value.userType = 0
|
||||
form.value.userType = userTypeList.value[0].value
|
||||
}
|
||||
}
|
||||
// 处理上传文件回显
|
||||
@@ -965,12 +966,17 @@ const fileRaw = (row: any, key: string) => {
|
||||
'powerQualityReport'
|
||||
]
|
||||
for (let k of list) {
|
||||
if (row[key][k]) {
|
||||
form.value[k] = [
|
||||
{
|
||||
name: row[key][k].split('/')[2]
|
||||
}
|
||||
]
|
||||
if (row[key][k] != null) {
|
||||
form.value[k] =
|
||||
row[key][k].length == 0
|
||||
? []
|
||||
: [
|
||||
{
|
||||
name: row[key][k].split('/')[2]
|
||||
}
|
||||
]
|
||||
} else {
|
||||
form.value[k] = []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -987,7 +993,7 @@ const fileRaw = (row: any, key: string) => {
|
||||
const close = () => {
|
||||
//重置表单内容
|
||||
//取消表单校验状态
|
||||
ruleFormRef.value && ruleFormRef.value.resetFields()
|
||||
ruleFormRef?.value && ruleFormRef?.value.resetFields()
|
||||
dialogFormVisible.value = false
|
||||
emits('onSubmit')
|
||||
resetForm()
|
||||
@@ -1138,7 +1144,7 @@ const confirmForm = (flag: boolean) => {
|
||||
}
|
||||
confirmFormData.saveOrCheckflag = '1'
|
||||
if (title.value != '用户档案录入') confirmFormData.id = resendId.value
|
||||
|
||||
if (!control.value) confirmFormData.dataType = 1
|
||||
submitFormData(confirmFormData).then(res => {
|
||||
ElMessage({
|
||||
message: '保存成功!',
|
||||
@@ -1341,7 +1347,13 @@ const confirmForm = (flag: boolean) => {
|
||||
})
|
||||
}
|
||||
}
|
||||
defineExpose({ open })
|
||||
|
||||
// 过滤用户
|
||||
const filterUsers = (arr: any) => {
|
||||
control.value = false
|
||||
userTypeList.value = userTypeList.value.filter(item => !arr.includes(item.value))
|
||||
}
|
||||
defineExpose({ open, filterUsers })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-form {
|
||||
|
||||
Reference in New Issue
Block a user