Pārlūkot izejas kodu

迭代七信息发布列表相关界面和通讯录接口

zhangyihao 7 mēneši atpakaļ
vecāks
revīzija
8b5bfb57f1

+ 9 - 1
src/api/informationissue/informationissue.ts

@@ -56,4 +56,12 @@ export function submitExamine(data) {
     method: 'post',
     data: data
   });
-}
+}
+// 通讯录
+export function getPhoneList(params) {
+  return request({
+    url: '/api/info_publish/addressbook/alldepts',
+    method: 'get',
+    params: params
+  });
+}

+ 7 - 8
src/components/ContactSelect/index.vue

@@ -12,7 +12,7 @@
           :props="defaultProps"
           :filter-node-method="filterNode"
           :default-checked-keys="defaultCheckData"
-          node-key="id"
+          node-key="uuid"
           @check-change="handleCheckChange"
         >
           <template #default="{ node, data }">
@@ -34,7 +34,7 @@
               <img class="icon" :src="getImage(item)" alt="" />
               {{ item.label }}
             </div>
-            <i class="icon-close" @click="uncheckNodeById(item.userId, index)" />
+            <i class="icon-close" @click="uncheckNodeById(item.id, index)" />
           </div>
         </div>
       </div>
@@ -52,7 +52,7 @@
 import { deepClone } from '@/utils/index';
 import userImg from '@/assets/images/user.png';
 import fileImg from '@/assets/images/file.png';
