Sfoglia il codice sorgente

reactor:配置统一调整;查询企业地址调整

zhangchong 8 mesi fa
parent
commit
f1dce956cb

+ 1 - 3
.env.development

@@ -23,6 +23,4 @@ VITE_VOICE_ASSISTANT_SOCKET_URL=ws://118.121.59.30:19005
 # 捷通华声通话记录请求地址
 VITE_JTHS_API_URL=http://118.121.58.161:19021
 # 捷通华声AppKey
-VITE_JTHS_APPKEY=MTAwMDAx
-# 当前地州市
-VITE_CURRENT_CITY=zigong
+VITE_JTHS_APPKEY=MTAwMDAx

+ 1 - 3
.env.production

@@ -23,6 +23,4 @@ VITE_VOICE_ASSISTANT_SOCKET_URL=ws://118.121.59.30:19005
 # 捷通华声通话记录请求地址
 VITE_JTHS_API_URL=http://118.121.58.161:19021
 # 捷通华声AppKey
-VITE_JTHS_APPKEY=MTAwMDAx
-# 当前地州市
-VITE_CURRENT_CITY=yibin
+VITE_JTHS_APPKEY=MTAwMDAx

+ 1 - 3
.env.st

@@ -23,6 +23,4 @@ VITE_VOICE_ASSISTANT_SOCKET_URL=ws://118.121.59.30:19005
 # 捷通华声通话记录请求地址
 VITE_JTHS_API_URL=http://118.121.58.161:19021
 # 捷通华声AppKey
-VITE_JTHS_APPKEY=MTAwMDAx
-# 当前地州市
-VITE_CURRENT_CITY=zigong
+VITE_JTHS_APPKEY=MTAwMDAx

+ 2 - 4
.env.yibin

@@ -1,5 +1,5 @@
 # 宜宾环境
-VITE_MODE_NAME=yibin
+VITE_MODE_NAME=YiBin
 # 防止部署多套系统到同一域名不同目录时,变量共用的问题 设置不同的前缀
 VITE_STORAGE_NAME=yibin
 # 基础请求地址
@@ -23,6 +23,4 @@ VITE_VOICE_ASSISTANT_SOCKET_URL=ws://218.6.151.146:50108
 # 捷通华声通话记录请求地址
 VITE_JTHS_API_URL=http://218.6.151.146:50110
 # 捷通华声AppKey
-VITE_JTHS_APPKEY=MTAwMDAx
-# 当前地州市
-VITE_CURRENT_CITY=yibin
+VITE_JTHS_APPKEY=MTAwMDAx

+ 2 - 4
.env.zigong

@@ -1,5 +1,5 @@
 # 自贡环境
-VITE_MODE_NAME=zigong
+VITE_MODE_NAME=ZiGong
 # 防止部署多套系统到同一域名不同目录时,变量共用的问题 设置不同的前缀
 VITE_STORAGE_NAME=zigong
 # 基础请求地址
@@ -15,6 +15,4 @@ VITE_FILE_PREFIX=http://171.94.154.2:50105/hlfs
 # 高德地图安全密钥
 VITE_AMAP_SECURITYJSCODE=dd12ddafb11921dbcdc5b9c4484bb4e2
 # 高德地图KEY
-VITE_AMAP_KEY=83f51df235e4008e4eaf515cff63785c
-# 当前地州市
-VITE_CURRENT_CITY=zigong
+VITE_AMAP_KEY=83f51df235e4008e4eaf515cff63785c

+ 1 - 1
src/api/business/order.ts

