Browse Source

reactor:菜单调整;
feat:新增市民画像管理;

zhangchong 1 year ago
parent
commit
b71d599f5d
35 changed files with 1569 additions and 658 deletions
  1. 0 0
      src/api/auxiliary/advice.ts
  2. 0 0
      src/api/auxiliary/area.ts
  3. 0 0
      src/api/auxiliary/businessTag.ts
  4. 173 0
      src/api/auxiliary/notice.ts
  5. 33 0
      src/api/business/citizen.ts
  6. 0 45
      src/api/system/notice.ts
  7. 1 1
      src/components/CommonAdvice/index.vue
  8. 10 4
      src/components/ProcessApproval/index.vue
  9. 1 1
      src/layout/navBars/breadcrumb/telControl.vue
  10. 2 2
      src/views/auxiliary/advice/component/Advice-add.vue
  11. 2 2
      src/views/auxiliary/advice/component/Advice-edit.vue
  12. 10 11
      src/views/auxiliary/advice/index.vue
  13. 2 2
      src/views/auxiliary/area/component/Area-add.vue
  14. 2 2
      src/views/auxiliary/area/component/Area-edit.vue
  15. 10 10
      src/views/auxiliary/area/index.vue
  16. 145 0
      src/views/auxiliary/businessTag/component/Business-tag-add.vue
  17. 103 0
      src/views/auxiliary/businessTag/component/Business-tag-binding.vue
  18. 150 0
      src/views/auxiliary/businessTag/component/Business-tag-edit.vue
  19. 194 0
      src/views/auxiliary/businessTag/index.vue
  20. 1 1
      src/views/auxiliary/notice/component/Notice-add.vue
  21. 1 1
      src/views/auxiliary/notice/component/Notice-edit.vue
  22. 24 15
      src/views/auxiliary/notice/index.vue
  23. 0 147
      src/views/business/citizen/components/Lexicon-add.vue
  24. 0 154
      src/views/business/citizen/components/Lexicon-edit.vue
  25. 264 0
      src/views/business/citizen/components/Tags-edit.vue
  26. 102 0
      src/views/business/citizen/components/Tags-record.vue
  27. 21 26
      src/views/business/citizen/index.vue
  28. 152 61
      src/views/business/order/accept/Citizen-portrait.vue
  29. 156 165
      src/views/business/order/accept/Repeat-event.vue
  30. 6 3
      src/views/business/order/accept/index.vue
  31. 0 1
      src/views/business/order/components/Order-history.vue
  32. 1 1
      src/views/system/businessTag/component/Business-tag-add.vue
  33. 1 1
      src/views/system/businessTag/component/Business-tag-binding.vue
  34. 1 1
      src/views/system/businessTag/component/Business-tag-edit.vue
  35. 1 1
      src/views/system/businessTag/index.vue

+ 0 - 0
src/api/system/commonAdvice.ts → src/api/auxiliary/advice.ts


+ 0 - 0
src/api/system/area.ts → src/api/auxiliary/area.ts


+ 0 - 0
src/api/system/businessTag.ts → src/api/auxiliary/businessTag.ts


+ 173 - 0
src/api/auxiliary/notice.ts

@@ -0,0 +1,173 @@
+/*
+ * @Author: zc
+ * @description 通知公告
+ */
+import request from '/@/utils/request';
+/**
+ * @description 获取小红点计数
+ * @param {object} params
+ * @return {*}
+ */
+export const megcount = (params?: object) => {
+    return request({
+        url: '/api/v1/Article/megcount',
+        method: 'get',
+        params
+    });
+};
+
+/* ------------公告------ */
+/**
+ * @description 公告列表页基础信息
+ * @param {object} params
+ * @return {*}
+ */
+export const bulletinBaseData = (params?: object) => {
+    return request({
+        url: '/api/v1/Article/bulletin/listbasedata',
+        method: 'get',
+        params
+    });
+};
+/**
+ * @description 查询公告列表
+ * @param {object} params
+ * @return {*}
+ */
+export const bulletinList = (params?: object) => {
+    return request({
+        url: '/api/v1/Article/bulletin/query',
+        method: 'get',
+        params
+    });
+};
+/**
+ * @description 公告新增页基础信息
+ * @param {object} params
+ * @return {*}
+ */
+export const bulletinAddBaseData = (params?: object) => {
+    return request({
+        url: '/api/v1/Article/bulletin/addbasedata',
+        method: 'get',
+        params
+    });
+};
+/**
+ * @description 查询公告开启参数
+ * @param {object} params
+ * @return {*}
+ */
+export const workflowBulletinParams = (params?: object) => {
+    return request({
+        url: '/api/v1/Article/bulletin/startflow',
+        method: 'get',
+        params
+    });
+};
+/**
+ * @description 新增公告
+ * @param {object} data
+ * @return {*}
+ */
+export const BulletinAdd = (data?: object) => {
+    return request({
+        url: '/api/v1/Article/bulletin/add',
+        method: 'post',
+        data
+    });
+};
+/**
+ * @description 公告详情
+ * @param {string} id
+ * @return {*}
+ */
+export const bulletinDetail = (id?: string) => {
+    return request({
+        url: '/api/v1/Article/bulletin/entity/${id}',
+        method: 'get'
+    });
+};
+
+/*——————————通知——————————*/
+/**
+ * @description 通知列表页基础信息
+ * @param {string} id
+ * @return {*}
+ */
+export const circularBaseData = () => {
+    return request({
+        url: '/api/v1/Article/circular/listbasedata',
+        method: 'get'
+    });
+};
+/**
+ * @description 查询通知列表
+ * @param {object} params
+ * @return {*}
+ */
+export const circularList = (params?: object) => {
+    return request({
+        url: '/api/v1/Article/circular/query',
+        method: 'get',
+        params
+    });
+};
+/**
+ * @description 通知新增基础数据
+ * @param {object} params
+ * @return {*}
+ */
+export const circularAddBaseData = (params?: object) => {
+    return request({
+        url: '/api/v1/Article/circular/addbasedata',
+        method: 'get',
+        params
+    });
+};
+/**
+ * @description 查询通知开启参数
+ * @param {object} params
+ * @return {*}
+ */
+export const workflowCircularParams = (params?: object) => {
+    return request({
+        url: '/api/v1/Article/circular/startflow',
+        method: 'get',
+        params
+    });
+};
+/**
+ * @description 通知详情
+ * @param {string} id
+ * @return {*}
+ */
+export const circularDetail = (id: string) => {
+    return request({
+        url: '/api/v1/Article/circular/entity/${id}',
+        method: 'get'
+    });
+};
+/**
+ * @description 通知阅读
+ * @param {string} id
+ * @return {*}
+ */
+export const circularRead = (id: string) => {
+    return request({
+        url: '/api/v1/Article/circular/read/${id}',
+        method: 'get'
+    });
+};
+/**
+ * @description 通知新增
+ * @param {object} data
+ * @return {*}
+ */
+export const circularAdd= (data: object) => {
+    return request({
+        url: '/api/v1/Article/circular/add',
+        method: 'post',
+        data
+    });
+};

+ 33 - 0
src/api/business/citizen.ts

@@ -66,4 +66,37 @@ export const citizenDetailByPhone = (phone: string) => {
         url: `/api/v1/Order/citizen_phone/${phone}`,
         method: 'get'
     });
+};
+/**
+ * @description 新增市民标签
+ * @param {object} data
+ */
+export const citizenLabelAdd = (data: object) => {
+    return request({
+        url: `/api/v1/Order/citizen_label`,
+        method: 'post',
+        data
+    });
+};
+/**
+ * @description 删除市民标签
+ * @param {object} data
+ */
+export const citizenLabelDelete = (data: object) => {
+    return request({
+        url: `/api/v1/Order/citizen_label`,
+        method: 'delete',
+        data
+    });
+};
+/**
+ * @description 查询市民标签列表
+ * @param {object} params
+ */
+export const citizenLabelList = (params?: object) => {
+    return request({
+        url: `/api/v1/Order/citizen_label/list`,
+        method: 'get',
+        params
+    });
 };

+ 0 - 45
src/api/system/notice.ts

@@ -1,45 +0,0 @@
-/*
- * @Author: zc
-* @description 通知公告
- * @version:
- * @Date: 2022-08-09 16:19:55
- * @LastEditors: Please set LastEditors
- * @LastEditTime: 2022-11-16 14:49:01
- */
-import request from '/@/utils/request';
-/**
- * @description 查询公告列表
- * @param {object} params
- * @return {*}
- */
-export const announceList = (params?: object) => {
-    return request({
-        url: '/api/v1/Article/bulletin/query',
-        method: 'get',
-        params
-    });
-};
-/**
- * @description 列表页基础信息
- * @param {object} params
- * @return {*}
- */
-export const baseData = (params?: object) => {
-    return request({
-        url: '/api/v1/Article/bulletin/listbasedata',
-        method: 'get',
-        params
-    });
-};
-/**
- * @description 新增页基础信息
- * @param {object} params
- * @return {*}
- */
-export const announceAddBaseData = (params?: object) => {
-    return request({
-        url: '/api/v1/Article/bulletin/addbasedata',
-        method: 'get',
-        params
-    });
-};

+ 1 - 1
src/components/CommonAdvice/index.vue

@@ -114,7 +114,7 @@
 <script setup lang="ts" name="commonAdvice">
 import { reactive, ref, computed } from 'vue';
 import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
