xiaohaizhao 1 год назад
Родитель
Сommit
feb938c12b

+ 34 - 13
src/WebsiteManagement/consultManage/modules/add.vue

@@ -4,7 +4,7 @@
       size="small"
       type="primary"
       @click="addBtn((dialogFormVisible = true))"
-      >{{$t(`新 建`)}}</el-button
+      >{{ $t(`新 建`) }}</el-button
     >
     <el-drawer
       :title="$t('新增资讯')"
@@ -26,6 +26,14 @@
                 ></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('副标题')">
+                <el-input
+                  v-model="form.summary"
+                  :placeholder="$t('请输入副标题')"
+                ></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item :label="$t('分类')" prop="sat_notice_classid">
                 <el-select
@@ -47,14 +55,14 @@
             <el-col :span="24">
               <el-form-item :label="$t('状态')" prop="status">
                 <el-radio-group v-model="form.status" style="width: 100%">
-                  <el-radio label="新建">{{$t('新建')}}</el-radio>
-                  <el-radio label="发布">{{$t(`发布`)}}</el-radio>
+                  <el-radio label="新建">{{ $t("新建") }}</el-radio>
+                  <el-radio label="发布">{{ $t(`发布`) }}</el-radio>
                 </el-radio-group>
               </el-form-item>
             </el-col>
           </el-form>
         </el-row>
-        <p style="font-size: 14px">{{$t('资讯封面')}}</p>
+        <p style="font-size: 14px">{{ $t("资讯封面") }}</p>
         <div style="margin-top: 10px">
           <previewImage
             v-if="form.cover"
@@ -76,10 +84,12 @@
             @onSuccess="onCoverSubmit"
           ></upload>
           <p class="info">
-            {{$t('注:建议上传图片大小')}}130x80,{{$t('大小不超过')}}2M,{{$t('格式为')}}JPG/PNG/jpg/png
+            {{ $t("注:建议上传图片大小") }}130x80,{{ $t("大小不超过") }}2M,{{
+              $t("格式为")
+            }}JPG/PNG/jpg/png
           </p>
         </div>
-        <p style="font-size: 14px; margin-top: 10px">{{$t('附件上传')}}</p>
+        <p style="font-size: 14px; margin-top: 10px">{{ $t("附件上传") }}</p>
         <div style="margin-top: 10px">
           <attachmentList
             :attinfos="attinfo_attachment"
@@ -98,7 +108,7 @@
             ></upload>
           </attachmentList>
         </div>
-        <p style="font-size: 14px; margin-top: 10px">{{$t('资讯正文')}}</p>
+        <p style="font-size: 14px; margin-top: 10px">{{ $t("资讯正文") }}</p>
         <div style="margin-top: 10px">
           <myEditor
             ref="editor"
@@ -114,10 +124,14 @@
           @click="onCancel"
           plain
           class="normal-btn-width"
-          >{{$t(`取 消`)}}</el-button
+          >{{ $t(`取 消`) }}</el-button
         >
-        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width"
-          >{{$t(`确 定`)}}</el-button
+        <el-button
+          size="small"
+          type="primary"
+          @click="onSubmit"
+          class="normal-btn-width"
+          >{{ $t(`确 定`) }}</el-button
         >
       </div>
     </el-drawer>
@@ -154,9 +168,15 @@ export default {
         checkdate: "",
       },
       rules: {
-        title: [{ required: true, message: this.$t( "请输入标题名称"), trigger: "blur" }],
+        title: [
+          {
+            required: true,
+            message: this.$t("请输入标题名称"),
+            trigger: "blur",
+          },
+        ],
         sat_notice_classid: [
-          { required: true,  message: this.$t( "请选择分类"), trigger: "change" },
+          { required: true, message: this.$t("请选择分类"), trigger: "change" },
         ],
       },
       classData: [],
@@ -187,7 +207,7 @@ export default {
         content: {
           where: {
             condition: "",
-            isused:"1"
+            isused: "1",
           },
         },
       };
