|
@@ -11,39 +11,47 @@
|
|
|
<el-form-item label="标题:" prop="title">
|
|
|
<el-input v-model="formData.title" :disabled="!isEditable" placeholder="请输入标题" style="width: 468px !important" />
|
|
|
</el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="信息类型:" prop="info_type">
|
|
|
+ <el-select v-model="formData.info_type" disabled placeholder="请选择类型" style="width: 468px !important">
|
|
|
+ <el-option v-for="option in opt_info_type" :key="option.value" :label="option.text" :value="option.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
<el-form-item label="发布单位:" prop="publish_group">
|
|
|
<el-input v-model="formData.publish_group" disabled placeholder="请输入发布单位" style="width: 468px !important" />
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item label="信息模板:" prop="template_type">
|
|
|
- <el-radio-group v-model="formData.template_type" :disabled="!isEditable">
|
|
|
- <el-radio label="预设模板">预设模板</el-radio>
|
|
|
- <el-radio label="自定义模板">自定义模板</el-radio>
|
|
|
+ <el-radio-group v-model="formData.template_type" disabled>
|
|
|
+ <el-radio value="0">预设模板</el-radio>
|
|
|
+ <el-radio value="1">自定义模板</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item v-if="formData.template_type === '0'" label="预设模板:" prop="template_type">
|
|
|
- <el-select v-model="formData.template_id" :disabled="!isEditable" placeholder="请选择预设模板" style="width: 300px !important">
|
|
|
+ <el-select v-model="formData.template_id" disabled placeholder="请选择预设模板" style="width: 300px !important">
|
|
|
<el-option v-for="option in presetTemplates" :key="option.value" :label="option.label" :value="option.value"></el-option>
|
|
|
</el-select>
|
|
|
<el-text class="common-btn-text-primary" @click="showTemplateExample">样例</el-text>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item v-if="formData.template_type === '1'" prop="template_url">
|
|
|
- <el-input
|
|
|
- v-model="formData.template_url"
|
|
|
- :disabled="!isEditable"
|
|
|
- placeholder="请输入自定义详情页面链接地址"
|
|
|
- style="width: 468px !important"
|
|
|
- />
|
|
|
+ <el-input v-model="formData.template_url" placeholder="请输入自定义详情页面链接地址" style="width: 468px !important" />
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item label="信息内容:" prop="content">
|
|
|
- <el-input v-model="formData.content" type="textarea" disabled placeholder="请输入信息内容" style="width: 468px !important"></el-input>
|
|
|
+ <el-input v-model="formData.content" type="textarea" :rows="6" disabled placeholder="请输入信息内容" style="width: 468px !important"></el-input>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item label="查看附件:">
|
|
|
- <ul>
|
|
|
- <li v-for="(file, index) in files" :key="index" @click="viewFile(file)">
|
|
|
- {{ file.name }}
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+ <div>
|
|
|
+ <div v-for="(file, index) in formData.attachs" :key="index" @click="viewFile(file)" style="color: #2C81FF;text-decoration: underline;cursor:pointer">
|
|
|
+ {{ index+1 }}、{{ file.name }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
</div>
|
|
|
<h4 class="common-dialog-title">推送配置</h4>
|
|
|
<div class="box1">
|
|
@@ -77,14 +85,14 @@
|
|
|
<h4 class="common-dialog-title">审核配置</h4>
|
|
|
<div class="box1">
|
|
|
<el-form-item label="审核材料:" prop="materials">
|
|
|
- <ul>
|
|
|
- <li v-for="(material, index) in auditMaterials" :key="index">
|
|
|
- {{ material }}
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+ <div>
|
|
|
+ <div v-for="(file, index) in formData.examine_attachs" :key="index" @click="viewFile(file)" style="color: #2C81FF;text-decoration: underline;cursor:pointer">
|
|
|
+ {{ index+1 }}、{{ file.name }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="审核人:" prop="examine_by">
|
|
|
- <el-input v-model="formData.examine_by" disabled placeholder="请输入审核人姓名" style="width: 368px !important" />
|
|
|
+ <el-input v-model="formData.examine_user" disabled placeholder="请输入审核人姓名" style="width: 368px !important" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</el-form>
|
|
@@ -113,6 +121,7 @@ const emit = defineEmits<{
|
|
|
const isEditable = ref(false);
|
|
|
const formData = ref({
|
|
|
title: '',
|
|
|
+ info_type: '',
|
|
|
publish_group: '',
|
|
|
template_type: '',
|
|
|
template_id: '',
|
|
@@ -123,7 +132,14 @@ const formData = ref({
|
|
|
response_type: '',
|
|
|
examine_by: '',
|
|
|
publish_time: '',
|
|
|
- materials: ''
|
|
|
+ materials: '',
|
|
|
+ add_time: '',
|
|
|
+ examines: [],
|
|
|
+ feedback_count: 0,
|
|
|
+ unresponsive_count: 0,
|
|
|
+ attachs: [],
|
|
|
+ examine_attachs: [],
|
|
|
+ examine_user: ''
|
|
|
});
|
|
|
let treeData = ref([]);
|
|
|
let contactSelectState = reactive({
|
|
@@ -138,17 +154,25 @@ const handleData = (data) => {
|
|
|
const toggleReleaseList = () => {
|
|
|
contactSelectState.show = !contactSelectState.show;
|
|
|
};
|
|
|
-const presetTemplates = [
|
|
|
- { value: 'template1', label: '模板一' },
|
|
|
- { value: 'template2', label: '模板二' }
|
|
|
+
|
|
|
+const opt_info_type = [
|
|
|
+ { text: "全部", value: "" },
|
|
|
+ { text: "预警信息", value: "0" },
|
|
|
+ { text: "灾情信息", value: "1" },
|
|
|
+ { text: "处置信息", value: "2" },
|
|
|
+ { text: "指挥救援", value: "3" },
|
|
|
+ { text: "公众防范", value: "4" }
|
|
|
];
|
|
|
|
|
|
+const presetTemplates = ref([]);
|
|
|
+
|
|
|
const feedbackOptions = [
|
|
|
{ value: '仅需阅读', label: '仅需阅读' },
|
|
|
{ value: '点击确认', label: '点击确认' },
|
|
|
{ value: '签字确认', label: '签字确认' }
|
|
|
];
|
|
|
|
|
|
+const rules = ref({});
|
|
|
const selectedPresetTemplate = ref('');
|
|
|
|
|
|
const files = ref([
|
|
@@ -201,7 +225,7 @@ watch(
|
|
|
);
|
|
|
const fetchTreeData = async () => {
|
|
|
try {
|
|
|
- const response = await getPhoneList();
|
|
|
+ const response = await getPhoneList({});
|
|
|
if (response && response.data) {
|
|
|
treeData.value = response.data;
|
|
|
}
|
|
@@ -210,6 +234,11 @@ const fetchTreeData = async () => {
|
|
|
}
|
|
|
};
|
|
|
onMounted(() => {
|
|
|
+ getTemplateList({}).then((res) => {
|
|
|
+ res.data.forEach((item, index) => {
|
|
|
+ presetTemplates.value.push({ value: item.id+"", label: item.name, content: item.content });
|
|
|
+ });
|
|
|
+ });
|
|
|
fetchTreeData();
|
|
|
});
|
|
|
const viewFile = (file) => {
|