Ver código fonte

refactor(timerConfig): 调整计时器配置界面的字段映射和颜色选择器格式

- 将计时器配置中的字体颜色字段从 midSpecialTextFontColor 和 midSpecialNumberFontColor
  更改为 midTopFontColor 和 midDownFontColor
- 移除暂停和同步界面预览中的计时器显示元素
- 将所有颜色选择器的颜色格式从 rgb 统一更改为 hex 格式
- 清理预定义颜色数组,移除不规范的颜色格式
- 添加新的 CSS 类用于上传预览图片和特殊预览框的样式
fugui 3 semanas atrás
pai
commit
5e5170e487

+ 23 - 3
src/layout/components/notice/index.vue

@@ -5,8 +5,8 @@
       <div class="head-box-btn" @click="readAll">全部已读</div>
     </div>
     <div v-loading="state.loading" class="content-box">
-      <template v-if="newsList.length > 0">
-        <div v-for="(v, k) in newsList" :key="k" class="content-box-item" @click="onNewsClick(k)">
+      <template v-if="displayList.length > 0">
+        <div v-for="(v, k) in displayList" :key="k" class="content-box-item" @click="onNewsClick(v.originalIndex)">
           <div class="item-conten">
             <div>{{ v.message }}</div>
             <div class="content-box-msg"></div>
@@ -19,7 +19,7 @@
       </template>
       <el-empty v-else :description="'消息为空'"></el-empty>
     </div>
-    <div v-if="newsList.length > 0" class="foot-box" @click="onGoToGiteeClick">前往gitee</div>
+    <div v-if="displayList.length > 0" class="foot-box" @click="onGoToGiteeClick">前往gitee</div>
   </div>
 </template>
 
@@ -35,6 +35,26 @@ const state = reactive({
 });
 const newsList = ref([]) as any;
 
+/**
+ * 判断消息是否为纯文本(非JSON对象)
+ */
+const isPlainText = (msg: any): boolean => {
+  if (typeof msg !== 'string') return false;
+  try {
+    const parsed = JSON.parse(msg);
+    return typeof parsed !== 'object' || parsed === null;
+  } catch {
+    return true;
+  }
+};
+
+/**
+ * 过滤后的展示列表,只保留纯文本消息
+ */
+const displayList = computed(() => {
+  return newsList.value.map((item: any, index: number) => ({ ...item, originalIndex: index })).filter((item: any) => isPlainText(item.message));
+});
+
 /**
  * 初始化数据
  * @returns

+ 1 - 1
src/views/system/physical/customerServiceInfo/index.vue

@@ -333,7 +333,7 @@ const handlePhoneBlur = async () => {
 };
 const handleViewSubService = () => {
   proxy?.$router.push({
-    path: '/service/businessConfig'
+    path: '/operation/businessConfig'
   });
 };
 </script>

+ 28 - 34
src/views/system/physical/timerConfig/index.vue

@@ -384,55 +384,49 @@ const initFormData = {
   id: undefined,
   // 顶部
   topBgImage: '',
-  topFontColor: '#FF0000',
+  topFontColor: '#F59A23',
   // 主体
   mainBgImage: '',
   // 中部普通
-  midTopFontColor: '#000000',
-  midDownFontColor: '#0000FF',
+  midTopFontColor: '#FF9A82',
+  midDownFontColor: '#F9A825',
   // 中部特殊 (预置分)
-  midSpecialTextFontColor: '#000000',
-  midSpecialNumberFontColor: '#0000FF',
+  midSpecialTextFontColor: '#FFFFFF',
+  midSpecialNumberFontColor: '#FFFFFF',
   // 计时器
-  timerRunningColor: '#FFA500',
-  timerBreakColor: '#008000',
+  timerRunningColor: '#FFFFFF',
+  timerBreakColor: '#00FF4D',
   // 状态按钮
-  statusAcceptBg: '#FFFFFF',
-  statusAcceptText: '#000000',
-  statusStopBg: '#FFFFFF',
-  statusStopText: '#000000',
-  statusShortlistBg: '#FFFFFF',
-  statusShortlistText: '#000000',
-  statusQueueBg: '#FFFFFF',
-  statusQueueText: '#000000',
+  statusAcceptBg: '#2E7D32',
+  statusAcceptText: '#FFFFFF',
+  statusStopBg: '#C62828',
+  statusStopText: '#FFFFFF',
+
+  statusShortlistBg: '#F59A23',
+  statusShortlistText: '#FFFFFF',
+  statusQueueBg: '#F57C00',
+  statusQueueText: '#FFFFFF',
+
   // 底部
-  bottomBgColor: '#333333',
-  bottomFontColor: '#FFD700',
+  bottomBgColor: '#2F375F',
+  bottomFontColor: '#FFFFFF',
   // 特殊 - 暂停
-  pauseBgColor: '#EEEEEE',
-  pauseFontColor: '#333333',
+  pauseBgColor: '#000000',
+  pauseFontColor: '#FFFFFF',
+
   // 特殊 - 结束
   finishBgColor: '#000000',
   finishFontColor: '#FFFFFF',
   // 特殊 - 同步
-  syncBgColor: '#FFFFFF',
-  syncFontColor: '#000000',
+  syncBgColor: '#000000',
+  syncFontColor: '#FFFFFF',
   // 特殊 - 暂停倒计时
-  pauseTimerBgColor: '#F5F5F5',
-  pauseTimerTextColor: '#666666',
-  pauseTimerNumColor: '#FF0000'
+  pauseTimerBgColor: '#000000',
+  pauseTimerTextColor: '#FFFFFF',
+  pauseTimerNumColor: '#00FF4D'
 };
 
-const predefineColors = ref([
-  '#ff4500',
-  '#ff8c00',
-  '#ffd700',
-  '#90ee90',
-  '#00ced1',
-  '#1e90ff',
-  '#c71585',
-  '#ffffff'
-]);
+const predefineColors = ref(['#ff4500', '#ff8c00', '#ffd700', '#90ee90', '#00ced1', '#1e90ff', '#c71585', '#ffffff']);
 
 const form = reactive({ ...initFormData });
 const buttonLoading = ref(false);