|
@@ -405,6 +405,43 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
+ <!-- 宜宾特殊需求,可配置开关 是否开启预警 -->
|
|
|
+ <template v-if="AppConfigInfo.isEarly">
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
|
|
|
+ <el-form-item
|
|
|
+ label="预警类型"
|
|
|
+ prop="seatEarlyWarningTypeValue"
|
|
|
+ :rules="[{ required: state.ruleForm.seatEarlyWarningLevelValue, message: '请选择预警类型', trigger: 'change' }]"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-model="state.ruleForm.seatEarlyWarningTypeValue"
|
|
|
+ placeholder="请选择预警类型"
|
|
|
+ class="w100"
|
|
|
+ @change="selectEarlyType"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option v-for="item in earlyWarningType" :key="item.dicDataValue" :label="item.dicDataName" :value="item.dicDataValue" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
|
|
|
+ <el-form-item
|
|
|
+ label="预警级别"
|
|
|
+ prop="seatEarlyWarningLevelValue"
|
|
|
+ :rules="[{ required: state.ruleForm.seatEarlyWarningTypeValue, message: '请选择预警级别', trigger: 'change' }]"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-model="state.ruleForm.seatEarlyWarningLevelValue"
|
|
|
+ placeholder="请选择预警级别"
|
|
|
+ class="w100"
|
|
|
+ @change="selectEarlyLevel"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option v-for="item in earlyWarningLevel" :key="item.dicDataValue" :label="item.dicDataName" :value="item.dicDataValue" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </template>
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
<el-form-item
|
|
|
label="工单标题"
|
|
@@ -617,6 +654,10 @@ const state = reactive<any>({
|
|
|
knowledgeQuote: [], // 知识库引用
|
|
|
longitude: null, //经度
|
|
|
latitude: null, //纬度
|
|
|
+ seatEarlyWarningTypeValue: null, //预警类型
|
|
|
+ seatEarlyWarningTypeName:null, //预警类型名称
|
|
|
+ seatEarlyWarningLevelValue:null, // 预警级别
|
|
|
+ seatEarlyWarningLevelName:null, // 预警级别名称
|
|
|
},
|
|
|
formLoading: false, // 表单加载状态
|
|
|
hotspotExternal: [], // 热点分类外部数据
|
|
@@ -837,7 +878,12 @@ const isRepeatChange = (val: string) => {
|
|
|
};
|
|
|
// 清除重复件
|
|
|
const clearRepeat = () => {
|
|
|
- ElMessageBox.confirm(`确认要清除选择的重复工单?`, '提示', {
|
|
|
+ orderRepeatSelectRef.value?.clearSelection();
|
|
|
+ setTimeout(() => {
|
|
|
+ state.ruleForm.duplicateTitle = null;
|
|
|
+ state.ruleForm.duplicateIds = [];
|
|
|
+ }, 100);
|
|
|
+/* ElMessageBox.confirm(`确认要清除选择的重复工单?`, '提示', {
|
|
|
confirmButtonText: '确认',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
@@ -846,15 +892,9 @@ const clearRepeat = () => {
|
|
|
autofocus: false,
|
|
|
})
|
|
|
.then(() => {
|
|
|
- orderRepeatSelectRef.value.clearSelection();
|
|
|
- setTimeout(() => {
|
|
|
- state.ruleForm.duplicateTitle = null;
|
|
|
- state.ruleForm.duplicateIds = [];
|
|
|
- }, 100);
|
|
|
+
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- state.ruleForm.isRepeat = 'true';
|
|
|
- });
|
|
|
+ .catch(() => {});*/
|
|
|
};
|
|
|
// 选择重复件
|
|
|
const orderRepeatSelectRef = ref<RefType>();
|
|
@@ -870,7 +910,13 @@ const orderRepeatSuccess = (row: any) => {
|
|
|
// 选择是否市州互转
|
|
|
const changeTransPond = (val: any) => {
|
|
|
if (!val) {
|
|
|
- ElMessageBox.confirm(`确认要清除选择的互转市州?`, '提示', {
|
|
|
+ setTimeout(() => {
|
|
|
+ state.ruleForm.transpondCityValue = null;
|
|
|
+ state.ruleForm.transpondCityName = null;
|
|
|
+ state.ruleForm.transpondCityId = null;
|
|
|
+ state.ruleForm.transpondCityObj = null;
|
|
|
+ }, 100);
|
|
|
+ /* ElMessageBox.confirm(`确认要清除选择的互转市州?`, '提示', {
|
|
|
confirmButtonText: '确认',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
@@ -879,16 +925,11 @@ const changeTransPond = (val: any) => {
|
|
|
autofocus: false,
|
|
|
})
|
|
|
.then(() => {
|
|
|
- setTimeout(() => {
|
|
|
- state.ruleForm.transpondCityValue = null;
|
|
|
- state.ruleForm.transpondCityName = null;
|
|
|
- state.ruleForm.transpondCityId = null;
|
|
|
- state.ruleForm.transpondCityObj = null;
|
|
|
- }, 100);
|
|
|
+
|
|
|
})
|
|
|
.catch(() => {
|
|
|
state.ruleForm.transpond = true;
|
|
|
- });
|
|
|
+ });*/
|
|
|
}
|
|
|
};
|
|
|
const historyOrderRef = ref<RefType>(); // 历史工单组件
|
|
@@ -1449,14 +1490,28 @@ const handleBeforeUnload = (event: any) => {
|
|
|
event.returnValue = ''; // 对于某些浏览器,设置 returnValue
|
|
|
};
|
|
|
// 查询预警基础参数
|
|
|
+const earlyWarningLevel = ref<EmptyArrayType>([]); // 预警级别选项
|
|
|
+const earlyWarningType = ref<EmptyArrayType>([]); // 预警类型选项
|
|
|
const warningBaseData = async () => {
|
|
|
try {
|
|
|
const { result } = await getEarlyBaseData();
|
|
|
+ earlyWarningLevel.value = result?.earlyWarningLevel ?? [];
|
|
|
+ earlyWarningType.value = result?.earlyWarningType ?? [];
|
|
|
console.log(result);
|
|
|
} catch (error) {
|
|
|
console.log(error);
|
|
|
}
|
|
|
};
|
|
|
+// 选择预警类型
|
|
|
+const selectEarlyType = (val: any) => {
|
|
|
+ const item = earlyWarningType.value.find((item: any) => item.dicDataValue === val);
|
|
|
+ state.ruleForm.seatEarlyWarningTypeName = item?.dicDataName;
|
|
|
+};
|
|
|
+// 选择预警级别
|
|
|
+const selectEarlyLevel = (val: any) => {
|
|
|
+ const item = earlyWarningLevel.value.find((item: any) => item.dicDataValue === val);
|
|
|
+ state.ruleForm.seatEarlyWarningLevelName = item?.dicDataName;
|
|
|
+};
|
|
|
onMounted(async () => {
|
|
|
await loadBaseData();
|
|
|
state.tagsViewList = await Session.get('tagsViewList');
|