刘洋 1 gadu atpakaļ
vecāks
revīzija
2029e59732

+ 2 - 1
src/style/global.less

@@ -248,7 +248,8 @@ body {
   margin: 20px 0 5px;
   font-size: 16px;
   font-weight: bold;
-  color: @dark-text-color;
+  // color: @dark-text-color;
+  color: var(--td-brand-color);
   line-height: 24px;
 }
 .form-item-title {

+ 28 - 0
src/views/sop/components/dynamic-form-item/LABEL.vue

@@ -0,0 +1,28 @@
+<template>
+  <div class="label">
+    <view
+      v-for="(item, index) in titleArr"
+      :key="index"
+      :style="{ color: item.color }"
+      >{{ item.label }}</view
+    >
+  </div>
+</template>
+<script setup name="LABEL">
+import { ref, watch, computed } from 'vue';
+const props = defineProps({
+  config: { type: Object },
+});
+const titleArr = computed(() => {
+  return JSON.parse(props.config.title || '[]');
+});
+</script>
+<style lang="less" scoped>
+.label {
+  margin: 20px 0 5px;
+  font-size: 16px;
+  font-weight: bold;
+  color: #262626;
+  line-height: 24px;
+}
+</style>

+ 13 - 8
src/views/sop/components/dynamic-form-item/SIGN.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="sign-box">
-    <img class="sign-result-img" v-if="valueData" />
+    <img class="sign-result-img" :src="valueData" v-if="valueData" />
     <t-popup trigger="click" :onVisibleChange="visibleChange" v-else>
       <template #triggerElement>
         <t-button>添加签名</t-button>
@@ -32,11 +32,15 @@ const emit = defineEmits(['update:modelValue', 'change']);
 
 const valueData = ref('');
 const getSignResultImg = () => {
-  getAttachmentListByKey(key.value).then((res) => {
-    if (res && res?.url) {
-      valueData.value = res.url;
-      emitChange();
-      pause();
+  // getAttachmentListByKey(key.value).then((res) => {
+  //先用体验版的测试扫码链接,只能写死传'1',后期小程序发正式版本再增加支持活的参数
+  getAttachmentListByKey('1').then((res) => {
+    if (Array.isArray(res)) {
+      if (res && res[0]?.url) {
+        valueData.value = res[0].url;
+        emitChange();
+        pause();
+      }
     }
   });
 };
@@ -72,10 +76,11 @@ const visibleChange = (visible) => {
   if (visible) {
     resume();
   } else {
-    pause();
+    // pause();
   }
 };
 const createQrcodeValue = computed(() => {
+  //先用体验版的测试扫码链接,只能写死,后期小程序发正式版本再增加支持活的参数
   return 'https://sopwxapp.qmth.com.cn/sign/?key=1';
 });
 </script>
@@ -83,7 +88,7 @@ const createQrcodeValue = computed(() => {
 <style lang="less" scoped>
 .sign-box {
   .sign-result-img {
-    height: 80px;
+    height: 100px;
   }
 }
 </style>

+ 2 - 0
src/views/sop/components/dynamic-form-item/index.vue

@@ -28,6 +28,7 @@ import NUMBER from './NUMBER.vue';
 import BIGTITLE from './BIG_TITLE.vue';
 import SIGN from './SIGN.vue';
 import DEVICEOUTTABLE from './device-table/index.vue';
+import LABEL from './LABEL.vue';
 
 const props = defineProps({
   config: { type: Object },
@@ -59,6 +60,7 @@ const tabComps = {
   DEVICE_IN_TABLE: DEVICEOUTTABLE,
   FORM_GROUP_TITLE: BIGTITLE,
   ONLY_TITLE: BIGTITLE,
+  LABEL: LABEL,
 };
 const tabComp = computed(() => {
   return tabComps[props.config.code];