@@ -181,7 +181,7 @@ export const orderTimeConfig = (params?: object) => {
  */
 export const companyInfo = (params?: object) => {
 	return request({
-		url: `/api/v1/Order/enterprise/List`,
+		url: `/api/v1/Enterprises/enterprise/list`,
 		method: 'get',
 		params
 	});

BIN
src/assets/images/login/changePwd_header.png


BIN
src/assets/images/login/login_bg.png


+ 4 - 4
src/components/OrderDetail/index.vue

@@ -154,16 +154,16 @@
 							<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" v-if="state.ruleForm.pushType">
 								<el-form-item label="推送分类"> {{ state.ruleForm.pushType }} </el-form-item>
 							</el-col>
-							<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" v-if="['zigong'].includes(city)">
+							<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" v-if="['ZiGong'].includes(city)">
 								<el-form-item label="重点事项类型">
 									<span class="color-danger" v-if="state.ruleForm.isUrgent">紧急;</span>
 									<span  class="color-danger" v-if="state.ruleForm.is24HoursComplete">24小时办结</span>
 								</el-form-item>
 							</el-col>
-							<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" v-if="['zigong'].includes(city) && state.ruleForm.orderTag">
+							<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" v-if="['ZiGong'].includes(city) && state.ruleForm.orderTag">
 								<el-form-item label="工单标签"> {{ state.ruleForm.orderTag }} </el-form-item>
 							</el-col>
-							<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" v-if="['zigong'].includes(city) && state.ruleForm.company">
+							<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" v-if="['ZiGong'].includes(city) && state.ruleForm.company">
 								<el-form-item label="工作单位"> {{ state.ruleForm.company }} </el-form-item>
 							</el-col>
 							<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
@@ -207,7 +207,7 @@
 								<el-form-item label="办理时间"> {{ formatDate(state.ruleForm.actualHandleTime, 'YYYY-mm-dd HH:MM:SS') }} </el-form-item>
 							</el-col>
 							<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" v-if="state.ruleForm.timeLimit">
-								<el-form-item label="工单办理期限"> {{ state.ruleForm.timeLimit }} <span  class="color-danger" v-if="['zigong'].includes(city) && state.ruleForm.is24HoursComplete">24小时办结</span></el-form-item>
+								<el-form-item label="工单办理期限"> {{ state.ruleForm.timeLimit }} <span  class="color-danger" v-if="['ZiGong'].includes(city) && state.ruleForm.is24HoursComplete">24小时办结</span></el-form-item>
 							</el-col>
 							<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" v-if="state.ruleForm.expiredTime">
 								<el-form-item label="工单期满时间">

+ 7 - 5
src/layout/navBars/breadcrumb/index.vue

@@ -21,6 +21,7 @@ import { useRoutesList } from '@/stores/routesList';
 import { useThemeConfig } from '@/stores/themeConfig';
 import { useUserInfo } from '@/stores/userInfo';
 import mittBus from '@/utils/mitt';
+import { getCurrentCityConfig } from '@/utils/appConfig';
 
 // 定义接口来定义对象的类型
 interface IndexState {
@@ -32,16 +33,17 @@ const User = defineAsyncComponent(() => import('@/layout/navBars/breadcrumb/user
 const Logo = defineAsyncComponent(() => import('@/layout/logo/index.vue'));
 const Horizontal = defineAsyncComponent(() => import('@/layout/navMenu/horizontal.vue'));
 
-const yibin = defineAsyncComponent(() => import('@/layout/navBars/breadcrumb/ybTel.vue')); // 宜宾呼叫中心(天润)
-const zigong = defineAsyncComponent(() => import('@/layout/navBars/breadcrumb/zgTel.vue')); // 自贡呼叫中心(兴唐)
+const YiBin = defineAsyncComponent(() => import('@/layout/navBars/breadcrumb/ybTel.vue')); // 宜宾呼叫中心(天润)
+const ZiGong = defineAsyncComponent(() => import('@/layout/navBars/breadcrumb/zgTel.vue')); // 自贡呼叫中心(兴唐)
 
 const COMPONENT_LIST = {
-	yibin: yibin,
-	zigong: zigong,
+	YiBin,
+	ZiGong,
 };
+const {city} = getCurrentCityConfig();
 // 当前地州市
 const currentCity = computed(() => {
-	return COMPONENT_LIST[import.meta.env.VITE_CURRENT_CITY];
+	return COMPONENT_LIST[city];
 });
 // 定义变量内容
 const stores = useRoutesList();

+ 11 - 12
src/utils/appConfig.ts

@@ -4,7 +4,7 @@ import { storeToRefs } from 'pinia';
 /** @description 获取当前的环境变量名称 是否是正式环境
  * */
 export const isProduction = () => {
-	return ['yibin', 'zigong'].includes(import.meta.env.VITE_MODE_NAME);
+	return ['YiBin', 'ZiGong'].includes(import.meta.env.VITE_MODE_NAME);
 };
 /**
  * @description 获取当前市州配置
@@ -29,7 +29,7 @@ export const getCurrentCityConfig = () => {
 	switch (themeConfig.value.appScope) {
 		case 'YiBin':
 			return {
-				city: 'yibin',
+				city: 'YiBin',
 				cityName: '宜宾市', // 中文名称
 				cityCode: '511500', // 6位区号
 				operate: '中国电信股份有限公司宜宾分公司',
@@ -37,16 +37,16 @@ export const getCurrentCityConfig = () => {
 				cityAbbr: '宜宾', // 简写
 				recordNumber: '蜀ICP备19035032号-36', // 备案号
 				locationCenter: [104.643, 28.751694], // 地图中心点
-				loginBg: 'yibin/login_bg.png', // 登录背景
+				loginBg: `${themeConfig.value.appScope}/login_bg.png`, // 登录背景
 				isShowLogo: true, // 是否显示菜单左上角logo
-				favicon: 'yibin/favicon.ico',
+				favicon: `${themeConfig.value.appScope}/favicon.ico`,
 				callCenterSocketUrl: isProduction() ? 'ws://218.6.151.146:50104/ola_socket' : ' ws://222.213.23.229:29003/ola_socket', // 呼叫中心socket地址
 				recordPrefix: isProduction() ? 'http://218.6.151.146:50104' : 'http://222.213.23.229:10085', // 播放录音地址前缀
 				recordDownLoadPrefix: isProduction() ? 'http://192.168.2.212:29003' : 'http://222.213.23.229:10085', // 录音地址下载前缀
 			};
 		case 'ZiGong':
 			return {
-				city: 'zigong',
+				city: 'ZiGong',
 				cityName: '自贡市',
 				cityCode: '510300',
 				operate: '中国电信股份有限公司自贡分公司',
@@ -54,10 +54,9 @@ export const getCurrentCityConfig = () => {
 				cityAbbr: '自贡',
 				recordNumber: '蜀ICP备2024053169号-1',
 				locationCenter: [104.778001, 29.339399],
-				// loginBg: 'zigong/login_bg.png',
-				loginBg: 'login/login_bg.png',
+				loginBg: `${themeConfig.value.appScope}/login_bg.png`,
 				isShowLogo: false,
-				favicon: 'zigong/favicon.ico',
+				favicon: `${themeConfig.value.appScope}/favicon.ico`,
 				// callCenterSocketUrl: isProduction() ? 'ws://171.94.154.10:7681' : ' ws://123.56.10.71:7681', // 呼叫中心socket地址
 				callCenterSocketUrl: isProduction() ? 'ws://171.94.154.10:7681' : ' ws://171.94.154.10:7681', // 呼叫中心socket地址
 				recordPrefix: isProduction() ? 'http://171.94.154.10:8066/' : 'http://123.56.10.71:8066/', // 播放录音地址前缀
@@ -65,7 +64,7 @@ export const getCurrentCityConfig = () => {
 			};
 		default:
 			return {
-				city: 'yibin',
+				city: 'YiBin',
 				cityName: '宜宾市', // 中文名称
 				cityCode: '511500', // 6位区号
 				operate: '中国电信股份有限公司宜宾分公司',
@@ -73,9 +72,9 @@ export const getCurrentCityConfig = () => {
 				cityAbbr: '宜宾', // 简写
 				recordNumber: '蜀ICP备19035032号-36', // 备案号
 				locationCenter: [104.643, 28.751694], // 地图中心点
-				loginBg: 'yibin/login_bg.png', // 登录背景
-				isShowLogo: true, // 是否显示左上角logo
-				favicon: 'yibin/favicon.ico',
+				loginBg: `${themeConfig.value.appScope}/login_bg.png`, // 登录背景
+				isShowLogo: true, // 是否显示菜单左上角logo
+				favicon: `${themeConfig.value.appScope}/favicon.ico`,
 				callCenterSocketUrl: isProduction() ? 'ws://218.6.151.146:50104/ola_socket' : ' ws://222.213.23.229:29003/ola_socket', // 呼叫中心socket地址
 				recordPrefix: isProduction() ? 'http://218.6.151.146:50104' : 'http://222.213.23.229:10085', // 播放录音地址前缀
 				recordDownLoadPrefix: isProduction() ? 'http://192.168.2.212:29003' : 'http://222.213.23.229:10085', // 录音地址下载前

+ 1 - 1
src/views/quality/project/components/Project-add.vue

@@ -20,7 +20,7 @@
 						<span class="ml10">分</span>
 					</el-form-item>
 				</el-col>
-				<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" v-if="!['zigong'].includes(city)">
+				<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" v-if="!['ZiGong'].includes(city)">
 					<el-form-item label="是否智能质检" prop="isIntelligent" :rules="[{ required: false, message: '请选择是否智能质检', trigger: 'change' }]">
 						<el-switch
 							v-model="state.ruleForm.isIntelligent"

+ 1 - 1
src/views/quality/project/components/Project-edit.vue

@@ -20,7 +20,7 @@
 						<span class="ml10">分</span>
 					</el-form-item>
 				</el-col>
-				<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" v-if="!['zigong'].includes(city)">
+				<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" v-if="!['ZiGong'].includes(city)">
 					<el-form-item label="是否智能质检" prop="isIntelligent" :rules="[{ required: false, message: '请选择是否智能质检', trigger: 'change' }]">
 						<el-switch
 							v-model="state.ruleForm.isIntelligent"

+ 2 - 2
src/views/quality/project/index.vue

@@ -10,7 +10,7 @@
 				:total="state.total"
 				v-model:page-index="state.queryParams.PageIndex"
 				v-model:page-size="state.queryParams.PageSize"
-				v-if="['yibin'].includes(city)"
+				v-if="['YiBin'].includes(city)"
 			>
         <template #table-search>
           <el-form :model="state.queryParams" ref="ruleFormRef" inline @submit.native.prevent>
@@ -54,7 +54,7 @@
 				:total="state.total"
 				v-model:page-index="state.queryParams.PageIndex"
 				v-model:page-size="state.queryParams.PageSize"
-				v-if="['zigong'].includes(city)"
+				v-if="['ZiGong'].includes(city)"
 			>
 				<template #table-search>
 					<el-form :model="state.queryParams" ref="ruleFormRef" inline @submit.native.prevent>

+ 1 - 1
src/views/quality/template/components/Template-add.vue

@@ -49,7 +49,7 @@
 					</el-form-item>
 				</el-col>
 				<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
-					<el-form-item label="AI质检" v-if="['yibin'].includes(city)">
+					<el-form-item label="AI质检" v-if="['YiBin'].includes(city)">
 						{{ item.isIntelligent === 1 ? '是' : '否' }}
 					</el-form-item>
 				</el-col>

+ 1 - 1
src/views/quality/template/components/Template-edit.vue

@@ -49,7 +49,7 @@
 					</el-form-item>
 				</el-col>
 				<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
-					<el-form-item label="AI质检" v-if="['yibin'].includes(city)">
+					<el-form-item label="AI质检" v-if="['YiBin'].includes(city)">
 						{{ item.isIntelligent === 1 ? '是' : '否' }}
 					</el-form-item>
 				</el-col>

+ 2 - 6
src/views/resetPwd/index.vue

@@ -26,15 +26,11 @@ import { getImageUrl } from '@/utils/tools';
 // 引入组件
 const ResetPwd = defineAsyncComponent(() => import('@/views/resetPwd/component/Reset-password.vue'));
 const LayoutFooter = defineAsyncComponent(() => import('@/layout/footer/index.vue'));
-const currentCity = computed(() => {
-	return import.meta.env.VITE_CURRENT_CITY;
-});
-const imgSrc = ref('');
-imgSrc.value = getImageUrl(`${currentCity.value}/change_pwd_header.png`);
-
 // 定义变量
 const storesThemeConfig = useThemeConfig();
 const { themeConfig } = storeToRefs(storesThemeConfig);
+const imgSrc = ref('');
+imgSrc.value = getImageUrl(`${themeConfig.value.appScope}/change_pwd_header.png`);
 const router = useRouter();
 const backToLogin = () => {
 	Session.clear();

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

@@ -186,7 +186,7 @@ const state = reactive<any>({
 const ruleFormRef = ref<RefType>(); // 搜索表单ref
 //  在正式上线前 先隐藏用户和部门的新增
 const showAdd = computed(() => {
-	return import.meta.env.VITE_MODE_NAME !== 'yibin';
+	return ['YiBin','ZiGong'].includes(import.meta.env.VITE_MODE_NAME)
 });
 // 搜索
 const formatTable = (list: any[], keyword: string) => {

+ 5 - 3
src/views/system/user/index.vue

@@ -126,6 +126,7 @@ import { getTelList } from '@/api/public/wex';
 import { Splitpanes, Pane } from 'splitpanes';
 import 'splitpanes/dist/splitpanes.css';
 import { getCallCenterGroupList, getCallCenterList } from '@/api/callCenter';
+import { getCurrentCityConfig } from '@/utils/appConfig';
 
 // 引入组件
 const UserAdd = defineAsyncComponent(() => import('@/views/system/user/component/User-add.vue')); // 新增用户组件
@@ -178,7 +179,7 @@ const filterOrg = ref(''); // 搜索部门名称
 const treRef = ref<RefType>(); // 树形组件ref
 //  在正式上线前 先隐藏用户和部门的新增
 const showAdd = computed(() => {
-	return import.meta.env.VITE_MODE_NAME !== 'yibin';
+	return ['YiBin','ZiGong'].includes(import.meta.env.VITE_MODE_NAME)
 });
 const onQueryChanged = (query: string) => {
 	if (query) {
@@ -234,12 +235,13 @@ const getBaseDataFn = () => {
 		state.baseData = res?.result ?? [];
 	});
 };
+const {city} = getCurrentCityConfig();
 // 获取分机列表
 const getTelsListFn = async () => {
 	let tels, telGroup;
-	if (import.meta.env.VITE_CURRENT_CITY === 'zigong') {
+	if (['ZiGong'].includes(city)) {
 		[tels, telGroup] = await Promise.all([getCallCenterList(), getCallCenterGroupList()]);
-	} else if (import.meta.env.VITE_CURRENT_CITY === 'yibin') {
+	} else if (['YiBin'].includes(city)) {
 		[tels] = await Promise.all([getTelList()]);
 		tels.result = tels.result.map((item: any) => {
 			return {

+ 11 - 8
src/views/tels/callLog/index.vue

@@ -1,20 +1,23 @@
 <template>
-    <component :is="currentCity" />
+	<component :is="currentCity" />
 </template>
 
 <script lang="tsx" setup name="callLog">
-import {defineAsyncComponent ,computed} from 'vue';
+import { defineAsyncComponent, computed } from 'vue';
+import { getCurrentCityConfig } from '@/utils/appConfig';
 
 // 引入组件
-const yibin = defineAsyncComponent(() => import('@/views/tels/callLog/ybCallLog.vue')); // 宜宾通话记录
-const zigong = defineAsyncComponent(() => import('@/views/tels/callLog/zgCallLog.vue')); // 自贡通话记录
+const YiBin = defineAsyncComponent(() => import('@/views/tels/callLog/ybCallLog.vue')); // 宜宾通话记录
+const ZiGong = defineAsyncComponent(() => import('@/views/tels/callLog/zgCallLog.vue')); // 自贡通话记录
+
+const { city } = getCurrentCityConfig();
 
 const COMPONENT_LIST = {
-  yibin: yibin,
-  zigong: zigong,
+	YiBin,
+	ZiGong,
 };
 // 当前地州市
 const currentCity = computed(() => {
-  return COMPONENT_LIST[import.meta.env.VITE_CURRENT_CITY];
+	return COMPONENT_LIST[city];
 });
-</script>
+</script>

+ 2 - 2
src/views/tels/smartRecord/index.vue

@@ -217,7 +217,7 @@ const onPlaySoundRecording = (row: any) => {
 	const prefix = import.meta.env.VITE_JTHS_API_URL.split(':')[0] + ':' + import.meta.env.VITE_JTHS_API_URL.split(':')[1];
 	const suffix = row.recordUrl.split(':')[2];
 	const url = `${prefix}:${suffix}`;
-	if (import.meta.env.VITE_MODE_NAME !== 'yibin') {
+	if (import.meta.env.VITE_MODE_NAME !== 'YiBin') {
 		// 测试环境
 		playRecordRef.value.openDialog(url);
 	} else {
@@ -238,7 +238,7 @@ const onDownload = (row: any) => {
 			const prefix = import.meta.env.VITE_JTHS_API_URL.split(':')[0] + ':' + import.meta.env.VITE_JTHS_API_URL.split(':')[1];
 			const suffix = row.recordUrl.split(':')[2];
 			const url = `${prefix}:${suffix}`;
-			if (import.meta.env.VITE_MODE_NAME !== 'yibin') {
+			if (import.meta.env.VITE_MODE_NAME !== 'YiBin') {
 				fileDownload({ path: url }).then((res: any) => {
 					downloadFileByStream(res);
 				});

+ 11 - 8
src/views/todo/seats/accept/index.vue

@@ -1,20 +1,23 @@
 <template>
-  <component :is="currentCity" />
+	<component :is="currentCity" />
 </template>
 
 <script lang="tsx" setup name="orderAccept">
-import {defineAsyncComponent ,computed} from 'vue';
+import { defineAsyncComponent, computed } from 'vue';
+import { getCurrentCityConfig } from '@/utils/appConfig';
 
 // 引入组件
-const yibin = defineAsyncComponent(() => import('@/views/todo/seats/accept/ybAccept.vue')); // 宜宾工单受理
-const zigong = defineAsyncComponent(() => import('@/views/todo/seats/accept/zgAccept.vue')); // 自贡工单受理
+const YiBin = defineAsyncComponent(() => import('@/views/todo/seats/accept/ybAccept.vue')); // 宜宾工单受理
+const ZiGong = defineAsyncComponent(() => import('@/views/todo/seats/accept/zgAccept.vue')); // 自贡工单受理
+
+const { city } = getCurrentCityConfig();
 
 const COMPONENT_LIST = {
-  yibin: yibin,
-  zigong: zigong,
+	YiBin,
+	ZiGong,
 };
 // 当前地州市
 const currentCity = computed(() => {
-  return COMPONENT_LIST[import.meta.env.VITE_CURRENT_CITY];
+	return COMPONENT_LIST[city];
 });
-</script>
+</script>