-
+import { getPhoneList} from '@/api/informationissue/informationissue';
 const props = defineProps({
   modelValue: Boolean,
   treeData: Array,
@@ -67,14 +67,13 @@ let defaultProps = reactive({
   label: 'label'
 });
 let checkData = ref([]);
-
 watch(filterText, (val) => {
   treeRef.value.filter(val);
 });
 const initData = () => {
   if (!!props.defaultCheckData) {
     props.defaultCheckData.forEach((item) => {
-      treeRef.value.setChecked(item.id, true, true);
+      treeRef.value.setChecked(item.uuid, true, true);
     });
     checkData.value = deepClone(props.defaultCheckData);
   }
@@ -109,7 +108,7 @@ const handleCheckChange = () => {
   const treeData = treeRef.value.getCheckedNodes(false, false);
   treeData.forEach((item) => {
     if (!item.deptType) {
-      if (!data.some((obj) => obj.userId === item.userId)) {
+      if (!data.some((obj) => obj.id === item.id)) {
         data.push(item);
       }
     }
@@ -120,8 +119,8 @@ const uncheckNodeById = (nodeId, index) => {
   const nodes = treeRef.value.getCheckedNodes();
   checkData.value.splice(index, 1);
   nodes.forEach((item) => {
-    if (item.userId === nodeId) {
-      treeRef.value.setChecked(item.id, false, true);
+    if (item.id === nodeId) {
+      treeRef.value.setChecked(item.uuid, false, true);
     }
   });
 };

+ 58 - 85
src/views/informationissue/informationApplication.vue

@@ -23,7 +23,12 @@
               </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" placeholder="请选择预设模板" style="width: 300px !important" @change="handleTemplateIdChanged">
+              <el-select
+                v-model="formData.template_id"
+                placeholder="请选择预设模板"
+                style="width: 300px !important"
+                @change="handleTemplateIdChanged"
+              >
                 <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>
@@ -52,7 +57,7 @@
                     <el-radio :value="'0'" @change="publishNow">立即发布</el-radio>
                     <el-radio :value="'1'">定时发布</el-radio>
                   </el-radio-group>
-                  <div v-if="formData.publish_type === '0'" style="min-width:240px;">发布时间:{{ formattedCurrentTime }}</div>
+                  <div v-if="formData.publish_type === '0'" style="min-width: 240px">发布时间:{{ formattedCurrentTime }}</div>
                   <el-date-picker v-else v-model="formData.publish_time" type="datetime" placeholder="选择发布时间" style="width: 250px !important" />
                 </el-form-item>
               </el-col>
@@ -82,13 +87,18 @@
       </div>
     </div>
   </div>
-  <ContactSelect v-model="contactSelectState.show" :tree-data="treeContactSelectData" :default-check-data="selectContactSelectData" @confirm="handleContactSelectData" />
+  <ContactSelect
+    v-model="contactSelectState.show"
+    :tree-data="treeData"
+    :default-check-data="selectContactSelectData"
+    @confirm="handleContactSelectData"
+  />
 </template>
 
 <script setup lang="ts">
 import { ref, onMounted } from 'vue';
 import { ElMessage } from 'element-plus';
-import { addInformation, getTemplateList } from '@/api/informationissue/informationissue';
+import {addInformation, getPhoneList, getTemplateList} from '@/api/informationissue/informationissue';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 
 const formRef = ref(null);
@@ -109,7 +119,7 @@ const formData = ref({
   examine_attachs: [],
   user_count: 0,
   users: [],
-  publish_channel: "粤政易" // 默认
+  publish_channel: '粤政易' // 默认
 });
 
 const formatTime = (isoString) => {
@@ -134,26 +144,30 @@ const rules = {
   publish_time: [{ required: true, message: '请选择发布时间', trigger: 'change' }],
   response_type: [{ required: true, message: '请选择消息反馈方式', trigger: 'change' }],
   examine_by: [{ required: true, message: '请填写审核人', trigger: 'blur' }],
-  attachs: [{
-    validator: (rule, value, callback) => {
-      if (value.length == 0) {
-        return callback(new Error('请上传附件'))
-      } else {
-        callback();
-      }     
-    },
-    trigger: 'change'
-  }],
-  examine_attachs: [{
-    validator: (rule, value, callback) => {
-      if (value.length == 0) {
-        return callback(new Error('请上传审批附件'))
-      } else {
-        callback();
-      }     
-    },
-    trigger: 'change'
-  }]
+  attachs: [
+    {
+      validator: (rule, value, callback) => {
+        if (value.length == 0) {
+          return callback(new Error('请上传附件'));
+        } else {
+          callback();
+        }
+      },
+      trigger: 'change'
+    }
+  ],
+  examine_attachs: [
+    {
+      validator: (rule, value, callback) => {
+        if (value.length == 0) {
+          return callback(new Error('请上传审批附件'));
+        } else {
+          callback();
+        }
+      },
+      trigger: 'change'
+    }
+  ]
 };
 
 const feedbackOptions = [
@@ -167,7 +181,7 @@ const presetTemplates = ref([]);
 const submitForm = () => {
   formRef.value?.validate(async (valid) => {
     if (valid) {
-      if(formData.value.user_count <= 0) {
+      if (formData.value.user_count <= 0) {
         proxy?.$modal.msgError('请选择发布名单');
         return;
       }
@@ -187,63 +201,12 @@ const showTemplateExample = () => {
   ElMessage.info('点击了查看模板样例');
 };
 
-const handleTemplateIdChanged = async(value: any) => {
-  const n = presetTemplates.value.find(i => i.value === value );
+const handleTemplateIdChanged = async (value: any) => {
+  const n = presetTemplates.value.find((i) => i.value === value);
   formData.value.content = n.content;
-}
+};
 
-// 通讯录(用玉波做的接口改成动态获取)
-const treeContactSelectData = reactive([
-  {
-    id: 1,
-    label: '茂南区',
-    deptType: true,
-    children: [
-      {
-        id: 2,
-        userId: 1,
-        label: '李里丽'
-      },
-      {
-        id: 3,
-        userId: 2,
-        label: '何里'
-      },
-      {
-        id: 4,
-        userId: 3,
-        label: '张力'
-      }
-    ]
-  },
-  {
-    id: 5,
-    label: '电白区',
-    deptType: true,
-    children: [
-      {
-        id: 6,
-        userId: 4,
-        label: '王五'
-      },
-      {
-        id: 7,
-        userId: 5,
-        label: '冯可'
-      },
-      {
-        id: 8,
-        userId: 6,
-        label: '刘森'
-      },
-      {
-        id: 9,
-        userId: 3,
-        label: '张力'
-      }
-    ]
-  }
-]);
+let treeData = ref([]);
 let contactSelectState = reactive({
   show: false
 });
@@ -255,14 +218,24 @@ const handleContactSelectData = (data) => {
 const toggleReleaseList = () => {
   contactSelectState.show = !contactSelectState.show;
 };
-
+const fetchTreeData = async () => {
+  try {
+    const response = await getPhoneList();
+    if (response && response.data) {
+      treeData.value = response.data;
+    }
+  } catch (error) {
+    console.error('Failed to fetch information:', error);
+  }
+};
 onMounted(() => {
+  fetchTreeData();
   formData.value.publish_time = formattedCurrentTime.value;
-  getTemplateList({}).then((res)=>{
+  getTemplateList({}).then((res) => {
     res.data.forEach((item, index) => {
-      presetTemplates.value.push({value:item.name, label: item.name, content: item.content});
+      presetTemplates.value.push({ value: item.name, label: item.name, content: item.content });
     });
-  })
+  });
 });
 </script>
 

+ 7 - 13
src/views/informationissue/informationApproval.vue

@@ -26,19 +26,19 @@
                         <el-radio value="1">自定义模板</el-radio>
                       </el-radio-group>
                     </el-form-item>
-                    <el-form-item v-if="formData.template_type === '0'" label="预设模板:" prop="presetTemplate">
+                    <el-form-item v-if="formData.template_type === '0'" label="预设模板:" prop="template_type">
                       <el-select v-model="formData.template_id" 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_id === '1'" prop="template_url">
+                    <el-form-item v-if="formData.template_type === '1'" prop="template_url">
                       <el-input v-model="formData.template_url" placeholder="请输入自定义详情页面链接地址" style="width: 468px !important" />
                     </el-form-item>
                     <el-form-item label="信息内容:" prop="content">
                       <el-input
-                        :rows="4"
                         v-model="formData.content"
+                        :rows="4"
                         type="textarea"
                         disabled
                         placeholder="请输入信息内容"
@@ -186,7 +186,6 @@ const formData = ref({
   examine_attachs: []
 });
 
-
 const presetTemplates = ref([]);
 
 const feedbackTextMap = {
@@ -217,13 +216,9 @@ const handleCancel = () => {
 const showTemplateExample = () => {
   ElMessage.info('点击了查看模板样例');
 };
-
 const viewFile = (file) => {
   window.open(file.url, '_blank'); // 打开新标签页
 };
-const publishNow = () => {
-  ElMessage.info('点击了立即发布');
-};
 const fetchInformation = async () => {
   try {
     const response = await getInformationView({ info_id: props.eventId });
@@ -248,8 +243,7 @@ const form2 = ref({
 });
 
 const form2rules = {
-  examine_type: [{ required: true, message: '请选择审批意见', trigger: 'blur' }],
-  content: [{ required: true, message: '请填写具体意见', trigger: 'blur' }],
+  examine_type: [{ required: true, message: '请选择审批意见', trigger: 'blur' }]
 };
 
 const submitForm = () => {
@@ -270,11 +264,11 @@ const submitForm = () => {
 // 在组件挂载时调用 fetchInformation
 onMounted(() => {
   fetchInformation();
-  getTemplateList({}).then((res)=>{
+  getTemplateList({}).then((res) => {
     res.data.forEach((item, index) => {
-      presetTemplates.value.push({value:item.name, label: item.name, content: item.content});
+      presetTemplates.value.push({ value: item.name, label: item.name, content: item.content });
     });
-  })
+  });
 });
 </script>
 

+ 29 - 68
src/views/informationissue/informationDetail.vue

@@ -14,29 +14,28 @@
             <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_id">
-              <el-radio-group v-model="formData.template_id" :disabled="!isEditable">
+            <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>
             </el-form-item>
-            <el-form-item v-if="formData.template_id === '预设模板'" label="预设模板:" prop="presetTemplate">
-              <el-select v-model="selectedPresetTemplate" placeholder="请选择预设模板" style="width: 300px !important">
+            <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-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_id === '自定义模板'" prop="customPageUrl">
-              <el-input v-model="formData.customPageUrl" placeholder="请输入自定义详情页面链接地址" style="width: 468px !important" />
-            </el-form-item>
-            <el-form-item label="信息内容:" prop="content">
+            <el-form-item v-if="formData.template_type === '1'" prop="template_url">
               <el-input
-                v-model="formData.content"
-                type="textarea"
-                disabled
-                placeholder="请输入信息内容"
+                v-model="formData.template_url"
+                :disabled="!isEditable"
+                placeholder="请输入自定义详情页面链接地址"
                 style="width: 468px !important"
-              ></el-input>
+              />
+            </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-form-item>
             <el-form-item label="查看附件:">
               <ul>
@@ -102,7 +101,7 @@
 
 <script setup lang="ts">
 import { reactive, ref, watch } from 'vue';
-import { getInformationView, getInformationUpdate, getTemplateList } from '@/api/informationissue/informationissue';
+import { getInformationView, getInformationUpdate, getTemplateList, getPhoneList } from '@/api/informationissue/informationissue';
 import { ElMessage } from 'element-plus';
 import ContactSelect from '@/components/ContactSelect/index.vue';
 const props = defineProps<{
@@ -115,7 +114,9 @@ const isEditable = ref(false);
 const formData = ref({
   title: '',
   publish_group: '',
+  template_type: '',
   template_id: '',
+  template_url: '',
   content: '',
   user_count: 0,
   releaseTime: '',
@@ -124,57 +125,7 @@ const formData = ref({
   publish_time: '',
   materials: ''
 });
-const treeData = reactive([
-  {
-    id: 1,
-    label: '茂南区',
-    deptType: true,
-    children: [
-      {
-        id: 2,
-        userId: 1,
-        label: '李里丽'
-      },
-      {
-        id: 3,
-        userId: 2,
-        label: '何里'
-      },
-      {
-        id: 4,
-        userId: 3,
-        label: '张力'
-      }
-    ]
-  },
-  {
-    id: 5,
-    label: '电白区',
-    deptType: true,
-    children: [
-      {
-        id: 6,
-        userId: 4,
-        label: '王五'
-      },
-      {
-        id: 7,
-        userId: 5,
-        label: '冯可'
-      },
-      {
-        id: 8,
-        userId: 6,
-        label: '刘森'
-      },
-      {
-        id: 9,
-        userId: 3,
-        label: '张力'
-      }
-    ]
-  }
-]);
+let treeData = ref([]);
 let contactSelectState = reactive({
   show: false,
   eventId: ''
@@ -211,7 +162,6 @@ const feedbackTextMap = {
   2: '签字确认'
 };
 
-
 const showTemplateExample = () => {
   ElMessage.info('点击了查看模板样例');
 };
@@ -240,7 +190,6 @@ const fetchDetail = async () => {
     ElMessage.error('获取信息详情失败,请稍后再试');
   }
 };
-
 watch(
   () => props.eventId,
   (newVal) => {
@@ -250,7 +199,19 @@ watch(
   },
   { immediate: true }
 );
-
+const fetchTreeData = async () => {
+  try {
+    const response = await getPhoneList();
+    if (response && response.data) {
+      treeData.value = response.data;
+    }
+  } catch (error) {
+    console.error('Failed to fetch information:', error);
+  }
+};
+onMounted(() => {
+  fetchTreeData();
+});
 const viewFile = (file) => {
   window.open(file.url, '_blank'); // 打开新标签页
 };

+ 8 - 4
src/views/informationissue/informationList.vue

@@ -41,7 +41,11 @@
       </transition>
       <!-- 表格组件 -->
       <el-table ref="multipleTable" v-loading="loading" :data="tableData" @selection-change="handleSelectionChange">
-        <el-table-column label="序号" align="center" prop="id" />
+        <el-table-column label="序号" align="center" width="60">
+          <template #default="scope">
+            {{ (queryParams.page - 1) * queryParams.page_size + (scope.$index + 1) }}
+          </template>
+        </el-table-column>
         <el-table-column label="发布单位" align="center" prop="publish_group" />
         <el-table-column label="信息内容" align="center" prop="content" />
         <el-table-column label="发布时间" align="center" prop="publish_time" />
@@ -77,8 +81,8 @@
         <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
           <template #default="scope">
             <el-text class="common-btn-text-primary" @click="handleView(scope.row)">查看</el-text>
-            <el-text class="common-btn-text-primary" v-if="(scope.row && scope.row.is_my_edit)" @click="handleUpdate(scope.row)">编辑</el-text>
-            <el-text class="common-btn-text-primary" v-if="(scope.row && scope.row.is_my_examine)" @click="handleApproval(scope.row)">审批</el-text>
+            <el-text v-if="scope.row && scope.row.is_my_edit" class="common-btn-text-primary" @click="handleUpdate(scope.row)">编辑</el-text>
+            <el-text v-if="scope.row && scope.row.is_my_examine" class="common-btn-text-primary" @click="handleApproval(scope.row)">审批</el-text>
           </template>
         </el-table-column>
       </el-table>
@@ -179,7 +183,7 @@ const getStatusClass2 = (value) => {
 const handleDisposeStatus = (val: any) => {
   queryParams.value.dispose_status = val;
   handleSearch();
-}
+};
 
 const handleSearch = () => {
   queryParams.value.page = 1;

+ 14 - 70
src/views/informationissue/informationView.vue

@@ -60,16 +60,23 @@
                       </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" 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_id === '1'" prop="template_url">
+                    <el-form-item v-if="formData.template_type === '1'" prop="template_url">
                       <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" :rows="4" type="textarea" disabled placeholder="请输入信息内容" style="width: 468px !important"></el-input>
+                      <el-input
+                        v-model="formData.content"
+                        :rows="4"
+                        type="textarea"
+                        disabled
+                        placeholder="请输入信息内容"
+                        style="width: 468px !important"
+                      ></el-input>
                     </el-form-item>
                     <el-form-item label="查看附件:">
                       <ul>
@@ -97,8 +104,7 @@
                       </el-col>
                     </el-row>
                     <el-form-item label="消息反馈方式:" prop="response_type" style="width: 468px !important">
-                      <el-select v-model="displayFeedbackText" disabled placeholder="请选择消息反馈方式">
-                      </el-select>
+                      <el-select v-model="displayFeedbackText" disabled placeholder="请选择消息反馈方式"> </el-select>
                     </el-form-item>
                   </div>
                   <h4 class="common-dialog-title">审核配置</h4>
@@ -144,21 +150,6 @@
                           </el-card>
                         </el-timeline-item>
                       </template>
-                      <!--
-                      <template v-for="(item, index) in approvalSteps" :key="index">
-                        <el-timeline-item placement="top">
-                          <el-card>
-                            <h4>{{ item.status }}</h4>
-                            <p v-if="item.handler">
-                              处理人:<span>{{ item.handler }}</span
-                              >&nbsp;&nbsp;&nbsp;&nbsp;时间:{{ item.time }}
-                            </p>
-                            <p v-if="item.result">处理结果:{{ item.result }}</p>
-                            <p v-if="item.comment">具体意见:{{ item.comment }}</p>
-                          </el-card>
-                        </el-timeline-item>
-                      </template>
-                      -->
                     </el-timeline>
                   </div>
                 </div>
@@ -214,51 +205,7 @@ const formData = ref({
 });
 
 const rules = ref({});
-
-const auditMaterials = ['2023年4月29日广东省发布突发事件预警信息.pdf', '审核材料2'];
-const files = ref([
-  { name: '2023年4月29日广东省发布突发事件预警信息.pdf', url: '/path/to/file1.pdf' },
-  { name: '2023年5月15日广东省发布突发事件预警信息.docx', url: '/path/to/file2.docx' }
-]);
 const presetTemplates = ref([]);
-const selectedPresetTemplate = ref('');
-const approvalSteps = ref([
-  {
-    status: '提交',
-    handler: '李四',
-    result: '提交',
-    time: '2023-05-17 10:00',
-    comment: '无'
-  },
-  {
-    status: '领导审批',
-    handler: '王五',
-    result: '审批通过',
-    time: '2023-05-17 13:00',
-    comment: '无'
-  },
-  {
-    status: '重新提交',
-    handler: '李四',
-    result: '重新提交',
-    time: '2023-05-17 12:00',
-    comment: '无'
-  },
-  {
-    status: '领导审批',
-    handler: '王五',
-    result: '审批通过',
-    time: '2023-05-17 13:00',
-    comment: '无'
-  },
-  {
-    status: '结束',
-    handler: '',
-    result: '',
-    time: '2023-05-17 14:00',
-    comment: ''
-  }
-]);
 const feedbackTextMap = {
   0: '仅需阅读',
   1: '点击确认',
@@ -292,9 +239,6 @@ const showTemplateExample = () => {
   ElMessage.info('点击了查看模板样例');
 };
 
-const publishNow = () => {
-  ElMessage.info('点击了立即发布');
-};
 const fetchInformation = async () => {
   try {
     const response = await getInformationView({ info_id: props.eventId });
@@ -307,11 +251,11 @@ const fetchInformation = async () => {
 };
 // 在组件挂载时调用 fetchInformation
 onMounted(() => {
-  getTemplateList({}).then((res)=>{
+  getTemplateList({}).then((res) => {
     res.data.forEach((item, index) => {
-      presetTemplates.value.push({value:item.name, label: item.name, content: item.content});
+      presetTemplates.value.push({ value: item.name, label: item.name, content: item.content });
     });
-  })
+  });
   fetchInformation();
 });
 </script>

+ 9 - 10
src/views/informationissue/sendDetail.vue

@@ -48,7 +48,11 @@
         </transition>
         <!-- 表格组件 -->
         <el-table ref="multipleTable" v-loading="loading" :data="tableData" @selection-change="handleSelectionChange">
-          <el-table-column prop="no" label="序号" width="180"></el-table-column>
+          <el-table-column label="序号" width="180">
+            <template #default="{ $index }">
+              {{ (queryParams.page - 1) * queryParams.page_size + $index + 1 }}
+            </template>
+          </el-table-column>
           <el-table-column prop="nick_name" label="姓名"></el-table-column>
           <el-table-column prop="yzy_account" label="手机号码"></el-table-column>
           <el-table-column prop="dept_name" label="组织"></el-table-column>
@@ -129,22 +133,17 @@ const { queryParams, form, tableData, loading, total, showSearch, channelOptions
 
 // 获取表格数据
 const fetchTableData = () => {
-  // 模拟数据获取逻辑
-  //const mockData = [
-  //  {name: '张三', phone: '13800138000', organization: '市应急局', feedbackMethod: '粤政易'}
-  //];
-  getSentList(queryParams.value).then((res)=> {
-    console.log(res.data)
+  getSentList(queryParams.value).then((res) => {
+    console.log(res.data);
     tableData.value = res.data;
     total.value = res.total;
-  })
+  });
 };
 
 // 处理搜索
 const handleSearch = () => {
   fetchTableData();
 };
-
 // 选择改变时触发
 const handleSelectionChange = (val) => {
   // 处理表格多选逻辑
@@ -192,7 +191,7 @@ watch(
   (newVal) => {
     if (newVal) {
       console.log('-----------');
-      queryParams.value.info_id = props.info_id
+      queryParams.value.info_id = props.info_id;
       fetchTableData();
     }
   },

+ 17 - 10
src/views/informationissue/showReleaseDetail.vue

@@ -29,11 +29,21 @@
         </transition>
         <!-- 表格组件 -->
         <el-table ref="multipleTable" v-loading="loading" :data="tableData" @selection-change="handleSelectionChange">
-          <el-table-column prop="no" label="序号" width="180"></el-table-column>
+          <el-table-column label="序号" width="180">
+            <template #default="{ $index }">
+              {{ (queryParams.page - 1) * queryParams.page_size + $index + 1 }}
+            </template>
+          </el-table-column>
           <el-table-column prop="nick_name" label="姓名"></el-table-column>
           <el-table-column prop="dept_name" label="组织"></el-table-column>
         </el-table>
-        <pagination v-show="total > 0" v-model:page="queryParams.page" v-model:limit="queryParams.page_size" :total="total" @pagination="fetchTableData" />
+        <pagination
+          v-show="total > 0"
+          v-model:page="queryParams.page"
+          v-model:limit="queryParams.page_size"
+          :total="total"
+          @pagination="fetchTableData"
+        />
       </div>
     </div>
   </el-dialog>
@@ -70,21 +80,18 @@ const data = reactive({
   loading: false,
   total: 0,
   showSearch: true,
-  channelOptions: [], // 渠道选项
+  channelOptions: [] // 渠道选项
 });
 
 const { queryParams, form, tableData, loading, total, showSearch, channelOptions } = toRefs(data);
 
 // 获取表格数据
 const fetchTableData = () => {
-  loading.value == true;
-  getSentList(queryParams.value).then((res)=> {
-    console.log(res.data)
+  getSentList(queryParams.value).then((res) => {
+    console.log(res.data);
     tableData.value = res.data;
     total.value = res.total;
-  }).finally(()=>{
-    loading.value = false;
-  })
+  });
 };
 
 // 处理搜索
@@ -130,7 +137,7 @@ watch(
   () => props.info_id,
   (newVal) => {
     if (newVal) {
-      queryParams.value.info_id = props.info_id
+      queryParams.value.info_id = props.info_id;
       fetchTableData();
     }
   },