@@ -207,6 +227,7 @@ export default {
           this.dialogFormVisible = false;
           this.$refs.form.resetFields();
           this.form.cover = "";
+          this.form.summary = "";
           this.image = null;
           this.form.content = "";
           this.attinfo_attachment = [];

+ 39 - 20
src/WebsiteManagement/consultManage/modules/detailInfo.vue

@@ -4,7 +4,7 @@
       size="small"
       type="text"
       @click="detailBtn((dialogFormVisible = true))"
-      >{{$t('详情')}}</el-button
+      >{{ $t("详情") }}</el-button
     >
     <el-drawer
       :title="$t('资讯管理')"
@@ -17,7 +17,7 @@
       @close="onClose"
     >
       <div style="display: flex; justify-content: space-between; padding: 10px">
-        <div>{{$t('资讯管理')}}</div>
+        <div>{{ $t("资讯管理") }}</div>
         <div>
           <edit
             v-if="tool.checkAuth($route.name, 'update')"
@@ -32,15 +32,17 @@
             size="small"
             @click="delBtn"
             :disabled="form.status == '发布'"
-            >{{$t(`删除`)}}</el-button
+            >{{ $t(`删除`) }}</el-button
           >
           <el-button
-              size="small"
-              type="primary"
-              style="margin-right: 25px!important;"
-              @click="statusChange"
-              v-if="tool.checkAuth($route.name, 'update')"
-          >{{ form.status == '新建' ? $t("发布") : $t("取消发布") }}</el-button
+            size="small"
+            type="primary"
+            style="margin-right: 25px !important"
+            @click="statusChange"
+            v-if="tool.checkAuth($route.name, 'update')"
+            >{{
+              form.status == "新建" ? $t("发布") : $t("取消发布")
+            }}</el-button
           >
         </div>
       </div>
@@ -56,6 +58,15 @@
                 ></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('副标题')" prop="summary">
+                <el-input
+                  v-model="form.summary"
+                  :placeholder="$t('请输入副标题')"
+                  disabled
+                ></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item :label="$t('分类')" prop="sat_notice_classid">
                 <el-select
@@ -82,14 +93,14 @@
                   style="width: 100%"
                   disabled
                 >
-                  <el-radio :label="$t(`新建`)">{{$t(`新建`)}}</el-radio>
-                  <el-radio :label="$t(`发布`)">{{$t(`发布`)}}</el-radio>
+                  <el-radio :label="$t(`新建`)">{{ $t(`新建`) }}</el-radio>
+                  <el-radio :label="$t(`发布`)">{{ $t(`发布`) }}</el-radio>
                 </el-radio-group>
               </el-form-item>
             </el-col>
           </el-form>
         </el-row>
-        <p style="font-size: 14px">{{$t('资讯封面')}}</p>
+        <p style="font-size: 14px">{{ $t("资讯封面") }}</p>
         <div style="margin-top: 10px">
           <previewImage
             v-if="form.cover"
@@ -111,10 +122,12 @@
             @onSuccess="onCoverSubmit"
           ></upload>
           <p class="info">
-            {{$t('注:建议上传图片大小')}}130x80px,{{$t('大小不超过')}}2M,{{$t('格式为')}}JPG/PNG
+            {{ $t("注:建议上传图片大小") }}130x80px,{{
+              $t("大小不超过")
+            }}2M,{{ $t("格式为") }}JPG/PNG
           </p>
         </div>
-        <p style="font-size: 14px; margin-top: 10px">{{$t('附件上传')}}</p>
+        <p style="font-size: 14px; margin-top: 10px">{{ $t("附件上传") }}</p>
         <div style="margin-top: 10px">
           <attachmentList
             :attinfos="attinfo_attachment"
@@ -133,7 +146,7 @@
             ></upload>
           </attachmentList>
         </div>
-        <p style="font-size: 14px; margin-top: 10px">{{$t('资讯正文')}}</p>
+        <p style="font-size: 14px; margin-top: 10px">{{ $t("资讯正文") }}</p>
         <div style="margin-top: 10px">
           <myEditor
             ref="editor"
@@ -181,9 +194,15 @@ export default {
         cover: "",
       },
       rules: {
-        title: [{ required: true, message: this.$t( "请输入标题名称"), trigger: "blur" }],
+        title: [
+          {
+            required: true,
+            message: this.$t("请输入标题名称"),
+            trigger: "blur",
+          },
+        ],
         sat_notice_classid: [
-          { required: true,  message: this.$t( "请选择分类"), trigger: "change" },
+          { required: true, message: this.$t("请选择分类"), trigger: "change" },
         ],
       },
       classData: [],
@@ -327,7 +346,7 @@ export default {
       });
     },
     delBtn() {
-      this.$confirm(this.$t('确定删除当前资讯吗')+"?", this.$t("提示"),{
+      this.$confirm(this.$t("确定删除当前资讯吗") + "?", this.$t("提示"), {
         confirmButtonText: this.$t("确定"),
         cancelButtonText: this.$t("取消"),
         type: "warning",
@@ -355,8 +374,8 @@ export default {
       const res = await this.$api.requested({
         id: "20240925161703",
         content: {
-          "sat_noticeid": this.form.sat_noticeid,
-          "isrecheck":this.form.status == '新建'?1:0,
+          sat_noticeid: this.form.sat_noticeid,
+          isrecheck: this.form.status == "新建" ? 1 : 0,
         },
       });
       this.tool.showMessage(res, () => {

+ 33 - 13
src/WebsiteManagement/consultManage/modules/edit.vue

@@ -5,7 +5,7 @@
       :type="disabled ? '' : 'primary'"
       @click="detailBtn((dialogFormVisible = true))"
       :disabled="disabled"
-      >{{$t(`编辑`)}}</el-button
+      >{{ $t(`编辑`) }}</el-button
     >
     <el-drawer
       :title="$t('编辑资讯')"
@@ -27,6 +27,14 @@
                 ></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('副标题')">
+                <el-input
+                  v-model="form.summary"
+                  :placeholder="$t('请输入副标题')"
+                ></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item :label="$t('分类')" prop="sat_notice_classid">
                 <el-select
@@ -48,14 +56,14 @@
             <el-col :span="24">
               <el-form-item :label="$t('状态')" prop="status">
                 <el-radio-group v-model="form.status" style="width: 100%">
-                  <el-radio label="新建`)">{{$t(`新建`)}}</el-radio>
-                  <el-radio label="发布`)">{{$t(`发布`)}}</el-radio>
+                  <el-radio label="新建">{{ $t(`新建`) }}</el-radio>
+                  <el-radio label="发布">{{ $t(`发布`) }}</el-radio>
                 </el-radio-group>
               </el-form-item>
             </el-col>
           </el-form>
         </el-row>
-        <p style="font-size: 14px">{{$t('资讯封面')}}</p>
+        <p style="font-size: 14px">{{ $t("资讯封面") }}</p>
         <div style="margin-top: 10px">
           <previewImage
             v-if="form.cover"
@@ -77,10 +85,12 @@
             @onSuccess="onCoverSubmit"
           ></upload>
           <p class="info">
-            {{$t('注:建议上传图片大小')}}130x80,{{$t('大小不超过')}}2M,{{$t('格式为')}}JPG/PNG/jpg/png
+            {{ $t("注:建议上传图片大小") }}130x80,{{ $t("大小不超过") }}2M,{{
+              $t("格式为")
+            }}JPG/PNG/jpg/png
           </p>
         </div>
-        <p style="font-size: 14px; margin-top: 10px">{{$t('附件上传')}}</p>
+        <p style="font-size: 14px; margin-top: 10px">{{ $t("附件上传") }}</p>
         <div style="margin-top: 10px">
           <attachmentList
             :attinfos="attinfo_attachment"
@@ -99,7 +109,7 @@
             ></upload>
           </attachmentList>
         </div>
-        <p style="font-size: 14px; margin-top: 10px">{{$t('资讯正文')}}</p>
+        <p style="font-size: 14px; margin-top: 10px">{{ $t("资讯正文") }}</p>
         <div style="margin-top: 10px">
           <myEditor
             ref="editor"
@@ -114,10 +124,14 @@
           @click="onCancel"
           plain
           class="normal-btn-width"
-          >{{$t(`取 消`)}}</el-button
+          >{{ $t(`取 消`) }}</el-button
         >
-        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width"
-          >{{$t(`确 定`)}}</el-button
+        <el-button
+          size="small"
+          type="primary"
+          @click="onSubmit"
+          class="normal-btn-width"
+          >{{ $t(`确 定`) }}</el-button
         >
       </div>
     </el-drawer>
@@ -156,9 +170,15 @@ export default {
         cover: "",
       },
       rules: {
-        title: [{ required: true, message: this.$t( "请输入标题名称"), trigger: "blur" }],
+        title: [
+          {
+            required: true,
+            message: this.$t("请输入标题名称"),
+            trigger: "blur",
+          },
+        ],
         sat_notice_classid: [
-          { required: true,  message: this.$t( "请选择分类"), trigger: "change" },
+          { required: true, message: this.$t("请选择分类"), trigger: "change" },
         ],
       },
       classData: [],
@@ -198,7 +218,7 @@ export default {
         content: {
           where: {
             condition: "",
-            isused:"1"
+            isused: "1",
           },
         },
       };