Kaynağa Gözat

fix:修改通过率默认传参-通知人tooltip

贾宇博 5 ay önce
ebeveyn
işleme
acf4c557c6
2 değiştirilmiş dosya ile 32 ekleme ve 18 silme
  1. 30 16
      src/views/equity/NewsRelease/index.vue
  2. 2 2
      vite.config.js

+ 30 - 16
src/views/equity/NewsRelease/index.vue

@@ -7,9 +7,9 @@
         </el-select>
       </el-form-item>
       <el-form-item label="通知公司" prop="companyName">
-              <el-input v-model="queryParams.companyName" style="width: 95%" :autosize="{ minRows: 2, maxRows: 4 }"
-                placeholder="请输入消息标题" />
-            </el-form-item>
+        <el-input v-model="queryParams.companyName" style="width: 95%" :autosize="{ minRows: 2, maxRows: 4 }"
+          placeholder="请输入消息标题" />
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
@@ -54,10 +54,12 @@
       <el-table-column label="通知人" align="center" prop="recipients" width="360">
         <template #default="{ row }">
           <div class="tag-container">
-            <el-tag v-for="(recipient, index) in row.recipients" :key="index"
-              :type="getTagTypeMap[String(recipient.status)]">
-              {{ recipient.userName }}
-            </el-tag>
+            <el-tooltip v-for="(recipient, index) in row.recipients" :key="index"
+              :content="recipient.voteReason || '暂无无备注信息'" placement="top">
+              <el-tag :type="getTagTypeMap[String(recipient.status)]">
+                {{ recipient.userName }}
+              </el-tag>
+            </el-tooltip>
           </div>
         </template>
       </el-table-column>
@@ -125,7 +127,7 @@
         </el-row>
 
         <el-form-item label="消息内容" prop="noticeContent">
-          <editor v-if="open" v-model="noticeContent" :min-height="192"  @blur="validateField('noticeContent')" />
+          <editor v-if="open" v-model="noticeContent" :min-height="192" @blur="validateField('noticeContent')" />
         </el-form-item>
 
         <!-- <el-form-item label="发布时间" prop="sendTime">
@@ -199,7 +201,9 @@ const total = ref(0);
 const title = ref("");
 const centerDialogVisible = ref(false); // 对话框
 const noticeContent = ref('');
-const formRef = ref(null);
+const formList = ref({
+  passRate: '',
+});
 
 const data = reactive({
   form: {},
@@ -222,7 +226,7 @@ const data = reactive({
     msgTitle: [
       { required: true, message: "请选择公告类型", trigger: "blur" }
     ],
-   
+
   }
 });
 const validateField = (field) => {
@@ -319,14 +323,19 @@ const hasContent = (html) => {
 
 /** 提交按钮 */
 function submitForm() {
-  form.value.msgContent = noticeContent.value; // 将 noticeContent 同步到 form.msgContent
-   // 校验 msgContent 是否有值
-   if (!hasContent(form.value.msgContent)) {
+  form.value.msgContent = noticeContent.value;
+  if (!hasContent(form.value.msgContent)) {
     proxy.$message.error("请输入消息内容");
-    return; // 阻止表单提交
+    return;
   }
+
   proxy.$refs["send-messageRef"].validate(valid => {
     if (valid) {
+      // 如果 passRate 为空,设置默认值 60
+      if (form.value.passRate == null || form.value.passRate === "") {
+        form.value.passRate = "60";
+      }
+
       if (form.value.sendMessageId != null) {
         updateSend - message(form.value).then(response => {
           proxy.$modal.msgSuccess("修改成功");
@@ -343,7 +352,6 @@ function submitForm() {
     }
   });
 }
-
 /** 删除按钮操作 */
 function handleDelete(row) {
   const ids = row.sendMessageId || ids.value;
@@ -435,7 +443,13 @@ getCompany()
   max-width: 100%;
 }
 
->>>.editor{
+>>>.editor {
   width: 550px
 }
+
+.tag-container {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 6px; /* 调整标签间距 */
+}
 </style>

+ 2 - 2
vite.config.js

@@ -33,8 +33,8 @@ export default defineConfig(({ mode, command }) => {
         '/dev-api': { // 代理后缀
           // target: 'http://192.168.100.84:8080',
           // target: 'http://1.95.212.35:8080',
-          // target: 'http://192.168.100.119:8080', // 王文龙代理地址
-          target: 'http://192.168.100.71:8080', // 李荣代理地址
+          target: 'http://192.168.100.66:8080', // 王文龙代理地址
+          // target: 'http://192.168.100.71:8080', // 李荣代理地址
           // target: 'https://api.wzs.pub/mock/13',
           changeOrigin: true,
           rewrite: (p) => p.replace(/^\/dev-api/, '')