-import { commonList, addCommon, deleteCommon } from '/@/api/system/commonAdvice';
+import { commonList, addCommon, deleteCommon } from '/@/api/auxiliary/advice';
 import { commonEnum } from '/@/utils/constants';
 const emit = defineEmits(['chooseAdvice', 'update:modelValue']);
 const props = defineProps({

+ 10 - 4
src/components/ProcessApproval/index.vue

@@ -205,7 +205,7 @@
                   <el-cascader
                       :options="orgsOptions"
                       filterable
-                      :props="{ value: 'id', label: 'orgName', emitPath: false, checkStrictly: true }"
+                      :props="{ value: 'id', label: 'name', emitPath: false, checkStrictly: true }"
                       placeholder="请选择来源单位"
                       class="w100"
                       v-model="state.announceForm.sourceOrg"
@@ -498,7 +498,8 @@ import { redoBaseData, redoApply } from '/@/api/business/redo';
 import { delayCalcEndTime, workflowDelayParams, delayApply } from '/@/api/business/delay';
 import { discernApply, screenBaseData, workflowDiscernParams } from '/@/api/business/discern';
 import { debounce } from '/@/utils/tools';
-import {announceAddBaseData} from '/@/api/system/notice';
+import {bulletinAddBaseData,workflowCircularParams,workflowBulletinParams} from '/@/api/auxiliary/notice';
+import {circularAddBaseData} from "/@/api/auxiliary/notice";
 
 // 引入组件
 const CommonAdvice = defineAsyncComponent(() => import('/@/components/CommonAdvice/index.vue')); // 常用意见
@@ -649,13 +650,18 @@ const openDialog = async (val: any) => {
 			handleResult(res);
 			break;
     case '新增通知':
-
+      res = await workflowBulletinParams(); // 新增通知开启流程参数
+      const circularResponse = await circularAddBaseData(); // 通知基础数据
+      console.log(circularResponse,'21')
+      handleResult(res);
       break;
     case '新增公告':
-      const responseAnnounce = await announceAddBaseData(); // 公告基础数据
+      res = await workflowCircularParams(); // 新增公告开启流程参数
+      const responseAnnounce = await bulletinAddBaseData(); // 公告基础数据
       bulletinTypeOptions.value = responseAnnounce.result?.bulletinType ?? [];
       pushRangesOptions.value  = responseAnnounce.result?.pushRanges ?? [];
       orgsOptions.value = responseAnnounce.result?.orgsOptions ?? [];
+      handleResult(res);
       break;
 		default: // 默认下一流程 工单办理
 			res = await workflowNextSteps(state.workflowId);

+ 1 - 1
src/layout/navBars/breadcrumb/telControl.vue

@@ -402,7 +402,7 @@ import other from '/@/utils/other';
 import mittBus from '/@/utils/mitt';
 import { workflowStepOptions } from '/@/api/system/workflow';
 import { restFlowStart, restFlowDel, restFlowStartWex, getTelList } from '/@/api/public/wex';
-import { commonList } from '/@/api/system/commonAdvice';
+import { commonList } from '/@/api/auxiliary/advice';
 import { auth } from '/@/utils/authFunction';
 import { VoiceInterfaceObject } from '/@/utils/PhoneScript';
 import { WebsocketInterface } from '/@/utils/websocket';

+ 2 - 2
src/views/system/config/advice/component/Advice-add.vue → src/views/auxiliary/advice/component/Advice-add.vue

@@ -25,11 +25,11 @@
 		</el-dialog>
 </template>
 
-<script setup lang="ts" name="parameterAdd">
+<script setup lang="ts" name="auxiliaryAdviceAdd">
 import { reactive, ref } from 'vue';
 import { ElMessage, FormInstance } from 'element-plus';
 import { throttle } from '/@/utils/tools';
-import { addCommon } from '/@/api/system/commonAdvice';
+import { addCommon } from '/@/api/auxiliary/advice';
 // 定义子组件向父组件传值/事件
 const emit = defineEmits(['updateList']);
 const props = defineProps({

+ 2 - 2
src/views/system/config/advice/component/Advice-edit.vue → src/views/auxiliary/advice/component/Advice-edit.vue

@@ -25,11 +25,11 @@
 		</el-dialog>
 </template>
 
-<script setup lang="ts" name="parameterEdit">
+<script setup lang="ts" name="auxiliaryAdviceEdit">
 import { reactive, ref } from 'vue';
 import { ElMessage, FormInstance } from 'element-plus';
 import { throttle } from '/@/utils/tools';
-import { commonUpdate } from '/@/api/system/commonAdvice';
+import { commonUpdate } from '/@/api/auxiliary/advice';
 import other from "/@/utils/other";
 // 定义子组件向父组件传值/事件
 const emit = defineEmits(['updateList']);

+ 10 - 11
src/views/system/config/advice/index.vue → src/views/auxiliary/advice/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<div class="system-config-advice-container layout-pd">
+	<div class="auxiliary-advice-container layout-pd">
     <el-card shadow="never">
       <el-form :model="state.queryParams" ref="ruleFormRef" :inline="true" @submit.native.prevent>
         <el-form-item label="意见类型" prop="CommonType">
@@ -20,10 +20,10 @@
     </el-card>
 		<el-card shadow="never">
 			<div class="mb20">
-				<el-button type="primary" @click="onAdviceAdd" v-waves v-auth="'system:config:advice:add'">
+				<el-button type="primary" @click="onAdviceAdd" v-waves v-auth="'auxiliary:advice:add'">
 					<SvgIcon name="ele-Plus" class="mr5" />新增
 				</el-button>
-        <el-button type="primary" @click="onAdviceDelete" v-waves v-auth="'system:config:advice:delete'" :disabled="!multipleSelection.length">
+        <el-button type="primary" @click="onAdviceDelete" v-waves v-auth="'auxiliary:advice:delete'" :disabled="!multipleSelection.length">
           <SvgIcon name="ele-Delete" class="mr5" />删除
         </el-button>
 			</div>
@@ -46,7 +46,7 @@
 				</el-table-column>
 				<el-table-column label="操作" width="120" fixed="right" align="center">
 					<template #default="{ row }">
-						<el-button link type="primary" @click="updateAdvice(row)" v-auth="'system:config:advice:edit'" title="修改参数"> 修改 </el-button>
+						<el-button link type="primary" @click="updateAdvice(row)" v-auth="'auxiliary:advice:edit'" title="修改参数"> 修改 </el-button>
 						<!--              <el-button link type="danger" @click="parameterDelete(row)" v-auth="'system:timeLimit:detail'" title="删除参数"> 删除 </el-button>-->
 					</template>
 				</el-table-column>
@@ -69,17 +69,16 @@
 	</div>
 </template>
 
-<script lang="ts" setup name="systemConfigAdvice">
+<script lang="ts" setup name="auxiliaryAdvice">
 import { reactive, ref, onMounted, defineAsyncComponent } from 'vue';
 import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
-import { throttle } from '/@/utils/tools';
 import { formatDate } from '/@/utils/formatTime';
 import {auth} from "/@/utils/authFunction";
-import {commonBaseData,publicCommonList,deleteCommon} from '/@/api/system/commonAdvice';
+import {commonBaseData,publicCommonList,deleteCommon} from '/@/api/auxiliary/advice';
 
 // 引入组件
-const AdviceAdd = defineAsyncComponent(() => import('/@/views/system/config/advice/component/Advice-add.vue')); // 常用意见新增
-const AdviceEdit = defineAsyncComponent(() => import('/@/views/system/config/advice/component/Advice-edit.vue')); // 常用意见编辑
+const AdviceAdd = defineAsyncComponent(() => import('/@/views/auxiliary/advice/component/Advice-add.vue')); // 常用意见新增
+const AdviceEdit = defineAsyncComponent(() => import('/@/views/auxiliary/advice/component/Advice-edit.vue')); // 常用意见编辑
 
 // 定义变量内容
 const state = reactive<any>({
@@ -117,7 +116,7 @@ const getBaseData = async ()=>{
 // 获取参数列表
 const queryList = () => {
 	state.loading = true;
-  if (!auth('system:config:advice:query')) ElMessage.error('抱歉,您没有权限获取公开意见列表!');
+  if (!auth('auxiliary:advice:query')) ElMessage.error('抱歉,您没有权限获取公开意见列表!');
   else {
     publicCommonList(state.queryParams)
         .then((res) => {
@@ -180,7 +179,7 @@ onMounted(() => {
 </script>
 
 <style lang="scss" scoped>
-.system-config-advice-container {
+.auxiliary-advice-container {
 
 }
 </style>

+ 2 - 2
src/views/system/config/area/component/Area-add.vue → src/views/auxiliary/area/component/Area-add.vue

@@ -32,7 +32,7 @@
 			<template #footer>
 				<span class="dialog-footer">
 					<el-button @click="onCancel" class="default-button">取 消</el-button>
-					<el-button type="primary" @click="onSubmit(ruleFormRef)" v-waves="'light'" :loading="state.loading">确 定 </el-button>
+					<el-button type="primary" @click="onSubmit(ruleFormRef)" :loading="state.loading">确 定 </el-button>
 				</span>
 			</template>
 		</el-dialog>
@@ -41,7 +41,7 @@
 <script setup lang="ts" name="systemAddArea">
 import { reactive, ref } from 'vue';
 import { ElMessage, FormInstance } from 'element-plus';
-import {treeAreaAdd} from '/@/api/system/area';
+import {treeAreaAdd} from '/@/api/auxiliary/area';
 // 定义子组件向父组件传值/事件
 const emit = defineEmits(['updateList']);
 

+ 2 - 2
src/views/system/config/area/component/Area-edit.vue → src/views/auxiliary/area/component/Area-edit.vue

@@ -32,7 +32,7 @@
 			<template #footer>
 				<span class="dialog-footer">
 					<el-button @click="onCancel" class="default-button">取 消</el-button>
-					<el-button type="primary" @click="onSubmit(ruleFormRef)" v-waves="'light'" :loading="state.loading">修 改 </el-button>
+					<el-button type="primary" @click="onSubmit(ruleFormRef)" :loading="state.loading">修 改 </el-button>
 				</span>
 			</template>
 		</el-dialog>
@@ -44,7 +44,7 @@ import { ElMessage, FormInstance } from 'element-plus';
 import { auth } from '/@/utils/authFunction';
 import { excludeSelfById } from '/@/utils/tools';
 import other from '/@/utils/other';
-import { treeAreaDetail, treeAreaEdit } from '/@/api/system/area';
+import { treeAreaDetail, treeAreaEdit } from '/@/api/auxiliary/area';
 
 // 定义子组件向父组件传值/事件
 const emit = defineEmits(['updateList']);

+ 10 - 10
src/views/system/config/area/index.vue → src/views/auxiliary/area/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="system-config-area-container layout-padding">
+  <div class="auxiliary-area-container layout-padding">
     <div class="layout-padding-auto layout-padding-view pd20">
       <div class="flex-center-between mb20">
         <el-form :model="state.queryParams" ref="ruleFormRef" :inline="true" @submit.native.prevent>
@@ -21,7 +21,7 @@
           />
             {{ state.isExpand ? '收起' : '展开' }}</el-button
           >
-          <el-button type="primary" @click="onOpenAddArea('')" v-auth="'system:config:area:add'"> <SvgIcon name="ele-Plus" class="mr5" />新增 </el-button>
+          <el-button type="primary" @click="onOpenAddArea('')" v-auth="'auxiliary:area:add'"> <SvgIcon name="ele-Plus" class="mr5" />新增 </el-button>
         </div>
       </div>
       <!-- 表格 -->
@@ -47,7 +47,7 @@
     <area-edit ref="areaEditRef" @updateList="queryList" />
   </div>
 </template>
-<script lang="ts" setup name="systemConfigArea">
+<script lang="ts" setup name="auxiliaryArea">
 import { defineAsyncComponent, ref, h, reactive, onMounted, watch } from 'vue';
 import {ElButton, ElMessage, ElMessageBox} from 'element-plus';
 import type { FormInstance } from 'element-plus';
@@ -55,10 +55,10 @@ import { formatDate } from '/@/utils/formatTime';
 import { auth } from '/@/utils/authFunction';
 import { throttle } from '/@/utils/tools';
 import other from '/@/utils/other';
-import {treeArea,treeAreaDelete} from '/@/api/system/area';
+import {treeArea,treeAreaDelete} from '/@/api/auxiliary/area';
 // 引入组件
-const AreaAdd = defineAsyncComponent(() => import('/@/views/system/config/area/component/Area-add.vue'));  // 新增区域
-const AreaEdit = defineAsyncComponent(() => import('/@/views/system/config/area/component/Area-edit.vue'));  // 编辑区域
+const AreaAdd = defineAsyncComponent(() => import('/@/views/auxiliary/area/component/Area-add.vue'));  // 新增区域
+const AreaEdit = defineAsyncComponent(() => import('/@/views/auxiliary/area/component/Area-edit.vue'));  // 编辑区域
 
 // 定义变量内容
 const state = reactive({
@@ -97,7 +97,7 @@ const state = reactive({
       align: 'center',
       cellRenderer: ({ rowData }: any) => {
         return h('span', { class: 'flex' }, [
-          (auth('system:config:area:edit') && rowData.isCanModify)
+          (auth('auxiliary:area:edit') && rowData.isCanModify)
               ? h(
                   ElButton,
                   {
@@ -109,7 +109,7 @@ const state = reactive({
                   { default: () => '修改' }
               )
               : '',
-          (auth('system:config:area:delete') && rowData.isCanModify)
+          (auth('auxiliary:area:delete') && rowData.isCanModify)
               ? h(
                   ElButton,
                   {
@@ -223,7 +223,7 @@ const onDelArea = (row: any) => {
 };
 // 获取所有部门结构
 const queryList = async () => {
-  if (!auth('system:config:area:query')) ElMessage.error('抱歉,您没有权限获区域列表!');
+  if (!auth('auxiliary:area:query')) ElMessage.error('抱歉,您没有权限获区域列表!');
   else {
     state.loading = true;
     try {
@@ -243,7 +243,7 @@ onMounted(() => {
 });
 </script>
 <style lang="scss" scoped>
-.system-config-area-container{
+.auxiliary-area-container{
   .table {
     flex: 1;
   }

+ 145 - 0
src/views/auxiliary/businessTag/component/Business-tag-add.vue

@@ -0,0 +1,145 @@
+<template>
+		<el-dialog v-model="state.dialogVisible" width="800px" draggable title="新增业务标签">
+			<el-form :model="state.ruleForm" label-width="90px" ref="ruleFormRef">
+				<el-row :gutter="10">
+					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
+						<el-form-item label="标签名称" prop="name" :rules="[{ required: true, message: '请输入标签名称', trigger: 'blur' }]">
+							<el-input v-model="state.ruleForm.name" placeholder="请输入标签名称" clearable></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
+						<el-form-item label="标签类型" prop="type" :rules="[{ required: true, message: '请选择标签类型', trigger: 'change' }]">
+              <el-select v-model="state.ruleForm.type" placeholder="请选择标签类型" class="w100" @change="selectType">
+                <el-option v-for="item in tagType" :value="item.key" :key="item.key" :label="item.value" />
+              </el-select>
+						</el-form-item>
+					</el-col>
+          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" v-if="isClassify">
+            <el-form-item label="分类名称" prop="classify" :rules="[{ required: false, message: '请选择分类名称', trigger: 'change' }]">
+              <el-select v-model="state.ruleForm.classify" placeholder="请选择分类名称" class="w100">
+                <el-option v-for="item in classifyList" :value="item.name" :key="item.id" :label="item.name" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" v-else>
+            <el-form-item label="分类名称" prop="classify" :rules="[{ required: false, message: '请输入分类名称', trigger: 'blur' }]">
+              <el-input v-model="state.ruleForm.classify" placeholder="请输入分类名称" clearable></el-input>
+            </el-form-item>
+          </el-col>
+					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
+						<el-form-item label="业务类型" prop="businessType" :rules="[{ required: true, message: '请选择业务类型', trigger: 'change' }]">
+              <el-select v-model="state.ruleForm.businessType" placeholder="请选择业务类型" class="w100">
+                <el-option v-for="item in businessTagType" :value="item.key" :key="item.key" :label="item.value" />
+              </el-select>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+			<template #footer>
+				<span class="dialog-footer">
+					<el-button @click="onCancel" class="default-button">取 消</el-button>
+					<el-button type="primary" @click="onSubmit(ruleFormRef)" :loading="loading">确 定</el-button>
+				</span>
+			</template>
+		</el-dialog>
+</template>
+
+<script setup lang="ts" name="businessTagAdd">
+import { reactive, ref } from 'vue';
+import { ElMessage, FormInstance } from 'element-plus';
+import { throttle } from '/@/utils/tools';
+import { businessTagAdd,businessTagList } from '/@/api/auxiliary/businessTag';
+
+const props = defineProps({
+  businessTagType: {
+    type: Array,
+    default: () => <EmptyArrayType>[],
+  },
+  tagType: {
+    type: Array,
+    default: () => <EmptyArrayType>[],
+  },
+})
+
+// 定义子组件向父组件传值/事件
+const emit = defineEmits(['updateList']);
+
+// 定义变量内容
+const state = reactive<any>({
+	dialogVisible: false,
+	ruleForm: {
+    name: '', // 标签名
+    type: '', // 标签类型
+    businessType: '', // 标签业务类型
+    classify: '', // 分类名称
+	},
+});
+let loading = ref<boolean>(false);  // 加载状态
+// 打开弹窗
+const ruleFormRef = ref<RefType>();
+const openDialog = async () => {
+	ruleFormRef.value?.resetFields();
+	try {
+		state.dialogVisible = true;
+	} catch (error) {
+		console.log(error);
+	}
+};
+// 关闭弹窗
+const closeDialog = () => {
+	state.dialogVisible = false;
+};
+// 取消
+const onCancel = () => {
+	closeDialog();
+};
+const classifyList = ref<EmptyArrayType>([]);// 分类列表
+const isClassify = ref<boolean>(false);// 是否显示分类
+const getClassify =()=>{
+  businessTagList({type:1,PageIndex:1,PageSize:999}).then((res:any)=>{
+    classifyList.value = res.result?.items;
+  })
+}
+const selectType = (val:any)=>{
+  ruleFormRef.value.resetFields('classify');
+  if(val===2){// 如果是分类
+    getClassify();
+    isClassify.value = true;
+  }else{
+    isClassify.value = false;
+  }
+}
+// 新增
+const onSubmit = throttle(async (formEl: FormInstance | undefined) => {
+	if (!formEl) return;
+	await formEl.validate((valid: boolean) => {
+		if (!valid) return;
+		loading.value = true;
+    const request = [state.ruleForm]
+    businessTagAdd(request)
+			.then(() => {
+				ElMessage({
+					message: '操作成功',
+					type: 'success',
+				});
+				emit('updateList');
+			})
+			.catch((error) => {
+				// 新增失败
+				ElMessage({
+					message: `操作失败: ${error.message}`,
+					type: 'error',
+				});
+			})
+			.finally(() => {
+				loading.value = false;
+				closeDialog();
+			});
+	});
+}, 300);
+// 暴露变量
+defineExpose({
+	openDialog,
+	closeDialog,
+});
+</script>

+ 103 - 0
src/views/auxiliary/businessTag/component/Business-tag-binding.vue

@@ -0,0 +1,103 @@
+<template>
+  <el-dialog v-model="state.dialogVisible" width="500px" draggable title="批量绑定">
+    <el-form :model="state.ruleForm" label-width="90px" ref="ruleFormRef">
+      <el-form-item label="分类名称" prop="classify" :rules="[{ required: true, message: '请选择分类名称', trigger: 'change' }]">
+        <el-select v-model="state.ruleForm.classify" placeholder="请选择分类名称" class="w100" :disabled="state.isDisabled">
+          <el-option v-for="item in classifyList" :value="item.name" :key="item.id" :label="item.name" />
+        </el-select>
+      </el-form-item>
+    </el-form>
+    <template #footer>
+				<span class="dialog-footer">
+					<el-button @click="onCancel" class="default-button">取 消</el-button>
+					<el-button type="primary" @click="onSubmit(ruleFormRef)" :loading="loading">确 定</el-button>
+				</span>
+    </template>
+  </el-dialog>
+</template>
+
+<script setup lang="ts" name="businessTagBinding">
+import { reactive, ref } from 'vue';
+import { ElMessage, FormInstance } from 'element-plus';
+import { throttle } from '/@/utils/tools';
+import { businessTagBinding,businessTagList } from '/@/api/auxiliary/businessTag';
+
+
+// 定义子组件向父组件传值/事件
+const emit = defineEmits(['updateList']);
+
+// 定义变量内容
+const state = reactive<any>({
+  dialogVisible: false,
+  ruleForm: {
+    name: '', // 标签名
+    type: '', // 标签类型
+    businessType: '', // 标签业务类型
+    classify: '', // 分类名称
+  },
+});
+let loading = ref<boolean>(false);  // 加载状态
+// 打开弹窗
+const ruleFormRef = ref<RefType>();
+const idsArray = ref<EmptyArrayType>([]);
+const openDialog = async (ids:any) => {
+  idsArray.value = ids;
+  ruleFormRef.value?.resetFields();
+  try {
+    getClassify();
+    state.dialogVisible = true;
+  } catch (error) {
+    console.log(error);
+  }
+};
+// 关闭弹窗
+const closeDialog = () => {
+  state.dialogVisible = false;
+};
+// 取消
+const onCancel = () => {
+  closeDialog();
+};
+const classifyList = ref<EmptyArrayType>([]);// 分类列表
+const getClassify =()=>{
+  businessTagList({type:1,PageIndex:1,PageSize:999}).then((res:any)=>{
+    classifyList.value = res.result?.items;
+  })
+}
+// 新增
+const onSubmit = throttle(async (formEl: FormInstance | undefined) => {
+  if (!formEl) return;
+  await formEl.validate((valid: boolean) => {
+    if (!valid) return;
+    loading.value = true;
+    const request = {
+      ids:idsArray.value,
+      classify:state.ruleForm.classify,
+    }
+    businessTagBinding(request)
+        .then(() => {
+          ElMessage({
+            message: '操作成功',
+            type: 'success',
+          });
+          emit('updateList');
+        })
+        .catch((error) => {
+          // 新增失败
+          ElMessage({
+            message: `操作失败: ${error.message}`,
+            type: 'error',
+          });
+        })
+        .finally(() => {
+          loading.value = false;
+          closeDialog();
+        });
+  });
+}, 300);
+// 暴露变量
+defineExpose({
+  openDialog,
+  closeDialog,
+});
+</script>

+ 150 - 0
src/views/auxiliary/businessTag/component/Business-tag-edit.vue

@@ -0,0 +1,150 @@
+<template>
+		<el-dialog v-model="state.dialogVisible" width="800px" draggable :title="dialogTitle">
+      <el-form :model="state.ruleForm" label-width="90px" ref="ruleFormRef">
+        <el-row :gutter="10">
+          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
+            <el-form-item label="标签名称" prop="name" :rules="[{ required: true, message: '请输入标签名称', trigger: 'blur' }]">
+              <el-input v-model="state.ruleForm.name" placeholder="请输入标签名称" clearable :disabled="state.isDisabled"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
+            <el-form-item label="标签类型" prop="type" :rules="[{ required: true, message: '请选择标签类型', trigger: 'change' }]">
+              <el-select v-model="state.ruleForm.type" placeholder="请选择标签类型" class="w100" @change="selectType" :disabled="state.isDisabled">
+                <el-option v-for="item in tagType" :value="item.key" :key="item.key" :label="item.value" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" v-if="isClassify">
+            <el-form-item label="分类名称" prop="classify" :rules="[{ required: false, message: '请选择分类名称', trigger: 'change' }]">
+              <el-select v-model="state.ruleForm.classify" placeholder="请选择分类名称" class="w100" :disabled="state.isDisabled">
+                <el-option v-for="item in classifyList" :value="item.name" :key="item.id" :label="item.name" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" v-else>
+            <el-form-item label="分类名称" prop="classify" :rules="[{ required: false, message: '请输入分类名称', trigger: 'blur' }]">
+              <el-input v-model="state.ruleForm.classify" placeholder="请输入分类名称" clearable :disabled="state.isDisabled"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
+            <el-form-item label="业务类型" prop="businessType" :rules="[{ required: true, message: '请选择业务类型', trigger: 'change' }]">
+              <el-select v-model="state.ruleForm.businessType" placeholder="请选择业务类型" class="w100" :disabled="state.isDisabled">
+                <el-option v-for="item in businessTagType" :value="item.key" :key="item.key" :label="item.value" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+			<template #footer v-if="!state.isDisabled">
+				<span class="dialog-footer">
+					<el-button @click="onCancel" class="default-button">取 消</el-button>
+					<el-button type="primary" @click="onSubmit(ruleFormRef)" :loading="loading">确 定</el-button>
+				</span>
+			</template>
+		</el-dialog>
+</template>
+
+<script setup lang="ts" name="businessTagEdit">
+import { computed, reactive, ref } from 'vue';
+import { ElMessage, FormInstance } from 'element-plus';
+import { throttle } from '/@/utils/tools';
+import {businessTagUpdate, businessTagDetail, businessTagList} from '/@/api/auxiliary/businessTag';
+
+const props = defineProps({
+  businessTagType: {
+    type: Array,
+    default: () => <EmptyArrayType>[],
+  },
+  tagType: {
+    type: Array,
+    default: () => <EmptyArrayType>[],
+  },
+})
+// 定义子组件向父组件传值/事件
+const emit = defineEmits(['updateList']);
+
+// 定义变量内容
+const state = reactive<any>({
+	dialogVisible: false,
+	ruleForm: {
+    name: '', // 标签名
+    type: '', // 标签类型
+    businessType: '', // 标签业务类型
+    classify: '', // 分类名称
+	},
+	isDisabled: false, // 是否禁用
+});
+let loading = ref<boolean>(false);  // 加载状态
+const dialogTitle = computed(() => {
+	return state.isDisabled ? '查看业务标签' : '编辑业务标签';
+});
+// 打开弹窗
+const ruleFormRef = ref<RefType>();
+const openDialog = async (id: string, isDisabled?: boolean) => {
+	ruleFormRef.value?.resetFields();
+	try {
+		const res: any = await businessTagDetail(id);
+		state.ruleForm = res.result ?? <EmptyObjectType>{};
+    if(state.ruleForm.type === 2){
+      getClassify();
+      isClassify.value = true;
+    }
+		state.isDisabled = isDisabled ?? false;
+		state.dialogVisible = true;
+	} catch (error) {
+		console.log(error);
+	}
+};
+// 关闭弹窗
+const closeDialog = () => {
+	state.dialogVisible = false;
+};
+// 取消
+const onCancel = () => {
+	closeDialog();
+};
+const classifyList = ref<EmptyArrayType>([]);// 分类列表
+const isClassify = ref<boolean>(false);// 是否显示分类
+const getClassify =()=>{
+  businessTagList({type:1,PageIndex:1,PageSize:999}).then((res:any)=>{
+    classifyList.value = res.result?.items;
+  })
+}
+const selectType = (val:any)=>{
+  ruleFormRef.value.resetFields('classify');
+  if(val===2){// 如果是分类
+    getClassify();
+    isClassify.value = true;
+  }else{
+    isClassify.value = false;
+  }
+}
+// 新增
+const onSubmit = throttle(async (formEl: FormInstance | undefined) => {
+	if (!formEl) return;
+	await formEl.validate((valid: boolean) => {
+		if (!valid) return;
+		loading.value = true;
+    businessTagUpdate(state.ruleForm)
+			.then(() => {
+				ElMessage({
+					message: '操作成功',
+					type: 'success',
+				});
+				loading.value = false;
+				closeDialog();
+				emit('updateList');
+			})
+			.catch(() => {
+				// 新增失败
+				loading.value = false;
+				closeDialog();
+			});
+	});
+}, 300);
+// 暴露变量
+defineExpose({
+	openDialog,
+	closeDialog,
+});
+</script>

+ 194 - 0
src/views/auxiliary/businessTag/index.vue

@@ -0,0 +1,194 @@
+<template>
+  <div class="system-business-tag-container layout-pd">
+    <el-card shadow="never">
+      <el-form :model="state.queryParams" ref="ruleFormRef" :inline="true" @submit.native.prevent>
+        <el-form-item label="关键字" prop="Keyword">
+          <el-input v-model="state.queryParams.Keyword" placeholder="标签名称 " clearable @keyup.enter="queryList" />
+        </el-form-item>
+        <el-form-item label="标签类型" prop="Type">
+          <el-select v-model="state.queryParams.Type" placeholder="请选择标签类型">
+            <el-option v-for="item in tagType" :value="item.key" :key="item.key" :label="item.value" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="业务类型" prop="BusinessType">
+          <el-select v-model="state.queryParams.BusinessType" placeholder="请选择业务类型">
+            <el-option v-for="item in businessTagType" :value="item.key" :key="item.key" :label="item.value" />
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="queryList" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
+          <el-button @click="resetQuery(ruleFormRef)" class="default-button"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
+        </el-form-item>
+      </el-form>
+    </el-card>
+    <el-card shadow="never">
+      <div class="mb20">
+        <el-button type="primary" @click="addParameter" v-auth="'auxiliary:businessTag:add'">
+          <SvgIcon name="ele-Plus" class="mr5" />新增
+        </el-button>
+        <el-button type="primary" @click="businessTagRemove" v-auth="'auxiliary:businessTag:delete'" :disabled="!multipleSelection.length">
+          <SvgIcon name="ele-Delete" class="mr5" />删除
+         </el-button>
+        <el-button type="primary" @click="businessTagBinding" v-auth="'auxiliary:businessTag:binding'" :disabled="!multipleSelection.length">
+          <SvgIcon name="ele-Link" class="mr5" />批量绑定
+        </el-button>
+      </div>
+      <!-- 表格 -->
+      <el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55"  />
+        <el-table-column prop="name" label="标签名称" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="typeText" label="标签类型" show-overflow-tooltip width="130"></el-table-column>
+        <el-table-column prop="businessTypeText" label="业务类型" show-overflow-tooltip width="300"></el-table-column>
+        <el-table-column prop="classify" label="分类名称" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="creationTime" label="创建时间" show-overflow-tooltip width="170">
+          <template #default="{ row }">
+            <span>{{ formatDate(row.creationTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="creatorName" label="创建人" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="creatorOrgName" label="创建人部门" show-overflow-tooltip></el-table-column>
+        <el-table-column label="操作" width="120" fixed="right" align="center">
+          <template #default="{ row }">
+            <el-button link type="primary" @click="updateBusinessTah(row)" v-auth="'system:systemBusinessTag:edit'" title="修改参数"> 修改 </el-button>
+            <el-button link type="info" @click="viewBusinessTag(row)" v-auth="'auxiliary:businessTag:detail'" title="查看详情"> 查看 </el-button>
+          </template>
+        </el-table-column>
+        <template #empty>
+          <Empty />
+        </template>
+      </el-table>
+      <!-- 分页 -->
+      <pagination
+          :total="state.total"
+          v-model:page="state.queryParams.PageIndex"
+          v-model:limit="state.queryParams.PageSize"
+          @pagination="queryList"
+      />
+    </el-card>
+    <!--  参数新增  -->
+    <business-tag-add ref="businessTagAddRef" @updateList="queryList" :businessTagType="businessTagType" :tagType="tagType"/>
+    <!--  参数编辑  -->
+    <business-tag-edit ref="businessTagEditRef" @updateList="queryList" :businessTagType="businessTagType" :tagType="tagType"/>
+    <!--  批量绑定  -->
+    <business-tag-binding-com ref="businessTagBindingRef" @updateList="queryList"/>
+  </div>
+</template>
+
+<script lang="ts" setup name="auxiliaryBusinessTag">
+import { reactive, ref, onMounted, defineAsyncComponent } from 'vue';
+import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
+import { formatDate } from '/@/utils/formatTime';
+import {auth} from "/@/utils/authFunction";
+import { businessTagList,businessTagBaseData,businessTagDelete } from '/@/api/auxiliary/businessTag';
+// 引入组件
+const BusinessTagBindingCom = defineAsyncComponent(() => import('/@/views/auxiliary/businessTag/component/Business-tag-binding.vue')); // 绑定标签
+const BusinessTagAdd = defineAsyncComponent(() => import('/@/views/auxiliary/businessTag/component/Business-tag-add.vue')); // 参数标签
+const BusinessTagEdit = defineAsyncComponent(() => import('/@/views/auxiliary/businessTag/component/Business-tag-edit.vue')); // 编辑标签
+
+// 定义变量内容
+const state = reactive<any>({
+  loading: false, // 加载状态
+  queryParams: {
+    // 查询参数
+    PageIndex: 1,
+    PageSize: 10,
+    Keyword: '', // 参数名称
+    Type: null, // 标签类型
+    BusinessType:null,// 业务类型
+  },
+  total: 0, // 总条数
+  tableData: [], // 表格数据
+});
+const ruleFormRef = ref<any>(null); // 表单ref
+const businessTagType = ref<EmptyArrayType>();// 业务类型
+const tagType = ref<EmptyArrayType>();// 标签类型
+// 获取基础数据
+const getBaseData = async ()=>{
+  try {
+    const res = await businessTagBaseData();
+    businessTagType.value = res.result?.businessTagType ?? [];
+    tagType.value = res.result?.tagType ?? [];
+  }catch (error){
+    console.log(error)
+  }
+}
+// 获取参数列表
+const queryList = () => {
+  state.loading = true;
+  if (!auth('auxiliary:businessTag:query')) ElMessage.error('抱歉,您没有权限获取数据权限列表!');
+  else {
+    businessTagList(state.queryParams)
+        .then((res) => {
+          state.loading = false;
+          state.tableData = res.result.items ?? [];
+          state.total = res.result.total ?? 0;
+        })
+        .finally(() => {
+          state.loading = false;
+        });
+  }
+};
+// 重置表单
+const resetQuery = (formEl: FormInstance | undefined) => {
+  if (!formEl) return;
+  formEl.resetFields();
+  queryList();
+};
+// 新增参数
+const businessTagAddRef = ref<RefType>(); // 参数新增
+const addParameter = () => {
+  businessTagAddRef.value.openDialog();
+};
+// 修改参数
+const businessTagEditRef = ref<RefType>(); // 参数编辑
+const updateBusinessTah = (row: any) => {
+  businessTagEditRef.value.openDialog(row.id);
+};
+// 查看详情
+const viewBusinessTag = (row: any) => {
+  businessTagEditRef.value.openDialog(row.id, true);
+};
+// 表格多选
+const multipleTableRef = ref<RefType>();
+const multipleSelection = ref<any>([]);
+const handleSelectionChange = (val: any[]) => {
+  multipleSelection.value = val;
+};
+// 删除参数
+const businessTagRemove = (row: any) => {
+  const ids = multipleSelection.value.map((item: any) => item.id);
+  const names = multipleSelection.value.map((item: any) => item.name);
+  ElMessageBox.confirm(`您确定要删除:【${names}】,是否继续?`, '提示', {
+    confirmButtonText: '确认',
+    cancelButtonText: '取消',
+    type: 'warning',
+    draggable: true,
+    cancelButtonClass: 'default-button',
+    autofocus: false,
+  })
+      .then(() => {
+        businessTagDelete({ids}).then(() => {
+          ElMessage.success('操作成功');
+          queryList();
+        });
+      })
+      .catch(() => {});
+};
+// 批量绑定
+const businessTagBindingRef = ref<RefType>(); // 绑定ref
+const businessTagBinding = ()=>{
+  const ids = multipleSelection.value.map((item: any) => item.id);
+  businessTagBindingRef.value.openDialog(ids);
+}
+// 页面加载时
+onMounted(() => {
+  getBaseData();
+  queryList();
+});
+</script>
+
+<style lang="scss" scoped>
+.system-business-tag-container{
+
+}
+</style>

+ 1 - 1
src/views/system/config/notice/component/Notice-add.vue → src/views/auxiliary/notice/component/Notice-add.vue

@@ -103,7 +103,7 @@
 import { reactive, ref,defineAsyncComponent } from 'vue';
 import { ElMessage, FormInstance } from 'element-plus';
 import { throttle } from '/@/utils/tools';
-import { addCommon } from '/@/api/system/commonAdvice';
+import { addCommon } from '/@/api/auxiliary/advice';
 import '@wangeditor/editor/dist/css/style.css'; // 引入 css
 // 引入组件
 const Editor = defineAsyncComponent(() => import('/@/components/Editor/index.vue'));  // 富文本编辑器

+ 1 - 1
src/views/system/config/notice/component/Notice-edit.vue → src/views/auxiliary/notice/component/Notice-edit.vue

@@ -29,7 +29,7 @@
 import { reactive, ref } from 'vue';
 import { ElMessage, FormInstance } from 'element-plus';
 import { throttle } from '/@/utils/tools';
-import { commonUpdate } from '/@/api/system/commonAdvice';
+import { commonUpdate } from '/@/api/auxiliary/advice';
 import other from "/@/utils/other";
 // 定义子组件向父组件传值/事件
 const emit = defineEmits(['updateList']);

+ 24 - 15
src/views/system/config/notice/index.vue → src/views/auxiliary/notice/index.vue

@@ -33,10 +33,10 @@
 				</el-form-item>
 			</el-form>
 			<div class="mb20">
-				<el-button type="primary" @click="onNoticeAdd" v-waves v-auth="'system:config:notice:add'">
+				<el-button type="primary" @click="onNoticeAdd" v-waves v-auth="'auxiliary:notice:add'">
 					<SvgIcon name="ele-Plus" class="mr5" />新增
 				</el-button>
-				<el-button type="primary" @click="onNoticeDelete" v-waves v-auth="'system:config:notice:delete'" :disabled="!multipleSelection.length">
+				<el-button type="primary" @click="onNoticeDelete" v-waves v-auth="'auxiliary:notice:delete'" :disabled="!multipleSelection.length">
 					<SvgIcon name="ele-Delete" class="mr5" />删除
 				</el-button>
 			</div>
@@ -87,7 +87,7 @@
 				</template>
 				<el-table-column label="操作" width="120" fixed="right" align="center">
 					<template #default="{ row }">
-						<el-button link type="primary" @click="updateNotice(row)" v-auth="'system:config:notice:edit'" title="修改通知公告"> 修改 </el-button>
+						<el-button link type="primary" @click="updateNotice(row)" v-auth="'auxiliary:notice:edit'" title="修改通知公告"> 修改 </el-button>
 					</template>
 				</el-table-column>
 				<template #empty>
@@ -111,18 +111,18 @@
 	</div>
 </template>
 
-<script lang="ts" setup name="systemConfigNotice">
+<script lang="ts" setup name="auxiliaryNotice">
 import { reactive, ref, onMounted, defineAsyncComponent } from 'vue';
 import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
-import { commonEnum, shortcuts } from '/@/utils/constants';
+import { shortcuts } from '/@/utils/constants';
 import { formatDate } from '/@/utils/formatTime';
 import { auth } from '/@/utils/authFunction';
-import { commonBaseData, publicCommonList, deleteCommon } from '/@/api/system/commonAdvice';
-import { announceList, baseData } from '/@/api/system/notice';
+import { deleteCommon } from '/@/api/auxiliary/advice';
+import {bulletinList, circularList, bulletinBaseData, circularBaseData} from '/@/api/auxiliary/notice';
 
 // 引入组件
-const NoticeAdd = defineAsyncComponent(() => import('/@/views/system/config/notice/component/Notice-add.vue')); // 公告通知新增
-const NoticeEdit = defineAsyncComponent(() => import('/@/views/system/config/notice/component/Notice-edit.vue')); // 公告通知编辑
+const NoticeAdd = defineAsyncComponent(() => import('/@/views/auxiliary/notice/component/Notice-add.vue')); // 公告通知新增
+const NoticeEdit = defineAsyncComponent(() => import('/@/views/auxiliary/notice/component/Notice-edit.vue')); // 公告通知编辑
 const ProcessApproval = defineAsyncComponent(() => import('/@/components/ProcessApproval/index.vue')); // 流程审批
 
 // 定义变量内容
@@ -159,20 +159,30 @@ const timeStartChangeCr = (val: string[]) => {
 };
 const getBaseData = async () => {
 	try {
-		const res = await baseData();
-		bulletinType.value = res.result ?? [];
+    let res = null;
+    switch (listType.value){
+      case '0':
+        res = await circularBaseData();
+        bulletinType.value = res.result ?? [];
+        break;
+      case '1':
+        res = await bulletinBaseData();
+        bulletinType.value = res.result ?? [];
+        break;
+    }
 	} catch (error) {
 		console.log(error);
 	}
 };
 // 获取参数列表
 const queryList = () => {
+  getBaseData();
 	state.loading = true;
-	if (!auth('system:config:notice:query')) ElMessage.error('抱歉,您没有权限获取通知公告列表!');
+	if (!auth('auxiliary:notice:query')) ElMessage.error('抱歉,您没有权限获取通知公告列表!');
 	else {
 		switch (listType.value) {
 			case '0':
-				publicCommonList(state.queryParams)
+        circularList(state.queryParams)
 					.then((res) => {
 						state.loading = false;
 						state.tableData = res.result.items ?? [];
@@ -183,7 +193,7 @@ const queryList = () => {
 					});
 				break;
 			case '1':
-				announceList(state.queryParams)
+				bulletinList(state.queryParams)
 					.then((res) => {
 						state.loading = false;
 						state.tableData = res.result.items ?? [];
@@ -253,7 +263,6 @@ const onNoticeDelete = () => {
 };
 // 页面加载时
 onMounted(() => {
-	getBaseData();
 	queryList();
 });
 </script>

+ 0 - 147
src/views/business/citizen/components/Lexicon-add.vue

@@ -1,147 +0,0 @@
-<template>
-	<el-dialog title="新增违禁词" v-model="state.dialogVisible" width="769px" draggable @close="close">
-		<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="100px">
-			<el-row :gutter="10">
-				<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
-					<el-form-item label="违禁词" prop="name" :rules="[{ required: true, message: '请输入违禁词', trigger: 'blur' }]">
-						<el-input v-model="state.ruleForm.name" placeholder="请输入违禁词" clearable></el-input>
-					</el-form-item>
-				</el-col>
-				<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
-					<el-form-item label="违禁词分类" prop="classify" :rules="[{ required: true, message: '请选择违禁词分类', trigger: 'change' }]">
-						<el-select v-model="state.ruleForm.classify" placeholder="请选择违禁词分类" class="w100">
-							<el-option v-for="item in props.prohibitedClassify" :value="item.dicDataValue" :key="item.dicDataValue" :label="item.dicDataName" />
-						</el-select>
-					</el-form-item>
-				</el-col>
-				<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
-					<el-form-item label="违禁词属性" prop="type" :rules="[{ required: true, message: '请选择违禁词属性', trigger: 'change' }]">
-						<el-select v-model="state.ruleForm.type" placeholder="请选择违禁词属性" class="w100">
-							<el-option v-for="item in props.prohibitedType" :value="item.dicDataValue" :key="item.dicDataValue" :label="item.dicDataName" />
-						</el-select>
-					</el-form-item>
-				</el-col>
-				<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-					<el-form-item label="违禁同义词" prop="synonym" :rules="[{ required: false, message: '请选择违禁同义词', trigger: 'change' }]">
-						<el-tag v-for="tag in dynamicTags" :key="tag" class="mr10 mb10" size="large" closable :disable-transitions="false" @close="handleClose(tag)">
-							{{ tag }}
-						</el-tag>
-						<el-input
-							v-if="inputVisible"
-							ref="InputRef"
-							v-model="inputValue"
-							@keyup.enter="handleInputConfirm"
-							@blur="handleInputConfirm"
-							style="max-width: 200px"
-              class="mb10"
-						/>
-						<el-button v-else @click="showInput" class="mb10"> 添加同义词 </el-button>
-					</el-form-item>
-				</el-col>
-			</el-row>
-		</el-form>
-		<template #footer>
-			<span class="dialog-footer">
-				<el-button @click="closeDialog" class="default-button">取 消</el-button>
-				<el-button type="primary" @click="onSubmit(ruleFormRef)" :loading="state.loading">确 定 </el-button>
-			</span>
-		</template>
-	</el-dialog>
-</template>
-
-<script setup lang="ts" name="qualityLexiconAdd">
-import { nextTick, reactive, ref } from 'vue';
-import { ElInput, ElMessage, FormInstance } from 'element-plus';
-import { lexiconAdd } from '/@/api/quality/lexicon';
-// 定义子组件向父组件传值/事件
-const emit = defineEmits(['updateList']);
-
-const props = defineProps({
-	prohibitedClassify: {
-		type: Array,
-		default: () => [],
-	},
-	prohibitedType: {
-		type: Array,
-		default: () => [],
-	},
-});
-
-const inputValue = ref('');
-const dynamicTags = ref<EmptyArrayType>([]);
-const inputVisible = ref(false);
-const InputRef = ref<InstanceType<typeof ElInput>>();
-// 删除同义词
-const handleClose = (tag: string) => {
-	dynamicTags.value.splice(dynamicTags.value.indexOf(tag), 1);
-};
-// 展示输入框
-const showInput = () => {
-	inputVisible.value = true;
-	nextTick(() => {
-		InputRef.value!.input!.focus();
-	});
-};
-// 确定添加
-const handleInputConfirm = () => {
-	if (inputValue.value) {
-		dynamicTags.value.push(inputValue.value);
-	}
-	inputVisible.value = false;
-	inputValue.value = '';
-};
-
-// 定义变量内容
-const ruleFormRef = ref<FormInstance>();
-const state = reactive<any>({
-	dialogVisible: false, // 弹窗显示隐藏
-	ruleForm: {
-		name: '', // 违禁词
-		classify: '', // 违禁词分类
-		type: '', // 违禁词属性
-	},
-	loading: false, // 确定按钮loading
-});
-
-// 打开弹窗
-const openDialog = async () => {
-	state.dialogVisible = true;
-};
-// 关闭弹窗
-const closeDialog = () => {
-	state.dialogVisible = false;
-};
-const close = () => {
-	dynamicTags.value = [];
-	ruleFormRef.value?.clearValidate();
-	ruleFormRef.value?.resetFields();
-};
-// 新增
-const onSubmit = (formEl: FormInstance | undefined) => {
-	if (!formEl) return;
-	formEl.validate((valid: boolean) => {
-		if (!valid) return;
-		state.loading = true;
-		const request = {
-			...state.ruleForm,
-			synonym: dynamicTags.value.join(','),
-		};
-		lexiconAdd(request)
-			.then(() => {
-				emit('updateList');
-				closeDialog(); // 关闭弹窗
-				ElMessage.success('操作成功');
-				state.loading = false;
-			})
-			.catch(() => {
-				emit('updateList');
-				state.loading = false;
-			});
-	});
-};
-// 暴露变量
-defineExpose({
-	openDialog,
-	closeDialog,
-});
-</script>

+ 0 - 154
src/views/business/citizen/components/Lexicon-edit.vue

@@ -1,154 +0,0 @@
-<template>
-	<el-dialog title="编辑违禁词" v-model="state.dialogVisible" width="769px" draggable @close="close">
-		<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="100px">
-			<el-row :gutter="10">
-				<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
-					<el-form-item label="违禁词" prop="name" :rules="[{ required: true, message: '请输入违禁词', trigger: 'blur' }]">
-						<el-input v-model="state.ruleForm.name" placeholder="请输入违禁词" clearable></el-input>
-					</el-form-item>
-				</el-col>
-				<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
-					<el-form-item label="违禁词分类" prop="classify" :rules="[{ required: true, message: '请选择违禁词分类', trigger: 'change' }]">
-						<el-select v-model="state.ruleForm.classify" placeholder="请选择违禁词分类" class="w100">
-							<el-option v-for="item in props.prohibitedClassify" :value="item.dicDataValue" :key="item.dicDataValue" :label="item.dicDataName" />
-						</el-select>
-					</el-form-item>
-				</el-col>
-				<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
-					<el-form-item label="违禁词属性" prop="type" :rules="[{ required: true, message: '请选择违禁词属性', trigger: 'change' }]">
-						<el-select v-model="state.ruleForm.type" placeholder="请选择违禁词属性" class="w100">
-							<el-option v-for="item in props.prohibitedType" :value="item.dicDataValue" :key="item.dicDataValue" :label="item.dicDataName" />
-						</el-select>
-					</el-form-item>
-				</el-col>
-				<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-					<el-form-item label="违禁同义词" prop="synonym" :rules="[{ required: false, message: '请选择违禁同义词', trigger: 'change' }]">
-						<el-tag v-for="tag in dynamicTags" :key="tag" size="large" class="mr10 mb10" closable :disable-transitions="false" @close="handleClose(tag)">
-							{{ tag }}
-						</el-tag>
-						<el-input
-							v-if="inputVisible"
-							ref="InputRef"
-							v-model="inputValue"
-							@keyup.enter="handleInputConfirm"
-							@blur="handleInputConfirm"
-							style="max-width: 200px"
-              class="mb10"
-						/>
-						<el-button v-else @click="showInput" class="mb10"> 添加同义词 </el-button>
-					</el-form-item>
-				</el-col>
-			</el-row>
-		</el-form>
-		<template #footer>
-			<span class="dialog-footer">
-				<el-button @click="closeDialog" class="default-button">取 消</el-button>
-				<el-button type="primary" @click="onSubmit(ruleFormRef)" :loading="state.loading">确 定 </el-button>
-			</span>
-		</template>
-	</el-dialog>
-</template>
-
-<script setup lang="ts" name="qualityLexiconEdit">
-import { nextTick, reactive, ref } from 'vue';
-import { ElInput, ElMessage, FormInstance } from 'element-plus';
-import { lexiconDetail, lexiconUpdate } from '/@/api/quality/lexicon';
-// 定义子组件向父组件传值/事件
-const emit = defineEmits(['updateList']);
-
-const props = defineProps({
-	prohibitedClassify: {
-		type: Array,
-		default: () => [],
-	},
-	prohibitedType: {
-		type: Array,
-		default: () => [],
-	},
-});
-
-const inputValue = ref('');
-const dynamicTags = ref<EmptyArrayType>([]);
-const inputVisible = ref(false);
-const InputRef = ref<InstanceType<typeof ElInput>>();
-// 删除同义词
-const handleClose = (tag: string) => {
-	dynamicTags.value.splice(dynamicTags.value.indexOf(tag), 1);
-};
-// 展示输入框
-const showInput = () => {
-	inputVisible.value = true;
-	nextTick(() => {
-		InputRef.value!.input!.focus();
-	});
-};
-// 确定添加
-const handleInputConfirm = () => {
-	if (inputValue.value) {
-		dynamicTags.value.push(inputValue.value);
-	}
-	inputVisible.value = false;
-	inputValue.value = '';
-};
-
-// 定义变量内容
-const ruleFormRef = ref<FormInstance>();
-const state = reactive<any>({
-	dialogVisible: false, // 弹窗显示隐藏
-	ruleForm: {
-		name: '', // 违禁词
-		classify: '', // 违禁词分类
-		type: '', // 违禁词属性
-	},
-	loading: false, // 确定按钮loading
-});
-
-// 打开弹窗
-const openDialog = async (row: any) => {
-	try {
-		const res = await lexiconDetail(row.id);
-		state.ruleForm = res.result ?? {};
-		dynamicTags.value = res.result.synonym?.split(',') ?? [];
-		state.dialogVisible = true;
-	} catch (e) {
-		console.log(e);
-	}
-};
-// 关闭弹窗
-const closeDialog = () => {
-	state.dialogVisible = false;
-};
-const close = () => {
-	dynamicTags.value = [];
-	ruleFormRef.value?.clearValidate();
-	ruleFormRef.value?.resetFields();
-};
-// 新增
-const onSubmit = (formEl: FormInstance | undefined) => {
-	if (!formEl) return;
-	formEl.validate((valid: boolean) => {
-		if (!valid) return;
-		state.loading = true;
-		const request = {
-			...state.ruleForm,
-			synonym: dynamicTags.value.join(','),
-		};
-		lexiconUpdate(request)
-			.then(() => {
-				emit('updateList');
-				closeDialog(); // 关闭弹窗
-				ElMessage.success('操作成功');
-				state.loading = false;
-			})
-			.catch(() => {
-				emit('updateList');
-				state.loading = false;
-			});
-	});
-};
-// 暴露变量
-defineExpose({
-	openDialog,
-	closeDialog,
-});
-</script>

+ 264 - 0
src/views/business/citizen/components/Tags-edit.vue

@@ -0,0 +1,264 @@
+<template>
+	<el-dialog v-model="dialogVisible" draggable title="编辑市民标签" ref="dialogRef" width="900px" append-to-body destroy-on-close>
+		<div class="order-accept-citizen-portrait" v-loading="loading">
+			<el-row :gutter="20">
+				<el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
+					<el-card shadow="never">
+						<p class="border-title mb10">基本信息</p>
+						<div class="info-form">
+							<p class="form-item">
+								<span class="form-label">联系电话:</span>
+								{{ formData.citizen.phoneNumber }}
+							</p>
+							<p class="form-item">
+								<span class="form-label">姓名:</span>
+								{{ formData.citizen.name }}
+							</p>
+							<p class="form-item">
+								<span class="form-label">首次联系:</span>
+								{{ formatDate(formData.citizen.firstCallTime, 'YYYY-mm-dd HH:MM:SS') }}
+							</p>
+							<p class="form-item">
+								<span class="form-label">上次联系:</span>
+								{{ formatDate(formData.lastCallTime, 'YYYY-mm-dd HH:MM:SS') }}
+							</p>
+						</div>
+					</el-card>
+					<el-card shadow="never" class="mt20">
+						<p class="border-title mb10">工单历史</p>
+						<div class="info-form">
+							<p class="form-item">
+								<span class="form-label">全部工单:</span>
+								{{ formData.order.allOrderNum }}
+							</p>
+							<p class="form-item">
+								<span class="form-label">已办工单:</span>
+								{{ formData.order.endOrderNum }}
+							</p>
+							<p class="form-item">
+								<span class="form-label">在办工单:</span>
+								{{ formData.order.handOrderNum }}
+							</p>
+							<p class="form-item">
+								<span class="form-label">不满意工单:</span>
+								{{ formData.order.dissatisfactionNum }}
+							</p>
+						</div>
+					</el-card>
+				</el-col>
+				<el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8" style="display: flex; align-items: center">
+					<el-card class="w100" shadow="never">
+						<p class="citizen-title mb10">市民画像</p>
+						<div class="citizen-img-box">
+							<img v-lazy="'https://cdn.pixabay.com/photo/2016/11/18/23/38/child-1837375_1280.png'" alt="" />
+						</div>
+					</el-card>
+				</el-col>
+				<el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
+					<el-card shadow="never">
+						<p class="border-title mb10">来电历史:</p>
+						<div class="info-form">
+							<p class="form-item">
+								<span class="form-label">来电次数:</span>
+								{{ formData.callHistory.allCallNum }}
+							</p>
+							<p class="form-item">
+								<span class="form-label">接通次数:</span>
+								{{ formData.callHistory.connectNum }}
+							</p>
+							<p class="form-item">
+								<span class="form-label">回拨次数:</span>
+								{{ formData.callHistory.callBackNum }}
+							</p>
+						</div>
+					</el-card>
+					<el-card shadow="never" class="mt20">
+						<p class="border-title mb10">关注诉求</p>
+						<div class="tag-list">
+							<el-tag v-for="tag in formData.hotspotNames" effect="dark" :key="tag">{{ tag }}</el-tag>
+						</div>
+					</el-card>
+				</el-col>
+				<el-col :span="24" class="mt20">
+					<el-card shadow="never">
+						<p class="border-title mb10">市民标签</p>
+						<div class="tag-list">
+							<el-tag v-for="tag in formData.label" closable effect="dark" @close="closeTag(tag)" :key="tag">{{ tag.label }}</el-tag>
+						</div>
+						<el-form :model="state.ruleForm" label-width="0" ref="ruleFormRef" @submit.native.prevent>
+							<el-form-item label="" prop="content" :rules="[{ required: true, message: '请输入标签内容', trigger: 'blur' }]">
+								<div class="flex-center-align mt10 w100">
+									<el-input
+										v-model="state.ruleForm.content"
+										placeholder="请输入标签内容"
+										clearable
+										show-word-limit
+										maxlength="10"
+										@keyup.enter="addTag(ruleFormRef)"
+									/>
+									<el-button type="primary" @click="addTag(ruleFormRef)" class="ml10">添加标签</el-button>
+								</div>
+							</el-form-item>
+						</el-form>
+					</el-card>
+				</el-col>
+			</el-row>
+		</div>
+	</el-dialog>
+</template>
+
+<script setup lang="ts" name="businessCitizenTagsEdit">
+import { reactive, ref } from 'vue';
+import { formatDate } from '/@/utils/formatTime';
+import { citizenDetailByPhone, citizenLabelAdd, citizenLabelDelete } from '/@/api/business/citizen';
+import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
+import { throttle } from '/@/utils/tools';
+
+const emit = defineEmits(['updateList']);
+// 定义变量内容
+const dialogVisible = ref<Boolean>(false);
+const state = reactive<any>({
+	ruleForm: {
+		content: '', // 标签内容
+	},
+});
+const formData = reactive({
+	lastCallTime: '', // 上次联系时间
+	hotspotNames: [], // 关注诉求
+	order: {
+		allOrderNum: 0, // 全部工单
+		endOrderNum: 0, // 已办工单
+		handOrderNum: 0, // 在办工单
+		dissatisfactionNum: 0, // 不满意工单
+	},
+	callHistory: {
+		allCallNum: 0, // 来电次数
+		callBackNum: 0, // 回拨次数
+		connectNum: 0, // 接通次数
+	},
+	citizen: {
+		name: '', // 姓名
+		firstCallTime: '', // 首次联系时间
+		id: '', // 市民id
+	},
+	label: [], // 市民标签
+	phoneNumber: '', // 联系电话
+});
+const loading = ref(false);
+// 打开弹窗
+const openDialog = (row: any) => {
+	formData.phoneNumber = row.phoneNumber ?? '';
+	getDetail(formData.phoneNumber);
+	dialogVisible.value = true;
+};
+// 关闭弹窗
+const closeDialog = () => {
+	dialogVisible.value = false;
+};
+// 查询市民画像详情
+const getDetail = async (phone: string) => {
+	loading.value = true;
+	try {
+		const { result } = await citizenDetailByPhone(phone);
+		formData.lastCallTime = result.lastCallTime; // 上次联系时间
+		formData.hotspotNames = result.hotspotNames.split(','); // 关注诉求
+		formData.order = result.order; // 工单历史
+		formData.callHistory = result.callHistory; // 来电历史
+		formData.citizen = result.citizen; // 市民信息
+		formData.label = result.citizen?.labelDetails ?? []; // 市民标签
+		loading.value = false;
+	} catch (e) {
+		loading.value = false;
+		console.log(e, '错误信息');
+	}
+};
+// 添加标签
+const ruleFormRef = ref<RefType>();
+const addTag = throttle(async (formEl: FormInstance | undefined) => {
+	if (!formEl) return;
+	await formEl.validate((valid: boolean) => {
+		if (!valid) return;
+		loading.value = true;
+		citizenLabelAdd({
+			citizenId: formData.citizen.id,
+			label: state.ruleForm.content,
+		})
+			.then(() => {
+				ElMessage.success('操作成功');
+				state.ruleForm.content = '';
+				getDetail(formData.phoneNumber);
+				emit('updateList');
+			})
+			.finally(() => {
+				loading.value = false;
+			});
+	});
+}, 300);
+const closeTag = (item: any) => {
+	ElMessageBox.confirm(`您确定要删除【${item.label}】标签,是否继续?`, '提示', {
+		confirmButtonText: '确认',
+		cancelButtonText: '取消',
+		type: 'warning',
+		draggable: true,
+		cancelButtonClass: 'default-button',
+		autofocus: false,
+	})
+		.then(() => {
+			citizenLabelDelete({
+				id: item.id,
+			}).then(() => {
+				ElMessage.success('操作成功');
+				getDetail(formData.phoneNumber);
+				emit('updateList');
+			});
+		})
+		.catch(() => {});
+};
+// 暴露变量
+defineExpose({
+	openDialog,
+	closeDialog,
+});
+</script>
+<style scoped lang="scss">
+.order-accept-citizen-portrait {
+	.el-card {
+		background-color: var(--el-color-info-light-9);
+		.info-form {
+			.form-item {
+				display: flex;
+				align-items: center;
+				margin-bottom: 10px;
+				text-align: left;
+				.form-label {
+					width: 75px;
+					text-align: right;
+					margin-right: 3px;
+				}
+				&:last-child {
+					margin-bottom: 0;
+				}
+			}
+		}
+		.citizen-title {
+			font-size: 16px;
+			font-weight: bold;
+			text-align: center;
+		}
+		.citizen-img-box {
+			img {
+				width: 100%;
+			}
+		}
+		.tag-list {
+			margin-top: 20px;
+			.el-tag {
+				margin: 0 10px 10px 0;
+				&:last-child {
+					margin: 0 0 10px 0;
+				}
+			}
+		}
+	}
+}
+</style>

+ 102 - 0
src/views/business/citizen/components/Tags-record.vue

@@ -0,0 +1,102 @@
+<template>
+  <el-dialog v-model="state.dialogVisible" draggable title="查看标签记录" ref="dialogRef" width="60%" append-to-body>
+    <el-form :model="state.queryParams" ref="ruleFormRef" :inline="true" @submit.native.prevent>
+      <el-form-item label="市民标签" prop="Label">
+        <el-input v-model="state.queryParams.Label" placeholder="市民标签" clearable @keyup.enter="handleQuery" />
+      </el-form-item>
+      <el-form-item label="记录人" prop="CreatorName">
+        <el-input v-model="state.queryParams.CreatorName" placeholder="记录人名称" clearable @keyup.enter="handleQuery" />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
+        <el-button @click="resetQuery(ruleFormRef)" class="default-button"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
+      </el-form-item>
+    </el-form>
+    <el-table :data="state.tableData" max-height="500px">
+      <el-table-column prop="label" label="市民标签" show-overflow-tooltip>
+      </el-table-column>
+      <el-table-column prop="phone" label="市民" show-overflow-tooltip> </el-table-column>
+      <el-table-column prop="creatorName" label="记录人" show-overflow-tooltip> </el-table-column>
+      <el-table-column prop="creationTime" label="创建时间" show-overflow-tooltip width="170">
+        <template #default="{ row }">
+          <span>{{ formatDate(row.creationTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
+        </template>
+      </el-table-column>
+      <template #empty>
+        <Empty />
+      </template>
+    </el-table>
+    <pagination
+        :total="state.total"
+        v-model:page="state.queryParams.PageIndex"
+        v-model:limit="state.queryParams.PageSize"
+        @pagination="queryList"
+    />
+  </el-dialog>
+</template>
+
+<script setup lang="ts" name="businessCitizenTagsRecord">
+import {reactive, ref} from 'vue';
+import type { FormInstance } from 'element-plus';
+import {citizenLabelList} from "/@/api/business/citizen"
+import {formatDate} from "/@/utils/formatTime";
+// 定义变量内容
+const state = reactive<any>({
+  dialogVisible: false, // 弹窗显示隐藏
+  queryParams: {
+    PageIndex: 1, // 当前页
+    PageSize: 10, // 每页条数
+    Keyword: '',  // 关键字
+  },
+  tableData: [], // 表格数据
+  total: 0,   // 总条数
+  loading: false, // 加载状态
+  citizen:<EmptyObjectType>{},//市民信息
+});
+const ruleFormRef = ref<RefType>(); // 表单ref
+// 打开弹窗
+const openDialog = (row: any) => {
+  state.citizen = row;
+  queryList();
+  state.dialogVisible = true;
+};
+const dialogRef = ref<RefType>();
+// 关闭弹窗
+const closeDialog = () => {
+  state.dialogVisible = false;
+};
+/** 搜索按钮操作 */
+const handleQuery = () => {
+  state.queryParams.PageIndex = 1;
+  queryList();
+};
+/** 重置按钮操作 */
+const resetQuery = (formEl: FormInstance | undefined) => {
+  if (!formEl) return;
+  formEl.resetFields();
+  handleQuery();
+};
+/** 获取历史工单 */
+const queryList = () => {
+  state.loading = true;
+  let request = {
+    ...state.queryParams,
+    CitizenId: state.citizen.id
+  };
+  citizenLabelList(request)
+      .then((response: any) => {
+        state.tableData = response?.result.items ?? [];
+        state.total = response?.result.total;
+        state.loading = false;
+      })
+      .catch(() => {
+        state.loading = false;
+      });
+};
+// 暴露变量
+defineExpose({
+  openDialog,
+  closeDialog,
+});
+</script>
+

+ 21 - 26
src/views/business/citizen/index.vue

@@ -15,19 +15,16 @@
       </el-form>
     </el-card>
     <el-card shadow="never">
-      <div class="mb20">
-        <el-button type="primary" @click="onLexiconAdd" v-waves v-auth="'business:citizen:add'">
-          <SvgIcon name="ele-Plus" class="mr5" />新增
-        </el-button>
+<!--      <div class="mb20">
         <el-button type="primary" @click="onLexiconDelete" v-waves v-auth="'business:citizen:delete'" :disabled="!multipleSelection.length">
           <SvgIcon name="ele-Delete" class="mr5" />删除
         </el-button>
-      </div>
+      </div>-->
       <!-- 表格 -->
       <el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" />
-        <el-table-column prop="name" label="市民联系方式" show-overflow-tooltip width="200"></el-table-column>
-        <el-table-column prop="classify" label="市民标签" show-overflow-tooltip width="200"></el-table-column>
+        <el-table-column prop="phoneNumber" label="市民联系方式" show-overflow-tooltip width="200"></el-table-column>
+        <el-table-column prop="label" label="市民标签" show-overflow-tooltip width="400"></el-table-column>
         <el-table-column prop="creatorName" label="创建人" show-overflow-tooltip></el-table-column>
         <el-table-column prop="creationTime" label="创建时间" show-overflow-tooltip width="170">
           <template #default="{ row }">
@@ -40,10 +37,10 @@
             <span>{{ formatDate(row.lastModificationTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="操作" width="120" fixed="right" align="center">
+        <el-table-column label="操作" width="140" fixed="right" align="center">
           <template #default="{ row }">
-            <el-button link type="primary" @click="onLexiconEdit(row)" v-auth="'business:citizen:tag'" title="查看市民标签记录"> 标签记录 </el-button>
-            <el-button link type="primary" @click="onLexiconEdit(row)" v-auth="'business:citizen:edit'" title="编辑市民画像"> 编辑 </el-button>
+            <el-button link type="primary" @click="onTagsRecord(row)" v-auth="'business:citizen:tag'" title="查看市民标签记录"> 标签记录 </el-button>
+            <el-button link type="primary" @click="onTagsEdit(row)" v-auth="'business:citizen:edit'" title="编辑市民画像"> 编辑 </el-button>
           </template>
         </el-table-column>
         <template #empty>
@@ -58,10 +55,10 @@
           @pagination="queryList"
       />
     </el-card>
-    <!--  违禁词新增  -->
-    <lexicon-add ref="lexiconAddRef" @updateList="queryList" :prohibitedClassify="prohibitedClassify" :prohibitedType="prohibitedType"/>
-    <!--  违禁词编辑  -->
-    <lexicon-edit ref="lexiconEditRef" @updateList="queryList" :prohibitedClassify="prohibitedClassify" :prohibitedType="prohibitedType"/>
+    <!-- 标签记录   -->
+    <tags-record  ref="tagsRecordRef"/>
+    <!-- 编辑市民画像   -->
+    <tags-edit ref="TagsEditRef" @updateList="queryList" />
   </div>
 </template>
 
@@ -73,8 +70,8 @@ import {auth} from "/@/utils/authFunction";
 import {citizenList,citizenDelete} from "/@/api/business/citizen"
 
 // 引入组件
-const LexiconAdd = defineAsyncComponent(() => import('/@/views/quality/lexicon/components/Lexicon-add.vue')); // 违禁词新增
-const LexiconEdit = defineAsyncComponent(() => import('/@/views/quality/lexicon/components/Lexicon-edit.vue')); // 违禁词编辑
+const TagsRecord = defineAsyncComponent(() => import('/@/views/business/citizen/components/Tags-record.vue')); // 标签记录
+const TagsEdit = defineAsyncComponent(() => import('/@/views/business/citizen/components/Tags-edit.vue')); // 标签编辑
 
 // 定义变量内容
 const state = reactive<any>({
@@ -91,8 +88,6 @@ const state = reactive<any>({
   tableData: [], // 表格数据
 });
 const ruleFormRef = ref<RefType>(null); // 表单ref
-const prohibitedClassify = ref<EmptyArrayType>([]); // 违禁词分类
-const prohibitedType = ref<EmptyArrayType>([]); // 违禁词属性
 // 获取参数列表
 const queryList = () => {
   state.loading = true;
@@ -115,15 +110,15 @@ const resetQuery = (formEl: FormInstance | undefined) => {
   formEl.resetFields();
   queryList();
 };
-// 新增意见
-const lexiconAddRef = ref<RefType>(); // 意见新增
-const onLexiconAdd = () => {
-  lexiconAddRef.value.openDialog();
+// 标签记录
+const tagsRecordRef = ref<RefType>();
+const onTagsRecord = (row:any) => {
+  tagsRecordRef.value.openDialog(row);
 };
-// 修改意见
-const lexiconEditRef = ref<RefType>(); // 修改意见
-const onLexiconEdit = (row: any) => {
-  lexiconEditRef.value.openDialog(row);
+// 编辑标签
+const TagsEditRef = ref<RefType>();
+const onTagsEdit = (row: any) => {
+  TagsEditRef.value.openDialog(row);
 };
 // 表格多选
 const multipleTableRef = ref<RefType>();

+ 152 - 61
src/views/business/order/accept/Citizen-portrait.vue

@@ -1,25 +1,25 @@
 <template>
-	<div class="order-accept-citizen-portrait">
+	<div class="order-accept-citizen-portrait" v-loading="loading">
 		<el-row :gutter="20">
 			<el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
 				<el-card shadow="never">
 					<p class="border-title mb10">基本信息</p>
 					<div class="info-form">
 						<p class="form-item">
-							<span class="form-label">来电电话</span>
-							{{ formData.phoneNo }}
+							<span class="form-label">联系电话:</span>
+							{{ state.orderInfo.contact }}
 						</p>
 						<p class="form-item">
-							<span class="form-label">姓名</span>
-							{{ formData.phoneNo }}
+							<span class="form-label">姓名:</span>
+							{{ state.citizen.name }}
 						</p>
 						<p class="form-item">
-							<span class="form-label">首次来电</span>
-							{{ formData.phoneNo }}
+							<span class="form-label">首次联系:</span>
+							{{ formatDate(state.citizen.firstCallTime, 'YYYY-mm-dd HH:MM:SS') }}
 						</p>
 						<p class="form-item">
-							<span class="form-label">上次来电</span>
-							{{ formData.phoneNo }}
+							<span class="form-label">上次联系:</span>
+							{{  formatDate(state.lastCallTime, 'YYYY-mm-dd HH:MM:SS') }}
 						</p>
 					</div>
 				</el-card>
@@ -27,20 +27,20 @@
 					<p class="border-title mb10">工单历史</p>
 					<div class="info-form">
 						<p class="form-item">
-							<span class="form-label">全部工单</span>
-							{{ formData.phoneNo }}
+							<span class="form-label">全部工单:</span>
+							{{ state.order.allOrderNum }}
 						</p>
 						<p class="form-item">
-							<span class="form-label">已办工单</span>
-							{{ formData.phoneNo }}
+							<span class="form-label">已办工单:</span>
+							{{ state.order.endOrderNum }}
 						</p>
 						<p class="form-item">
-							<span class="form-label">在办工单</span>
-							{{ formData.phoneNo }}
+							<span class="form-label">在办工单:</span>
+							{{ state.order.handOrderNum }}
 						</p>
 						<p class="form-item">
-							<span class="form-label">不满意工单</span>
-							{{ formData.phoneNo }}
+							<span class="form-label">不满意工单:</span>
+							{{ state.order.dissatisfactionNum }}
 						</p>
 					</div>
 				</el-card>
@@ -55,26 +55,26 @@
 			</el-col>
 			<el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
 				<el-card shadow="never">
-					<p class="border-title mb10">来电历史</p>
+					<p class="border-title mb10">来电历史:</p>
 					<div class="info-form">
 						<p class="form-item">
-							<span class="form-label">来电次数</span>
-							{{ formData.phoneNo }}
+							<span class="form-label">来电次数:</span>
+							{{ state.callHistory.allCallNum }}
 						</p>
 						<p class="form-item">
-							<span class="form-label">接通次数</span>
-							{{ formData.phoneNo }}
+							<span class="form-label">接通次数:</span>
+							{{ state.callHistory.connectNum }}
 						</p>
 						<p class="form-item">
-							<span class="form-label">回拨次数</span>
-							{{ formData.phoneNo }}
+							<span class="form-label">回拨次数:</span>
+							{{ state.callHistory.callBackNum }}
 						</p>
 					</div>
 				</el-card>
 				<el-card shadow="never" class="mt20">
 					<p class="border-title mb10">关注诉求</p>
 					<div class="tag-list">
-						<el-tag v-for="tag in formData.tags" effect="dark" :key="tag">{{ tag }}</el-tag>
+						<el-tag v-for="tag in state.hotspotNames" effect="dark" :key="tag">{{ tag }}</el-tag>
 					</div>
 				</el-card>
 			</el-col>
@@ -82,54 +82,145 @@
 				<el-card shadow="never">
 					<p class="border-title mb10">市民标签</p>
 					<div class="tag-list">
-						<el-tag v-for="tag in formData.tags" effect="dark" :key="tag">{{ tag }}</el-tag>
-					</div>
-					<div class="flex-center-align mt20">
-						<el-input v-model="input" placeholder="请输入标签内容" clearable show-word-limit maxlength="20" @keyup.enter="addTag" />
-						<el-button type="primary" @click="addTag" class="ml10">添加标签</el-button>
+						<el-tag v-for="tag in state.label" :closable="closable" effect="dark" @close="closeTag(tag)" :key="tag">{{ tag.label }}</el-tag>
 					</div>
+          <el-form :model="state.ruleForm" label-width="0" ref="ruleFormRef" @submit.native.prevent v-if="state.citizen.id">
+            <el-form-item label="" prop="content" :rules="[{ required: true, message: '请输入标签内容', trigger: 'blur' }]">
+              <div class="flex-center-align mt10 w100">
+                <el-input
+                    v-model="state.ruleForm.content"
+                    placeholder="请输入标签内容"
+                    clearable
+                    show-word-limit
+                    maxlength="10"
+                    @keyup.enter="addTag(ruleFormRef)"
+                />
+                <el-button type="primary" @click="addTag(ruleFormRef)" class="ml10">添加标签</el-button>
+              </div>
+            </el-form-item>
+          </el-form>
 				</el-card>
 			</el-col>
 		</el-row>
 	</div>
 </template>
 <script setup lang="ts" name="orderAcceptCitizenPortrait">
-import {onMounted, reactive, ref, watch} from 'vue';
-import { ElMessage } from 'element-plus';
-import { citizenDetailByPhone } from '/@/api/business/citizen';
+import { computed, reactive, ref } from 'vue';
+import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
+import { citizenDetailByPhone, citizenAdd,citizenLabelAdd,citizenLabelDelete } from '/@/api/business/citizen';
+import { formatDate } from '/@/utils/formatTime';
+import {throttle} from "echarts";
 
-const props = defineProps({
-  contact:{
-    type: String,
-    default: () => ''
-  }
-})
-watch(()=>props.contact,(newVal,oldVal)=>{
-  console.log(newVal,oldVal);
-  getDetail(newVal);
-})
+const state = reactive<any>({
+  lastCallTime:'', // 上次联系时间
+  hotspotNames: [], // 关注诉求
+  order: {
+    allOrderNum: 0, // 全部工单
+    endOrderNum: 0, // 已办工单
+    handOrderNum: 0, // 在办工单
+    dissatisfactionNum:0, // 不满意工单
+  },
+  callHistory: {
+    allCallNum: 0, // 来电次数
+    callBackNum: 0, // 回拨次数
+    connectNum: 0, // 接通次数
+  },
+  citizen: {
+    name: '', // 姓名
+    firstCallTime: '', // 首次联系时间
+    id:'', // 市民id
+  },
+  label:[], // 市民标签
+  orderInfo:<EmptyObjectType>{},// 工单信息
+  ruleForm: {
+    content: '', // 标签内容
+  },
+});
 
-const formData = reactive({
-	phoneNo: '12345678901',
-	tags: ['城市管理', '工地噪音', '市政供电', '网络游戏违法信息', '市政供电/临时电'],
+// 暂定智能删除自己创建的标签 但是系统管理员可以删除所有标签
+const closable = computed(() => {
+	return true;
 });
-const input = ref('');
-const addTag = () => {
-	if (!input.value) {
-		ElMessage.warning('请输入标签内容');
-		return;
-	}
-	if (input.value) {
-		formData.tags.push(input.value);
-		input.value = '';
+// 查询市民画像方法
+const getCitizen = (value:any)=>{
+  state.orderInfo = value;
+  getDetail(value.contact);
+}
+const loading = ref(false);
+// 查询市民画像详情
+const getDetail = async (phone: string) => {
+	loading.value = true;
+	try {
+		const { result } = await citizenDetailByPhone(phone);
+		if (result.citizen) { // 有市民信息
+      state.lastCallTime = result.lastCallTime; // 上次联系时间
+			state.hotspotNames = result.hotspotNames.split(',');// 关注诉求
+			state.order = result.order;// 工单历史
+			state.callHistory = result.callHistory;// 来电历史
+			state.citizen = result.citizen;// 市民信息
+      state.label =   result.citizen?.labelDetails ?? [];// 市民标签
+		} else { // 没有市民信息 添加市民信息 重新获取详情
+			await citizenAdd({
+				phoneNumber: phone,
+				name: state.orderInfo.fromName,
+				gender: state.orderInfo.fromGender,
+				identityType: state.orderInfo.identityType,
+				licenceType: state.orderInfo.licenceType,
+				licenceNo: state.orderInfo.licenceNo,
+				ageRange: state.orderInfo.ageRange,
+				contact: state.orderInfo.contact,
+			});
+			await getDetail(phone);
+		}
+		loading.value = false;
+	} catch (e) {
+		loading.value = false;
+    console.log(e,'错误信息')
 	}
 };
-// 查询市民画像详情
-const getDetail = (phone:string) => {
-  citizenDetailByPhone(phone).then((res) => {
-    console.log(res);
+// 添加标签
+const ruleFormRef = ref<RefType>();
+const addTag = throttle(async (formEl: FormInstance | undefined) => {
+  if (!formEl) return;
+  await formEl.validate((valid: boolean) => {
+    if (!valid) return;
+    loading.value = true;
+    citizenLabelAdd({
+      citizenId: state.citizen.id,
+      label: state.ruleForm.content,
+    })
+        .then(() => {
+          ElMessage.success('操作成功');
+          state.ruleForm.content = '';
+          getDetail(state.orderInfo.contact);
+        })
+        .finally(() => {
+          loading.value = false;
+        });
   });
+}, 300);
+const closeTag = (item:any) => {
+  ElMessageBox.confirm(`您确定要删除【${item.label}】标签,是否继续?`, '提示', {
+		confirmButtonText: '确认',
+		cancelButtonText: '取消',
+		type: 'warning',
+		draggable: true,
+		cancelButtonClass: 'default-button',
+		autofocus: false,
+	})
+		.then(() => {
+      citizenLabelDelete({
+        id: item.id
+      }).then(()=>{
+        ElMessage.success('操作成功');
+        getDetail(state.orderInfo.contact);
+      })
+		})
+		.catch(() => {});
 };
+defineExpose({
+  getCitizen
+})
 </script>
 
 <style scoped lang="scss">
@@ -143,9 +234,9 @@ const getDetail = (phone:string) => {
 				margin-bottom: 10px;
 				text-align: left;
 				.form-label {
-					width: 70px;
+					width: 75px;
 					text-align: right;
-					margin-right: 10px;
+          margin-right: 3px;
 				}
 				&:last-child {
 					margin-bottom: 0;

+ 156 - 165
src/views/business/order/accept/Repeat-event.vue

@@ -1,118 +1,116 @@
 >
 
 <template>
-  <div>
-    <el-form :model="state.queryParams" ref="queryParamsRef" :inline="true" @submit.native.prevent>
-      <el-form-item label="关键词" prop="Keyword">
-        <el-input v-model="state.queryParams.Keyword" placeholder="事件标题/关键词" clearable @keyup.enter="handleQuery" />
-      </el-form-item>
-      <el-form-item label="创建时间" prop="exTime">
-        <el-date-picker
-            v-model="state.queryParams.exTime"
-            type="datetimerange"
-            unlink-panels
-            range-separator="至"
-            start-placeholder="开始时间"
-            end-placeholder="结束时间"
-            :shortcuts="shortcuts"
-            @change="timeStartChangeCr"
-            value-format="YYYY-MM-DD[T]HH:mm:ss"
-        />
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" @click="handleQuery" :loading="state.loading">
-          <SvgIcon name="ele-Search" class="mr5" />查询
-        </el-button>
-        <el-button @click="resetQuery(queryParamsRef)" :loading="state.loading" class="default-button">
-          <SvgIcon name="ele-Refresh" class="mr5" />重置
-        </el-button>
-      </el-form-item>
-    </el-form>
-    <div class="mb10">
-      <el-button type="primary" @click="onAdd" v-auth="'business:order:repeatEvent:add'"> <SvgIcon name="ele-Plus" class="mr5" />创建重复事件 </el-button>
-    </div>
-    <el-table
-        :data="state.tableData"
-        v-loading="state.loading"
-        max-height="300"
-    >
-      <el-table-column prop="phoneNo" label="标题" show-overflow-tooltip width="180">
-        <template #default="{ row }">
-          {{ row.title }}
-        </template>
-      </el-table-column>
-      <el-table-column prop="hotspotName" label="关键词" show-overflow-tooltip> </el-table-column>
-      <el-table-column prop="no" label="创建时间" show-overflow-tooltip width="170">
-        <template #default="{ row }">
+	<div>
+		<el-form :model="state.queryParams" ref="queryParamsRef" :inline="true" @submit.native.prevent>
+			<el-form-item label="关键词" prop="Keyword">
+				<el-input v-model="state.queryParams.Keyword" placeholder="事件标题/关键词" clearable @keyup.enter="handleQuery" />
+			</el-form-item>
+			<el-form-item label="创建时间" prop="exTime">
+				<el-date-picker
+					v-model="state.queryParams.exTime"
+					type="datetimerange"
+					unlink-panels
+					range-separator="至"
+					start-placeholder="开始时间"
+					end-placeholder="结束时间"
+					:shortcuts="shortcuts"
+					@change="timeStartChangeCr"
+					value-format="YYYY-MM-DD[T]HH:mm:ss"
+				/>
+			</el-form-item>
+			<el-form-item>
+				<el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
+				<el-button @click="resetQuery(queryParamsRef)" :loading="state.loading" class="default-button">
+					<SvgIcon name="ele-Refresh" class="mr5" />重置
+				</el-button>
+			</el-form-item>
+		</el-form>
+		<div class="mb10">
+			<el-button type="primary" @click="onAdd" v-auth="'business:order:repeatEvent:add'">
+				<SvgIcon name="ele-Plus" class="mr5" />创建重复事件
+			</el-button>
+		</div>
+		<el-table :data="state.tableData" v-loading="state.loading" max-height="300">
+			<el-table-column prop="phoneNo" label="标题" show-overflow-tooltip width="180">
+				<template #default="{ row }">
+					{{ row.title }}
+				</template>
+			</el-table-column>
+			<el-table-column prop="hotspotName" label="关键词" show-overflow-tooltip> </el-table-column>
+			<el-table-column prop="no" label="创建时间" show-overflow-tooltip width="170">
+				<template #default="{ row }"> </template>
+			</el-table-column>
+			<el-table-column prop="currentStepName" label="创建人" show-overflow-tooltip></el-table-column>
+			<el-table-column prop="statusText" label="事件工单数" width="100" fixed="right" align="center"></el-table-column>
+		</el-table>
 
-        </template>
-      </el-table-column>
-      <el-table-column prop="currentStepName" label="创建人" show-overflow-tooltip></el-table-column>
-      <el-table-column prop="statusText" label="事件工单数" width="100" fixed="right" align="center"></el-table-column>
-    </el-table>
-
-    <el-dialog v-model="state.dialogVisible" width="500px" draggable title="新增重复性事件" @close="close">
-      <el-form :model="state.ruleForm" label-width="80px" ref="ruleFormRef">
-        <el-row :gutter="10">
-          <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-            <el-form-item label="标题" prop="title" :rules="[{ required: true, message: '请输入标题', trigger: 'blur' }]">
-              <el-input v-model="state.ruleForm.title" placeholder="请输入标题" clearable show-word-limit maxlength="200"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-            <el-form-item label="关键词" prop="synonym" :rules="[{ required: false, message: '请输入关键词', trigger: 'change' }]">
-              <el-tag v-for="tag in dynamicTags" :key="tag" class="mr10 mb10"  size="large" closable :disable-transitions="false" @close="handleClose(tag)">
-                {{ tag }}
-              </el-tag>
-              <el-input
-                  v-if="inputVisible"
-                  ref="InputRef"
-                  v-model="inputValue"
-                  @keyup.enter="handleInputConfirm"
-                  @blur="handleInputConfirm"
-                  style="max-width: 200px"
-                  class="mb10"
-              />
-              <el-button v-else @click="showInput" class="mb10"> 添加关键词 </el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-      <template #footer>
+		<el-dialog v-model="state.dialogVisible" width="500px" draggable title="新增重复性事件" @close="close">
+			<el-form :model="state.ruleForm" label-width="80px" ref="ruleFormRef">
+				<el-row :gutter="10">
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+						<el-form-item label="标题" prop="title" :rules="[{ required: true, message: '请输入标题', trigger: 'blur' }]">
+							<el-input v-model="state.ruleForm.title" placeholder="请输入标题" clearable show-word-limit maxlength="200"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+						<el-form-item label="关键词" prop="synonym" :rules="[{ required: false, message: '请输入关键词', trigger: 'change' }]">
+							<el-tag
+								v-for="tag in dynamicTags"
+								:key="tag"
+								class="mr10 mb10"
+								size="large"
+								closable
+								:disable-transitions="false"
+								@close="handleClose(tag)"
+							>
+								{{ tag }}
+							</el-tag>
+							<el-input
+								v-if="inputVisible"
+								ref="InputRef"
+								v-model="inputValue"
+								@keyup.enter="handleInputConfirm"
+								@blur="handleInputConfirm"
+								style="max-width: 200px"
+								class="mb10"
+							/>
+							<el-button v-else @click="showInput" class="mb10"> 添加关键词 </el-button>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+			<template #footer>
 				<span class="dialog-footer">
 					<el-button @click="state.dialogVisible = false" class="default-button">取 消</el-button>
 					<el-button type="primary" @click="onSubmit(ruleFormRef)" :loading="state.loading">确 定</el-button>
 				</span>
-      </template>
-    </el-dialog>
-
-  </div>
+			</template>
+		</el-dialog>
+	</div>
 </template>
 <script setup lang="ts" name="orderAcceptRepeatEvent">
-import {nextTick, reactive, ref} from "vue";
-import {ElButton, ElInput, ElMessage, FormInstance} from "element-plus";
-import {shortcuts} from "/@/utils/constants";
-import {throttle} from "/@/utils/tools";
-import {auth} from "/@/utils/authFunction";
-import {addCommon} from "/@/api/system/commonAdvice";
+import { nextTick, reactive, ref } from 'vue';
+import { ElButton, ElInput, ElMessage, FormInstance } from 'element-plus';
+import { shortcuts } from '/@/utils/constants';
+import { throttle } from '/@/utils/tools';
+import { addCommon } from '/@/api/auxiliary/advice';
 const state = reactive<any>({
-  queryParams: {
-    // 查询条件
-    PageIndex: 1,
-    PageSize: 10,
-    Keyword: '', // 关键字
-    CreationTimeStart: '', // 创建时间 开始
-    CreationTimeEnd: '', // 创建时间 结束
-    exTime: [], // 办理期限
-  },
-  tableData: [], //表格
-  loading: false, // 加载
-  total: 0, // 总数
-  dialogVisible: false, // 弹窗
-  ruleForm:{
-
-  }
-})
+	queryParams: {
+		// 查询条件
+		PageIndex: 1,
+		PageSize: 10,
+		Keyword: '', // 关键字
+		CreationTimeStart: '', // 创建时间 开始
+		CreationTimeEnd: '', // 创建时间 结束
+		exTime: [], // 办理期限
+	},
+	tableData: [], //表格
+	loading: false, // 加载
+	total: 0, // 总数
+	dialogVisible: false, // 弹窗
+	ruleForm: {},
+});
 
 const inputValue = ref('');
 const dynamicTags = ref<EmptyArrayType>([]);
@@ -120,89 +118,82 @@ const inputVisible = ref(false);
 const InputRef = ref<InstanceType<typeof ElInput>>();
 // 删除同义词
 const handleClose = (tag: string) => {
-  dynamicTags.value.splice(dynamicTags.value.indexOf(tag), 1);
+	dynamicTags.value.splice(dynamicTags.value.indexOf(tag), 1);
 };
 // 展示输入框
 const showInput = () => {
-  inputVisible.value = true;
-  nextTick(() => {
-    InputRef.value!.input!.focus();
-  });
+	inputVisible.value = true;
+	nextTick(() => {
+		InputRef.value!.input!.focus();
+	});
 };
 // 确定添加
 const handleInputConfirm = () => {
-  if (inputValue.value) {
-    dynamicTags.value.push(inputValue.value);
-  }
-  inputVisible.value = false;
-  inputValue.value = '';
+	if (inputValue.value) {
+		dynamicTags.value.push(inputValue.value);
+	}
+	inputVisible.value = false;
+	inputValue.value = '';
 };
 
-
 const queryParamsRef = ref<RefType>(); // 查询参数
 const handleTimeChange = (val: string[], startKey: string, endKey: string) => {
-  if (val) {
-    state.queryParams[startKey] = val[0];
-    state.queryParams[endKey] = val[1];
-  } else {
-    state.queryParams[startKey] = '';
-    state.queryParams[endKey] = '';
-  }
+	if (val) {
+		state.queryParams[startKey] = val[0];
+		state.queryParams[endKey] = val[1];
+	} else {
+		state.queryParams[startKey] = '';
+		state.queryParams[endKey] = '';
+	}
 };
 // 时间
 const timeStartChangeCr = (val: string[]) => {
-  handleTimeChange(val, 'CreationTimeStart', 'CreationTimeEnd');
+	handleTimeChange(val, 'CreationTimeStart', 'CreationTimeEnd');
 };
 /** 搜索按钮操作 */
 const handleQuery = throttle(() => {
-  state.queryParams.PageIndex = 1;
-  queryList();
+	state.queryParams.PageIndex = 1;
+	queryList();
 }, 500);
 /** 重置按钮操作 */
 const resetQuery = throttle((formEl: FormInstance | undefined) => {
-  if (!formEl) return;
-  formEl.resetFields();
-  handleQuery();
+	if (!formEl) return;
+	formEl.resetFields();
+	handleQuery();
 }, 300);
-const queryList = ()=>{
-
-}
+const queryList = () => {};
 // 创建重复事件
-const onAdd = ()=>{
-  state.dialogVisible = true;
-}
+const onAdd = () => {
+	state.dialogVisible = true;
+};
 const ruleFormRef = ref<RefType>();
-const close = ()=>{
-  ruleFormRef.value.clearValidate();
-  ruleFormRef.value.resetFields();
-}
+const close = () => {
+	ruleFormRef.value.clearValidate();
+	ruleFormRef.value.resetFields();
+};
 const onSubmit = throttle(async (formEl: FormInstance | undefined) => {
-  if (!formEl) return;
-  await formEl.validate((valid: boolean) => {
-    if (!valid) return;
-    state.loading = true;
-    const request = {
-      ...state.ruleForm,
-      synonym: dynamicTags.value.join(','),
-    };
-    addCommon(request)
-        .then(() => {
-          ElMessage({
-            message: '操作成功',
-            type: 'success',
-          });
-          state.dialogVisible = false;
-        })
-        .catch((error) => {
-
-        })
-        .finally(() => {
-          state.loading = false;
-          state.dialogVisible = false;
-        });
-  });
+	if (!formEl) return;
+	await formEl.validate((valid: boolean) => {
+		if (!valid) return;
+		state.loading = true;
+		const request = {
+			...state.ruleForm,
+			synonym: dynamicTags.value.join(','),
+		};
+		addCommon(request)
+			.then(() => {
+				ElMessage({
+					message: '操作成功',
+					type: 'success',
+				});
+				state.dialogVisible = false;
+			})
+			.catch((error) => {})
+			.finally(() => {
+				state.loading = false;
+				state.dialogVisible = false;
+			});
+	});
 }, 300);
 </script>
-<style scoped lang="scss">
-
-</style>
+<style scoped lang="scss"></style>

+ 6 - 3
src/views/business/order/accept/index.vue

@@ -479,7 +479,7 @@
                 <voice-assistant />
               </el-tab-pane>
 							<el-tab-pane label="市民画像" name="draw">
-                <citizen-portrait :contact="state.ruleForm.contact"/>
+                <citizen-portrait :orderInfo="state.ruleForm" ref="citizenPortraitRef"/>
               </el-tab-pane>
 						</el-tabs>
 					</el-card>
@@ -512,7 +512,7 @@ import { throttle } from '/@/utils/tools';
 import { commonEnum } from '/@/utils/constants';
 import { orderBaseDataAdd, orderAdd, hotSpotType, orderEdit, orderDetail, orderBaseExt } from '/@/api/business/order';
 import { useUserInfo } from '/@/stores/userInfo';
-import { treeArea } from '/@/api/system/area';
+import { treeArea } from '/@/api/auxiliary/area';
 import mittBus from '/@/utils/mitt';
 
 // 引入组件
@@ -858,9 +858,12 @@ const handleSelectionChange = (row: any) => {
   }
 };
 const historyRef = ref<RefType>();// 历史工单组件
+const citizenPortraitRef = ref<RefType>();// 市民画像组件
+// 查询历史工单 和市民画像
 const searchHistory = (val?:any)=>{
   historyRef.value.searchHistory(val);
   rightActive.value = 'history';
+  citizenPortraitRef.value.getCitizen(state.ruleForm);
 }
 const rightActive = ref<string>('knowledge'); // 右侧顶部Tab
 const handleRight = (val: string) => {};
@@ -957,7 +960,6 @@ onBeforeMount(async () => {
 			} else {
 				state.ruleForm.isRepeat = 'false';
 			}
-      console.log(state.ruleForm.hotspotExternal)
 			if (state.ruleForm.hotspotExternal) {
 				//热点分类默认展开
 				state.hotspotExternal = state.ruleForm.hotspotExternal.split(',');
@@ -983,6 +985,7 @@ onBeforeMount(async () => {
 				dicDataName: state.ruleForm.pushType,
 			};
       knowledgeActiveRef.value.knowledgeRetrievalPaged(state.ruleForm.hotspotName);
+      searchHistory(state.ruleForm.contact);
 			state.formLoading = false;
 		}
 	} catch (error) {

+ 0 - 1
src/views/business/order/components/Order-history.vue

@@ -57,7 +57,6 @@ import {defineAsyncComponent, reactive, ref} from 'vue';
 import type { FormInstance } from 'element-plus';
 import { historyOrder } from '/@/api/business/order';
 import { useRoute } from 'vue-router';
-// import { ElMessage } from 'element-plus';
 // 引入组件
 const OrderSupply = defineAsyncComponent(() => import('/@/views/business/order/components/Order-supply.vue'));  // 补充组件
 const OrderRevoke = defineAsyncComponent(() => import('/@/views/business/order/components/Order-revoke.vue'));  // 撤销组件

+ 1 - 1
src/views/system/businessTag/component/Business-tag-add.vue

@@ -48,7 +48,7 @@
 import { reactive, ref } from 'vue';
 import { ElMessage, FormInstance } from 'element-plus';
 import { throttle } from '/@/utils/tools';
-import { businessTagAdd,businessTagList } from '/@/api/system/businessTag';
+import { businessTagAdd,businessTagList } from '/@/api/auxiliary/businessTag';
 
 const props = defineProps({
   businessTagType: {

+ 1 - 1
src/views/system/businessTag/component/Business-tag-binding.vue

@@ -20,7 +20,7 @@
 import { reactive, ref } from 'vue';
 import { ElMessage, FormInstance } from 'element-plus';
 import { throttle } from '/@/utils/tools';
-import { businessTagBinding,businessTagList } from '/@/api/system/businessTag';
+import { businessTagBinding,businessTagList } from '/@/api/auxiliary/businessTag';
 
 
 // 定义子组件向父组件传值/事件

+ 1 - 1
src/views/system/businessTag/component/Business-tag-edit.vue

@@ -48,7 +48,7 @@
 import { computed, reactive, ref } from 'vue';
 import { ElMessage, FormInstance } from 'element-plus';
 import { throttle } from '/@/utils/tools';
-import {businessTagUpdate, businessTagDetail, businessTagList} from '/@/api/system/businessTag';
+import {businessTagUpdate, businessTagDetail, businessTagList} from '/@/api/auxiliary/businessTag';
 
 const props = defineProps({
   businessTagType: {

+ 1 - 1
src/views/system/businessTag/index.vue

@@ -79,7 +79,7 @@ import { reactive, ref, onMounted, defineAsyncComponent } from 'vue';
 import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
 import { formatDate } from '/@/utils/formatTime';
 import {auth} from "/@/utils/authFunction";
-import { businessTagList,businessTagBaseData,businessTagDelete } from '/@/api/system/businessTag';
+import { businessTagList,businessTagBaseData,businessTagDelete } from '/@/api/auxiliary/businessTag';
 // 引入组件
 const BusinessTagBindingCom = defineAsyncComponent(() => import('/@/views/system/businessTag/component/Business-tag-binding.vue')); // 绑定标签
 const BusinessTagAdd = defineAsyncComponent(() => import('/@/views/system/businessTag/component/Business-tag-add.vue')); // 参数标签