index.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <div class="business-countersign-container layout-pd">
  3. <!-- 搜索 -->
  4. <el-card shadow="never">
  5. <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent class="mt15" label-width="100px">
  6. <el-row :gutter="10">
  7. <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="8">
  8. <el-form-item label="关键词" prop="Keyword">
  9. <el-input v-model="state.queryParams.Keyword" placeholder="工单编码/标题" clearable @keyup.enter="queryList" />
  10. </el-form-item>
  11. </el-col>
  12. <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="8">
  13. <el-form-item label=" ">
  14. <el-button type="primary" @click="queryList" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
  15. <el-button @click="resetQuery(ruleFormRef)" v-waves class="default-button" :loading="state.loading"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
  16. </el-form-item>
  17. </el-col>
  18. </el-row>
  19. </el-form>
  20. </el-card>
  21. <el-card shadow="never">
  22. <!-- 功能按钮 -->
  23. <div class="mb20">
  24. <el-button type="primary" @click="onExport" v-auth="'business:countersign:export'" :disabled="!multipleSelection.length">
  25. <SvgIcon name="iconfont icon-daochu" class="mr5" />导出
  26. </el-button>
  27. </div>
  28. <!-- 表格 -->
  29. <el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
  30. <el-table-column type="selection" width="55" />
  31. <el-table-column prop="order.no" label="工单编码" show-overflow-tooltip width="150"></el-table-column>
  32. <el-table-column width="100" label="省/市工单" prop="isProvince" >
  33. <template #default="{ row }">
  34. <span>{{ row.order?.isProvince ? '省工单' : '市工单' }}</span>
  35. </template>
  36. </el-table-column>
  37. <el-table-column label="工单标题" show-overflow-tooltip width="400">
  38. <template #default="{ row }">
  39. <span class="color-primary">{{ row.order?.title }}</span>
  40. </template>
  41. </el-table-column>
  42. <el-table-column prop="order.sourceChannel" label="来源方式" show-overflow-tooltip></el-table-column>
  43. <el-table-column prop="sourceChannel" label="回访状态" show-overflow-tooltip></el-table-column>
  44. <el-table-column prop="order.acceptType" label="受理类型" show-overflow-tooltip width="150"></el-table-column>
  45. <el-table-column prop="sourceChannel" label="热点分类" show-overflow-tooltip></el-table-column>
  46. <el-table-column label="受理人" show-overflow-tooltip width="170">
  47. <template #default="{ row }">
  48. <span
  49. >{{ row.order?.acceptorName }} <span v-if="row.order?.acceptorStaffNo">[{{ row.order?.acceptorStaffNo }}]</span>
  50. </span>
  51. </template>
  52. </el-table-column>
  53. <el-table-column prop="orgLevelOneName" label="一级部门" show-overflow-tooltip width="170"></el-table-column>
  54. <el-table-column prop="actualHandleOrgName" label="接办部门" show-overflow-tooltip width="170"></el-table-column>
  55. <el-table-column label="受理时间" show-overflow-tooltip width="170">
  56. <template #default="{ row }">
  57. <span>{{ formatDate(row.startTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
  58. </template>
  59. </el-table-column>
  60. <el-table-column label="办结时间" show-overflow-tooltip width="170">
  61. <template #default="{ row }">
  62. <span>{{ formatDate(row.filedTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
  63. </template>
  64. </el-table-column>
  65. <el-table-column prop="publishTime" label="发布时间" show-overflow-tooltip width="170">
  66. <template #default="{ row }">
  67. <span>{{ formatDate(row.publishTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
  68. </template>
  69. </el-table-column>
  70. <el-table-column prop="visitTime" label="回访时间" show-overflow-tooltip width="170">
  71. <template #default="{ row }">
  72. <span>{{ formatDate(row.visitTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
  73. </template>
  74. </el-table-column>
  75. <el-table-column label="被回访部门" show-overflow-tooltip width="150">
  76. <template #default="{ row }">
  77. <span v-if="row.visitTarget===20">{{row.visitOrgName}}</span>
  78. </template>
  79. </el-table-column>
  80. <el-table-column label="部门办件结果" show-overflow-tooltip width="150">
  81. <template #default="{ row }">
  82. <span v-if="row.visitTarget===20">{{row.orgProcessingResults?.value}}</span>
  83. </template>
  84. </el-table-column>
  85. <el-table-column label="部门办件态度" show-overflow-tooltip width="150">
  86. <template #default="{ row }">
  87. <span v-if="row.visitTarget===20">{{row.orgHandledAttitude?.value}}</span>
  88. </template>
  89. </el-table-column>
  90. <el-table-column label="不满意原因" show-overflow-tooltip width="150">
  91. <template #default="{ row }">
  92. <span v-if="row.visitTarget===20">
  93. {{row.orgNoSatisfiedReason?.map(item => item.value).join(',')}}
  94. </span>
  95. </template>
  96. </el-table-column>
  97. <el-table-column label="操作" width="160" fixed="right" align="center">
  98. <template #default="{ row }">
  99. <el-button link type="primary" @click="onSecondVisit(row)" title="二次回访" > 二次回访 </el-button>
  100. </template>
  101. </el-table-column>
  102. <template #empty>
  103. <Empty />
  104. </template>
  105. </el-table>
  106. <!-- 分页 -->
  107. <pagination
  108. :total="state.total"
  109. v-model:page="state.queryParams.PageIndex"
  110. v-model:limit="state.queryParams.PageSize"
  111. @pagination="queryList"
  112. />
  113. </el-card>
  114. <!-- 二次回访 -->
  115. <second-visit ref="secondVisitRef" />
  116. </div>
  117. </template>
  118. <script setup lang="ts" name="secondVisit">
  119. import {defineAsyncComponent, onMounted, reactive, ref} from 'vue';
  120. import {ElButton, ElMessage, FormInstance} from 'element-plus';
  121. import {auth} from '/@/utils/authFunction';
  122. import {throttle,} from '/@/utils/tools';
  123. import {formatDate} from '/@/utils/formatTime';
  124. import {useRouter} from "vue-router";
  125. // 引入组件
  126. const SecondVisit = defineAsyncComponent(() => import('/@/views/business/secondVisit/components/Visit.vue'));
  127. // 定义变量内容
  128. const ruleFormRef = ref<RefType>(); // 表单ref
  129. const router = useRouter(); // 路由
  130. const state = reactive(<any>{
  131. queryParams: {
  132. // 查询条件
  133. PageIndex: 1,
  134. PageSize: 10,
  135. Keyword: null, // 关键字
  136. },
  137. tableData: [{}], //表单
  138. loading: false, // 加载
  139. total: 0, // 总数
  140. });
  141. /** 获取列表 */
  142. const queryList = throttle(() => {
  143. if (!auth('business:secondVisit:query')) ElMessage.error('抱歉,您没有权限查看二次回访申请!');
  144. else {
  145. }
  146. }, 300);
  147. /** 重置按钮操作 */
  148. const resetQuery = throttle((formEl: FormInstance | undefined) => {
  149. if (!formEl) return;
  150. formEl.resetFields();
  151. queryList();
  152. }, 300);
  153. // 表格多选
  154. const multipleTableRef = ref<RefType>()
  155. const multipleSelection = ref<any>([])
  156. const handleSelectionChange = (val: any[]) => {
  157. multipleSelection.value = val
  158. }
  159. // 导出
  160. const onExport = () => {
  161. console.log('导出');
  162. };
  163. // 二次回访
  164. const secondVisitRef = ref<RefType>(); // 二次回访
  165. const onSecondVisit = (row:any)=>{
  166. secondVisitRef.value.openDialog(row)
  167. }
  168. onMounted( () => {
  169. queryList();
  170. });
  171. </script>
  172. <style scoped lang="scss">
  173. .business-countersign-container {
  174. }
  175. </style>