Browse Source

no message

libushang 2 months ago
parent
commit
b87a7f87ae

+ 23 - 0
src/types/components.d.ts

@@ -23,15 +23,24 @@ declare module 'vue' {
     DistributionMap: typeof import('./../components/Map/YztMap/DistributionMap.vue')['default']
     DrawMap: typeof import('./../components/Map/YztMap/DrawMap.vue')['default']
     Editor: typeof import('./../components/Editor/index.vue')['default']
+    ElAnchor: typeof import('element-plus/es')['ElAnchor']
+    ElAnchorLink: typeof import('element-plus/es')['ElAnchorLink']
     ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
     ElBadge: typeof import('element-plus/es')['ElBadge']
     ElButton: typeof import('element-plus/es')['ElButton']
+    ElCard: typeof import('element-plus/es')['ElCard']
     ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
+    ElCheckboxButton: typeof import('element-plus/es')['ElCheckboxButton']
     ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
     ElCol: typeof import('element-plus/es')['ElCol']
+    ElCollapse: typeof import('element-plus/es')['ElCollapse']
+    ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
     ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
+    ElContainer: typeof import('element-plus/es')['ElContainer']
     ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
+    ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
+    ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
     ElDialog: typeof import('element-plus/es')['ElDialog']
     ElDivider: typeof import('element-plus/es')['ElDivider']
     ElDrawer: typeof import('element-plus/es')['ElDrawer']
@@ -41,31 +50,42 @@ declare module 'vue' {
     ElEmpty: typeof import('element-plus/es')['ElEmpty']
     ElForm: typeof import('element-plus/es')['ElForm']
     ElFormItem: typeof import('element-plus/es')['ElFormItem']
+    ElHeader: typeof import('element-plus/es')['ElHeader']
     ElIcon: typeof import('element-plus/es')['ElIcon']
     ElImage: typeof import('element-plus/es')['ElImage']
     ElInput: typeof import('element-plus/es')['ElInput']
     ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
+    ElLink: typeof import('element-plus/es')['ElLink']
+    ElMain: typeof import('element-plus/es')['ElMain']
     ElMenu: typeof import('element-plus/es')['ElMenu']
     ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
     ElOption: typeof import('element-plus/es')['ElOption']
     ElPagination: typeof import('element-plus/es')['ElPagination']
     ElPopover: typeof import('element-plus/es')['ElPopover']
     ElRadio: typeof import('element-plus/es')['ElRadio']
+    ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
     ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
     ElRow: typeof import('element-plus/es')['ElRow']
     ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
+    ElSegmented: typeof import('element-plus/es')['ElSegmented']
     ElSelect: typeof import('element-plus/es')['ElSelect']
     ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
     ElSkeletonItem: typeof import('element-plus/es')['ElSkeletonItem']
     ElSlider: typeof import('element-plus/es')['ElSlider']
+    ElSpace: typeof import('element-plus/es')['ElSpace']
+    ElStep: typeof import('element-plus/es')['ElStep']
+    ElSteps: typeof import('element-plus/es')['ElSteps']
     ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
     ElSwitch: typeof import('element-plus/es')['ElSwitch']
     ElTable: typeof import('element-plus/es')['ElTable']
     ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
+    ElTabPane: typeof import('element-plus/es')['ElTabPane']
+    ElTabs: typeof import('element-plus/es')['ElTabs']
     ElTag: typeof import('element-plus/es')['ElTag']
     ElText: typeof import('element-plus/es')['ElText']
     ElTimeline: typeof import('element-plus/es')['ElTimeline']
     ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
+    ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
     ElTooltip: typeof import('element-plus/es')['ElTooltip']
     ElTree: typeof import('element-plus/es')['ElTree']
     ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
@@ -81,6 +101,9 @@ declare module 'vue' {
     HikvisionPlayer: typeof import('./../components/HKVideo/hikvision-player.vue')['default']
     HKVideo: typeof import('./../components/HKVideo/index.vue')['default']
     IconSelect: typeof import('./../components/IconSelect/index.vue')['default']
+    IEpCaretBottom: typeof import('~icons/ep/caret-bottom')['default']
+    IEpCaretTop: typeof import('~icons/ep/caret-top')['default']
+    IEpUploadFilled: typeof import('~icons/ep/upload-filled')['default']
     IFrame: typeof import('./../components/iFrame/index.vue')['default']
     ImagePreview: typeof import('./../components/ImagePreview/index.vue')['default']
     ImageUpload: typeof import('./../components/ImageUpload/index.vue')['default']

+ 24 - 0
src/views/informationissue/SampleInfoDialog.vue

@@ -0,0 +1,24 @@
+<template>
+  <el-dialog title="模板样例" width="450px" append-to-body @close="closeDialog">
+    <p style="margin-top: 0">
+      <strong>例子:</strong>根据最新气象资料分析,预计从#day#开始,我市茂南区将迎来一轮持续时间较长、强度较大的降雨天气过程,部分地区可能伴有雷电、大风等强对流天气。#dept#
+    </p>
+    <p><strong>变量:</strong></p>
+    <p style="margin:6px">#user# 发送人</p>
+    <p style="margin:6px">#dept# 发布部门</p>
+    <p style="margin:6px">#day# 今天</p>
+
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button type="primary" @click="closeDialog">关闭</el-button>
+      </div>
+    </template>
+  </el-dialog>
+</template>
+
+<script lang="ts" setup>
+const emits = defineEmits(['closeDialog']);
+const closeDialog = () => {
+  emits('closeDialog');
+};
+</script>

+ 9 - 5
src/views/informationissue/informationApplication.vue

@@ -38,7 +38,7 @@
                 >
                   <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-text class="common-btn-text-primary" @click="sampleInfoDialogVisible = true">样例</el-text>
               </el-form-item>
               <el-form-item v-if="formData.template_type === '1'" prop="template_url">
                 <el-input v-model="formData.template_url" placeholder="请输入自定义详情页面链接地址" style="width: 468px !important" />
@@ -122,12 +122,17 @@
       :default-check-data="selectContactSelectData"
       @confirm="handleContactSelectData"
     />
+
+    <!-- 样例弹窗 -->
+    <SampleInfoDialog v-model="sampleInfoDialogVisible" @close-dialog="sampleInfoDialogVisible = false" />
+    
   </div>
 </template>
 
 <script setup lang="ts">
 import { ref, onMounted } from 'vue';
 import { ElMessage } from 'element-plus';
+import SampleInfoDialog from './SampleInfoDialog.vue';
 import { addInformation, getPhoneList, getTemplateList, getUser } from '@/api/informationissue/informationissue';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 import debounce from 'lodash/debounce';
@@ -251,6 +256,9 @@ const feedbackOptions = [
 
 const presetTemplates = ref([]);
 
+// 样例弹窗
+const sampleInfoDialogVisible = ref(false);
+
 const submitForm = () => {
   formRef.value?.validate(async (valid) => {
     if (valid) {
@@ -271,10 +279,6 @@ const submitForm = () => {
   });
 };
 
-const showTemplateExample = () => {
-  ElMessage.info('点击了查看模板样例');
-};
-
 const handleTemplateIdChanged = async (value: any) => {
   const n = presetTemplates.value.find((i) => i.value === value);
   formData.value.content = n.content;

+ 9 - 5
src/views/informationissue/informationApproval.vue

@@ -37,7 +37,7 @@
                       <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-text class="common-btn-text-primary" @click="sampleInfoDialogVisible = true">样例</el-text>
                     </el-form-item>
 
                     <el-form-item v-if="formData.template_type === '1'" prop="template_url">
@@ -163,6 +163,10 @@
       </div>
     </div>
     <ShowReleaseDetail v-if="showReleaseDetailState.show" :info_id="showReleaseDetailState.eventId" @close="handleCancel" />
+
+    <!-- 样例弹窗 -->
+    <SampleInfoDialog v-model="sampleInfoDialogVisible" @close-dialog="sampleInfoDialogVisible = false" />
+
   </div>
 </template>
 
@@ -170,6 +174,7 @@
 import { reactive, ref } from 'vue';
 import { ElMessage } from 'element-plus';
 import ShowReleaseDetail from './showReleaseDetail.vue';
+import SampleInfoDialog from './SampleInfoDialog.vue';
 import { getInformationView, getTemplateList, submitExamine } from '@/api/informationissue/informationissue';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 import { download2 } from '@/utils/request';
@@ -217,9 +222,11 @@ const formData = ref({
 
 const baseUrl = import.meta.env.VITE_APP_BASE_API;
 const downLoadApi = import.meta.env.VITE_APP_BASE_DOWNLOAD_API;
-
 const presetTemplates = ref([]);
 
+// 样例弹窗
+const sampleInfoDialogVisible = ref(false);
+
 const feedbackTextMap = {
   0: '仅需阅读',
   1: '点击确认',
@@ -245,9 +252,6 @@ const handleCancel = () => {
   showReleaseDetailState.show = false;
 };
 
-const showTemplateExample = () => {
-  ElMessage.info('点击了查看模板样例');
-};
 const viewFile = (file: any) => {
   download2(baseUrl + downLoadApi + file.url, file.name);
 };

+ 7 - 4
src/views/informationissue/informationDetail.vue

@@ -33,7 +33,7 @@
               <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-text class="common-btn-text-primary" @click="sampleInfoDialogVisible = true">样例</el-text>
             </el-form-item>
 
             <el-form-item v-if="formData.template_type === '1'" prop="template_url">
@@ -104,6 +104,9 @@
       </div>
     </div>
     <ContactSelect v-model="contactSelectState.show" :tree-data="treeData" :default-check-data="selectData" @confirm="handleData" />
+
+    <!-- 样例弹窗 -->
+    <SampleInfoDialog v-model="sampleInfoDialogVisible" @close-dialog="sampleInfoDialogVisible = false" />
   </div>
 </template>
 
@@ -111,6 +114,7 @@
 import { reactive, ref, watch } from 'vue';
 import { getInformationView, getInformationUpdate, getTemplateList, getPhoneList } from '@/api/informationissue/informationissue';
 import { ElMessage } from 'element-plus';
+import SampleInfoDialog from './SampleInfoDialog.vue';
 import ContactSelect from '@/components/ContactSelect/index.vue';
 const props = defineProps<{
   eventId: string | number;
@@ -186,9 +190,8 @@ const feedbackTextMap = {
   2: '签字确认'
 };
 
-const showTemplateExample = () => {
-  ElMessage.info('点击了查看模板样例');
-};
+// 样例弹窗
+const sampleInfoDialogVisible = ref(false);
 
 // 创建一个计算属性,根据 formData 中的 response_type 返回对应的文本
 const displayFeedbackText = computed({

+ 7 - 4
src/views/informationissue/informationView.vue

@@ -78,7 +78,7 @@
                           <el-select v-model="formData.template_id" disabled placeholder="请选择预设模板" style="width: 368px !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-text class="common-btn-text-primary" @click="sampleInfoDialogVisible = true">样例</el-text>
                         </el-form-item>
 
                         <el-form-item v-if="formData.template_type === '1'" prop="template_url">
@@ -196,6 +196,9 @@
       </div>
     </div>
     <SendDetail v-if="sendDetailState.show" :info_id="sendDetailState.info_id" @close="handleCancel" />
+
+    <!-- 样例弹窗 -->
+    <SampleInfoDialog v-model="sampleInfoDialogVisible" @close-dialog="sampleInfoDialogVisible = false" />
   </div>
 </template>
 
@@ -205,6 +208,7 @@ import { getInformationView, getTemplateList } from '@/api/informationissue/info
 import { ElMessage } from 'element-plus';
 import SendDetail from './sendDetail.vue';
 import { download2 } from '@/utils/request';
+import SampleInfoDialog from './SampleInfoDialog.vue';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 
 const { mm_info_type, mm_info_template_type } = toRefs<any>(
@@ -292,9 +296,8 @@ const publishNow = () => {
 
 };
 
-const showTemplateExample = () => {
-  ElMessage.info('点击了查看模板样例');
-};
+// 样例弹窗
+const sampleInfoDialogVisible = ref(false);
 
 const fetchInformation = async () => {
   try {