瀏覽代碼

reactor:权限调整;

zhangchong 1 年之前
父節點
當前提交
5cfd2561a4

+ 1 - 1
src/api/public/upload.ts

@@ -10,7 +10,7 @@ import request from '/@/utils/request';
 export const uploadFile = (data: object) => {
     return request({
         baseURL:import.meta.env.VITE_API_UPLOAD_URL, // 请求地址  可以在不同url中修改
-        url: `/file/upload`,
+        url: `/file/upload?source=hotline`,
         method: 'post',
         headers: {
             'Content-Type':'multipart/form-data'

+ 3 - 5
src/components/Editor/index.vue

@@ -64,7 +64,6 @@ const toolConfig = ref({
 		'group-video',
 	],
 });
-console.log(state.editorConfig.excludeKeys);
 type InsertFnType = (url: string, alt: string, href: string) => void;
 // 图片上传
 state.editorConfig.MENU_CONF['uploadImage'] = {
@@ -72,7 +71,9 @@ state.editorConfig.MENU_CONF['uploadImage'] = {
 	async customUpload(file: File, insertFn: InsertFnType) {
 		// TS 语法
 		console.log(file, insertFn);
-		uploadFile({ fileData: file, source: '富文本上传' }).then((res) => {
+    const formData = new FormData();
+    formData.append('fileData', file);
+		uploadFile(formData).then((res) => {
 			// insertFn(res.data.url,'','')
 		});
 		// file 即选中的文件
@@ -208,9 +209,6 @@ function withEmptyHtml<T extends IDomEditor>(editor: T): T {
 }
 // 注册插件
 Boot.registerPlugin(withEmptyHtml);
-onMounted(() => {
-	console.log(Toolbar, '21');
-});
 // 暴露变量
 defineExpose({
 	editorRef,

+ 3 - 3
src/router/index.ts

@@ -6,7 +6,7 @@ import { storeToRefs } from 'pinia';
 import { useKeepALiveNames } from '/@/stores/keepAliveNames';
 import { useRoutesList } from '/@/stores/routesList';
 import { useThemeConfig } from '/@/stores/themeConfig';
-import {Cookie, Local, Session} from '/@/utils/storage';
+import { Cookie, Local, Session } from '/@/utils/storage';
 import { staticRoutes, notFoundAndNoPower } from '/@/router/route';
 import { initFrontEndControlRoutes } from '/@/router/frontEnd';
 import { initBackEndControlRoutes } from '/@/router/backEnd';
@@ -90,7 +90,7 @@ export function formatTwoStageRoutes(arr: any) {
 	return newArr;
 }
 
-const whiteList = ['/login', '/forgetPwd']//称为白名单,意思就是不需要有token,就可以访问到的路径
+const whiteList = ['/login', '/forgetPwd']; //称为白名单,意思就是不需要有token,就可以访问到的路径
 // 路由加载前
 router.beforeEach(async (to, from, next) => {
 	NProgress.configure({ showSpinner: false });
@@ -100,7 +100,7 @@ router.beforeEach(async (to, from, next) => {
 		// 如果有token
 		if (to.path === '/login') {
 			// 如果有token,且要去登录,强制跳转到首页
-			next('/home')
+			next('/home');
 			NProgress.done();
 		} else {
 			const storesRoutesList = useRoutesList(pinia);

+ 1 - 1
src/router/route.ts

@@ -80,7 +80,7 @@ export const notFoundAndNoPower = [
 		},
 	},
 	{
-		path: '/:catchAll(.*)',
+		path:  "/:pathMatch(.*)",
 		name: 'notFound',
 		component: () => import('/@/views/error/404.vue'),
 		meta: {

+ 1 - 1
src/views/business/order/index.vue

@@ -150,7 +150,7 @@
 		<el-card shadow="never">
 			<!-- 功能按钮 -->
 			<div class="mb20">
-				<el-button type="primary" @click="onCreateRepeatEvent" v-auth="'business:repeatEvent:add'">
+				<el-button type="primary" @click="onCreateRepeatEvent">
 					<SvgIcon name="ele-Plus" class="mr5" /> 创建重复性事件
 				</el-button>
 				<el-button type="primary" @click="onExport" v-auth="'business:order:export'" :disabled="!multipleSelection.length">

+ 9 - 11
src/views/business/repeatEvent/index.vue

@@ -32,9 +32,7 @@
 				</el-table-column>
 				<el-table-column label="操作" width="140" fixed="right" align="center">
 					<template #default="{ row }">
-						<el-button link type="primary" @click="onEventDetail(row)" v-auth="'business:repeatEvent:detail'" title="查看重复性详情">
-							事件详情
-						</el-button>
+						<el-button link type="primary" @click="onEventDetail(row)" title="查看重复性详情"> 事件详情 </el-button>
 						<el-button link type="primary" @click="onEventEdit(row)" v-auth="'business:repeatEvent:edit'" title="编辑重复性事件"> 编辑 </el-button>
 					</template>
 				</el-table-column>
@@ -58,11 +56,11 @@
 </template>
 
 <script lang="ts" setup name="businessRepeatEvent">
-import {defineAsyncComponent, onMounted, reactive, ref} from 'vue';
-import {ElMessage, FormInstance} from 'element-plus';
-import {formatDate} from '/@/utils/formatTime';
-import {auth} from '/@/utils/authFunction';
-import {repeatEventList} from '/@/api/business/repeatEvent';
+import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
+import { ElMessage, FormInstance } from 'element-plus';
+import { formatDate } from '/@/utils/formatTime';
+import { auth } from '/@/utils/authFunction';
+import { repeatEventList } from '/@/api/business/repeatEvent';
 
 // 引入组件
 const RepeatEventDetail = defineAsyncComponent(() => import('/@/views/business/repeatEvent/components/Repeat-event-detail.vue')); // 重复性事件详情
@@ -107,15 +105,15 @@ const resetQuery = (formEl: FormInstance | undefined) => {
 // 重复性事件详情
 const repeatEventDetailRef = ref<RefType>();
 const onEventDetail = (row: any) => {
-  repeatEventDetailRef.value.openDialog(row);
+	repeatEventDetailRef.value.openDialog(row);
 };
 // 编辑重复性事件
 const repeatEventEditRef = ref<RefType>();
 const onEventEdit = (row: any) => {
-  repeatEventEditRef.value.openDialog(row);
+	repeatEventEditRef.value.openDialog(row);
 };
 // 页面加载时
 onMounted(() => {
 	queryList();
 });
-</script>
+</script>

+ 1 - 1
src/views/business/secondVisit/index.vue

@@ -99,7 +99,7 @@
 				</el-table-column>
 				<el-table-column label="操作" width="170" fixed="right" align="center">
 					<template #default="{ row }">
-						<el-button link type="primary" @click="onSecondVisit(row)" title="二次回访"> 二次回访 </el-button>
+						<el-button link type="primary" @click="onSecondVisit(row)" title="二次回访" v-auth="'business:secondVisit:apply'"> 二次回访 </el-button>
             <order-detail :order="row.order"/>
 					</template>
 				</el-table-column>

+ 55 - 45
src/views/business/secondVisitAudit/index.vue

@@ -9,13 +9,13 @@
 							<el-input v-model="state.queryParams.Keyword" placeholder="工单编码/标题" clearable @keyup.enter="queryList" />
 						</el-form-item>
 					</el-col>
-          <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="8">
-            <el-form-item label="审批状态" prop="VisitApplyState">
-              <el-select v-model="state.queryParams.VisitApplyState" placeholder="请选择审批状态" clearable class="w100">
-                <el-option v-for="item in visitApplyState" :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="8" :xl="8">
+						<el-form-item label="审批状态" prop="VisitApplyState">
+							<el-select v-model="state.queryParams.VisitApplyState" placeholder="请选择审批状态" clearable class="w100">
+								<el-option v-for="item in visitApplyState" :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="8" :xl="8">
 						<el-form-item label=" ">
 							<el-button type="primary" @click="queryList" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
@@ -43,11 +43,11 @@
 						<span>{{ row.order?.isProvince ? '省工单' : '市工单' }}</span>
 					</template>
 				</el-table-column>
-        <el-table-column label="工单标题" show-overflow-tooltip width="400">
-          <template #default="{ row }">
-            <span class="color-primary">{{ row.order?.title }}</span>
-          </template>
-        </el-table-column>
+				<el-table-column label="工单标题" show-overflow-tooltip width="400">
+					<template #default="{ row }">
+						<span class="color-primary">{{ row.order?.title }}</span>
+					</template>
+				</el-table-column>
 				<el-table-column prop="order.sourceChannel" label="来源方式" show-overflow-tooltip></el-table-column>
 				<el-table-column prop="sourceChannel" label="回访方式" show-overflow-tooltip></el-table-column>
 				<el-table-column prop="order.acceptType" label="受理类型" show-overflow-tooltip width="150"></el-table-column>
@@ -88,8 +88,7 @@
 				</el-table-column>
 				<el-table-column label="不满意原因" show-overflow-tooltip width="150">
 					<template #default="{ row }">
-							{{ row.orderVisit?.orderVisitDetails[0].orgNoSatisfiedReason?.map((item) => item.value).join(',') }}
-
+						{{ row.orderVisit?.orderVisitDetails[0].orgNoSatisfiedReason?.map((item) => item.value).join(',') }}
 					</template>
 				</el-table-column>
 				<el-table-column prop="visitApplyStateText" label="二次回访状态" show-overflow-tooltip width="120"></el-table-column>
@@ -99,9 +98,20 @@
 				<el-table-column prop="examinOpinion" label="审批意见" show-overflow-tooltip width="200"></el-table-column>
 				<el-table-column label="操作" width="190" fixed="right" align="center">
 					<template #default="{ row }">
-						<el-button link type="primary" @click="onAudit(row)" title="审批" v-if="[0].includes(row.visitApplyState)"> 审批 </el-button>
-            <el-button link type="primary" @click="onDetail(row)" title="查看审批详情" v-if="[1,2].includes(row.visitApplyState)"> 二次回访详情 </el-button>
-            <order-detail :order="row.order"/>
+						<el-button
+							link
+							type="primary"
+							@click="onAudit(row)"
+							title="审批"
+							v-if="[0].includes(row.visitApplyState)"
+							v-auth="'business:secondVisitAudit:audit'"
+						>
+							审批
+						</el-button>
+						<el-button link type="primary" @click="onDetail(row)" title="查看审批详情" v-if="[1, 2].includes(row.visitApplyState)">
+							二次回访详情
+						</el-button>
+						<order-detail :order="row.order" />
 					</template>
 				</el-table-column>
 				<template #empty>
@@ -116,10 +126,10 @@
 				@pagination="queryList"
 			/>
 		</el-card>
-    <!-- 二次回访 -->
-    <second-visit ref="secondVisitRef" @updateList="queryList"/>
-    <!-- 回访详情 -->
-    <second-visit-detail ref="secondVisitDetailRef" />
+		<!-- 二次回访 -->
+		<second-visit ref="secondVisitRef" @updateList="queryList" />
+		<!-- 回访详情 -->
+		<second-visit-detail ref="secondVisitDetailRef" />
 	</div>
 </template>
 <script setup lang="ts" name="secondVisitAudit">
@@ -129,7 +139,7 @@ import { auth } from '/@/utils/authFunction';
 import { throttle } from '/@/utils/tools';
 import { formatDate } from '/@/utils/formatTime';
 import { useRouter } from 'vue-router';
-import {secondVisitBaseData, secondVisitList} from "/@/api/business/secondVisit";
+import { secondVisitBaseData, secondVisitList } from '/@/api/business/secondVisit';
 // 引入组件
 const SecondVisit = defineAsyncComponent(() => import('/@/views/business/secondVisit/components/Visit.vue'));
 const SecondVisitDetail = defineAsyncComponent(() => import('/@/views/business/secondVisit/components/Visit-detail.vue'));
@@ -143,7 +153,7 @@ const state = reactive(<any>{
 		PageIndex: 1,
 		PageSize: 10,
 		Keyword: null, // 关键字
-    VisitApplyState:null, // 审批中
+		VisitApplyState: null, // 审批中
 	},
 	tableData: [], //表单
 	loading: false, // 加载
@@ -151,26 +161,26 @@ const state = reactive(<any>{
 });
 // 基础信息
 const visitApplyState = ref<EmptyArrayType>([]); // 回访状态
-const getBaseData = async()=>{
-  try {
-    const res = await secondVisitBaseData();
-    visitApplyState.value = res.result?.visitApplyState ?? [];
-  } catch (error) {
-    console.log(error);
-  }
-}
+const getBaseData = async () => {
+	try {
+		const res = await secondVisitBaseData();
+		visitApplyState.value = res.result?.visitApplyState ?? [];
+	} catch (error) {
+		console.log(error);
+	}
+};
 /** 获取列表 */
 const queryList = throttle(() => {
 	if (!auth('business:secondVisitAudit:query')) ElMessage.error('抱歉,您没有权限查看二次回访审批!');
 	else {
-    secondVisitList(state.queryParams)
-        .then((res) => {
-          state.tableData = res.result?.items ?? [];
-          state.total = res.result?.total ?? 0;
-        })
-        .catch((err) => {
-          console.log(err);
-        });
+		secondVisitList(state.queryParams)
+			.then((res) => {
+				state.tableData = res.result?.items ?? [];
+				state.total = res.result?.total ?? 0;
+			})
+			.catch((err) => {
+				console.log(err);
+			});
 	}
 }, 300);
 
@@ -193,15 +203,15 @@ const onExport = () => {
 // 审批
 const secondVisitRef = ref<RefType>();
 const onAudit = (row: any) => {
-  secondVisitRef.value.openDialog(row,true);
+	secondVisitRef.value.openDialog(row, true);
 };
 // 查看审批详情
 const secondVisitDetailRef = ref<RefType>();
-const onDetail = (row:any)=>{
-  secondVisitDetailRef.value.openDialog(row);
-}
+const onDetail = (row: any) => {
+	secondVisitDetailRef.value.openDialog(row);
+};
 onMounted(() => {
-  getBaseData();
+	getBaseData();
 	queryList();
 });
-</script>
+</script>

+ 10 - 6
src/views/home/component/Notice.vue

@@ -99,12 +99,16 @@ const more = (val: string) => {
 			router.push({ path: '/knowledge/index' });
 			break;
 		case '1':
-			router.push({
-				name: 'auxiliaryNotice',
-				state: {
-					index: '1',
-				},
-			});
+      try {
+        router.push({
+          name: 'auxiliaryNotice',
+          state: {
+            index: '1',
+          },
+        })
+      }catch (error) {
+        console.log(error,'21321')
+      }
 			break;
 		default:
 			break;

+ 18 - 20
src/views/system/config/workflow/component/workflowEdit.vue

@@ -4,28 +4,29 @@
 	</div>
 </template>
 <script setup lang="ts" name="workflowAddEdit">
-import {defineAsyncComponent, onMounted, ref} from 'vue';
-import {ElMessage} from 'element-plus';
-import {useRoute} from 'vue-router';
-import {getWorkFlowDetail} from '/@/api/system/workflow';
-import {auth} from '/@/utils/authFunction';
+import { defineAsyncComponent, onMounted, ref } from 'vue';
+import { ElMessage } from 'element-plus';
+import { useRoute } from 'vue-router';
+import { getWorkFlowDetail } from '/@/api/system/workflow';
+import { auth } from '/@/utils/authFunction';
 
-const LogicFlow = defineAsyncComponent(() => import('/@/components/LogicFlow/index.vue'));  // 流程设计器
+const LogicFlow = defineAsyncComponent(() => import('/@/components/LogicFlow/index.vue')); // 流程设计器
 const designerRef = ref(null as any);
 let flowData = ref({
 	name: '', // 流程名称
 	code: '', // 流程编码
 	id: '', // 流程id
-  description: '', // 流程描述
-	nodes: [  // 节点
+	description: '', // 流程描述
+	nodes: [
+		// 节点
 		{
 			id: 'start',
 			type: 'hotline:start',
 			x: 780,
 			y: 120,
 			properties: {
-        stepType: 1, // 节点类型(开始1 结束2)
-      },
+				stepType: 1, // 节点类型(开始1 结束2)
+			},
 			text: {
 				x: 780,
 				y: 80,
@@ -38,9 +39,9 @@ let flowData = ref({
 			x: 780,
 			y: 400,
 			properties: <EmptyObjectType>{
-          // 附加属性
-        stepType: 2, // 节点类型(开始1 结束2)
-      },
+				// 附加属性
+				stepType: 2, // 节点类型(开始1 结束2)
+			},
 			text: {
 				x: 780,
 				y: 440,
@@ -57,15 +58,12 @@ onMounted(async () => {
 	if (route.params.id) {
 		loading.value = true;
 		try {
-			if (!auth('system:workflow:detail')) ElMessage.error('抱歉,您没有权限获取流程详情!');
-			else {
-				const {result} = await getWorkFlowDetail(route.params.id);
-				flowData.value = result;
-				loading.value = false;
-			}
+			const { result } = await getWorkFlowDetail(route.params.id);
+			flowData.value = result;
+			loading.value = false;
 		} catch (error) {
 			loading.value = false;
 		}
 	}
 });
-</script>
+</script>

+ 1 - 1
src/views/todo/order/index.vue

@@ -140,7 +140,7 @@
 				<el-table-column label="操作" width="140" fixed="right" align="center">
 					<template #default="{ row }">
             <el-button link type="primary" @click="onReturn(row)" title="退回工单" v-auth="'todo:order:return'" v-if="row.source > 1 && row.status <= 1"> 退回</el-button>
-            <order-detail :order="row"/>
+            <order-detail :order="row" @updateList="queryList"/>
 					</template>
 				</el-table-column>
 				<template #empty>

+ 1 - 1
src/views/todo/seats/accept/Repeat-event.vue

@@ -26,7 +26,7 @@
 			</el-form-item>
 		</el-form>
 		<div class="mb10">
-			<el-button type="primary" @click="onCreate" v-auth="'business:repeatEvent:add'" :loading="state.loading">
+			<el-button type="primary" @click="onCreate" :loading="state.loading">
 				<SvgIcon name="ele-Plus" class="mr5" />创建重复事件
 			</el-button>
 		</div>