Browse Source

官网bug修复

qymljy 1 year ago
parent
commit
e8f622d8eb

+ 17 - 12
src/Form/caseManage/add.vue

@@ -4,7 +4,7 @@
     <el-drawer
         title="新增案例"
         :visible.sync="dialogFormVisible"
-        size="60%"
+        size="70%"
         direction="rtl"
         append-to-body
         :show-close="false"
@@ -52,16 +52,11 @@
                 <p class="info">注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG</p>
               </el-form-item>
             </el-col>
-            <el-col :span="24">
-              <el-form-item label="内容" prop="notes">
-                <myEditor ref="editor" :content="form.content" :id="form.sat_sharematerialid"></myEditor>
-              </el-form-item>
-            </el-col>
           </el-form>
         </el-row>
         <div>
           <div style="font-size: 16px;font-weight: bold;margin-bottom: 10px">关联产品</div>
-          <addProduct :sat_sharematerialid="form.sat_sharematerialid" style="margin-bottom: 10px" @selectData="selectData"></addProduct>
+          <addProduct ref="addProductRef" :sat_sharematerialid="form.sat_sharematerialid" style="margin-bottom: 10px" @selectData="selectData" ></addProduct>
           <tableNewLayout ref="tableRef" :checkbox="false" :custom="true" :data="list" :layout="tablecols"
                           :opwidth="200" :width="true" height="300px">
             <template v-slot:customcol="scope">
@@ -87,6 +82,10 @@
             </el-pagination>
           </div>
         </div>
+        <p style="font-size: 14px;margin-top: 10px">内容</p>
+        <div style="margin-top: 10px">
+          <myEditor ref="editor" :content="form.content" :id="form.sat_sharematerialid"></myEditor>
+        </div>
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" type="primary" @click="onCancel" plain class="normal-btn-width" >取 消</el-button>
@@ -252,13 +251,19 @@ export default {
         "id": "20240801133803",
         "content": {
           "sat_sharematerialid": this.form.sat_sharematerialid,
-          "sat_sharematerial_itemsid": data.sat_sharematerial_itemsid,
-          "itemid": data.itemid
-
+          "iteminfos":[
+            {
+              "sat_sharematerial_itemsid": 0,
+              "itemid": data.itemid
+            }
+          ]
         }
       })
-      this.productParam.content.sat_sharematerialid = this.form.sat_sharematerialid
-      this.productData()
+      this.$nextTick(()=>{
+        this.productParam.content.sat_sharematerialid = this.form.sat_sharematerialid
+        this.productData(this.productParam.content.pageNumber = 1)
+        this.$refs.addProductRef.listData()
+      })
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);

+ 4 - 4
src/Form/consultManage/add.vue

@@ -60,10 +60,6 @@
                   @onSuccess="onCoverSubmit"></upload>
           <p class="info">注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG</p>
         </div>
-        <p style="font-size: 14px;margin-top: 10px">资讯正文</p>
-        <div style="margin-top: 10px">
-          <myEditor ref="editor" :content="form.content" :id="form.sat_noticeid"></myEditor>
-        </div>
         <p style="font-size: 14px;margin-top: 10px">附件上传</p>
         <div style="margin-top: 10px">
           <attachmentList :attinfos="attinfo_attachment" @onSuccess="queryNoticeMain" :onlyread="store.state.pageOnlyRead">
@@ -72,6 +68,10 @@
                     @onSuccess="onUploadSuccess"></upload>
           </attachmentList>
         </div>
+        <p style="font-size: 14px;margin-top: 10px">资讯正文</p>
+        <div style="margin-top: 10px">
+          <myEditor ref="editor" :content="form.content" :id="form.sat_noticeid"></myEditor>
+        </div>
       </div>
 
       <div class="fixed__btn__panel">

+ 9 - 5
src/WebsiteManagement/caseManage/modules/addProduct.vue

@@ -13,7 +13,7 @@
         <el-input  style="width:200px;margin-bottom: 10px" placeholder="搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
         </el-input>
         <tableNewLayout  ref="tableRef" :checkbox="false" :custom="true" :data="list" :layout="tablecols"
-                        :opwidth="200" :width="true" height="calc(100vh - 200px)">
+                        :opwidth="200" :width="true" height="calc(100vh - 200px)" >
           <template v-slot:customcol="scope">
             <div v-if="scope.column.columnname === 'attinfos'">
               <previewImage v-if="scope.column.data.attinfos[0]" class="image" :image="scope.column.data.attinfos[0]" :list="scope.column.data.attinfos" :deletebtn="false"></previewImage>
@@ -21,7 +21,7 @@
             <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
           </template>
           <template v-slot:opreation="scope">
-            <el-button type="text" @click="selectClick(scope.data)">选择</el-button>
+            <el-button type="text" @click="selectClick(scope.data)" :loading="loading">选择</el-button>
           </template>
         </tableNewLayout>
         <div class="container normal-panel" style="text-align:right">
@@ -66,7 +66,8 @@ export default {
           }
 
         }
-      }
+      },
+      loading:false
     }
   },
   methods:{
@@ -80,9 +81,10 @@ export default {
       this.list = res.data
       this.total = res.total
       this.currentPage = res.pageNumber
+      this.loading = false
     },
     selectClick(data){
-      this.drawer = false
+      this.loading = true
       this.$emit('selectData',data)
     },
     handleSizeChange(val) {
@@ -95,7 +97,9 @@ export default {
       this.param.content.pageNumber = val
       this.listData()
     },
-    closeDrawer(){}
+    closeDrawer(){
+      this.drawer = false
+    },
   },
   created() {
     this.tablecols = this.tool.tabelCol(this.$route.name).addProductTable.tablecols

+ 18 - 12
src/WebsiteManagement/caseManage/modules/edit.vue

@@ -4,7 +4,7 @@
     <el-drawer
         title="编辑案例"
         :visible.sync="dialogFormVisible"
-        size="60%"
+        size="70%"
         direction="rtl"
         append-to-body
         :show-close="false"
@@ -52,16 +52,11 @@
                 <p class="info">注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG</p>
               </el-form-item>
             </el-col>
-            <el-col :span="24">
-              <el-form-item label="内容" prop="notes">
-                <myEditor ref="editor" :content="form.content" :id="form.sat_sharematerialid"></myEditor>
-              </el-form-item>
-            </el-col>
           </el-form>
         </el-row>
         <div>
           <div style="font-size: 16px;font-weight: bold;margin-bottom: 10px">关联产品</div>
-          <addProduct :sat_sharematerialid="form.sat_sharematerialid" style="margin-bottom: 10px" @selectData="selectData"></addProduct>
+          <addProduct ref="addProductRef" :sat_sharematerialid="form.sat_sharematerialid" style="margin-bottom: 10px" @selectData="selectData"></addProduct>
           <tableNewLayout ref="tableRef" :checkbox="false" :custom="true" :data="list" :layout="tablecols"
                           :opwidth="200" :width="true" height="300px">
             <template v-slot:customcol="scope">
@@ -86,6 +81,10 @@
                 :total="total">
             </el-pagination>
           </div>
+          <p style="font-size: 14px;margin-top: 10px">内容</p>
+          <div style="margin-top: 10px">
+            <myEditor ref="editor" :content="form.content" :id="form.sat_sharematerialid"></myEditor>
+          </div>
         </div>
       </div>
       <div class="fixed__btn__panel">
@@ -225,7 +224,7 @@ export default {
       this.form.image = ''
       this.form.cover = ''
       this.form.sat_sharematerialid = 0
-      this.$emit('onSuccess')
+      this.$emit('editSuccess')
     },
     clearCover() {
       this.form.cover = null
@@ -255,13 +254,20 @@ export default {
         "id": "20240801133803",
         "content": {
           "sat_sharematerialid": this.form.sat_sharematerialid,
-          "sat_sharematerial_itemsid": data.sat_sharematerial_itemsid,
-          "itemid": data.itemid
+          "iteminfos":[
+            {
+              "sat_sharematerial_itemsid": 0,
+              "itemid": data.itemid
+            }
+          ]
 
         }
       })
-      this.productParam.content.sat_sharematerialid = this.form.sat_sharematerialid
-      this.productData()
+      this.$nextTick(()=>{
+        this.productParam.content.sat_sharematerialid = this.form.sat_sharematerialid
+        this.productData(this.productParam.content.pageNumber = 1)
+        this.$refs.addProductRef.listData()
+      })
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);

+ 19 - 2
src/WebsiteManagement/consultManage/modules/classManage.vue

@@ -53,6 +53,7 @@
 
 <script>
 import tableNewLayout from '@/components/dynamic-newTable/index2'
+import {Message} from "element-ui";
 export default {
   name: "classManage",
   components:{tableNewLayout},
@@ -128,9 +129,25 @@ export default {
             "sat_notice_classids":[row.sat_notice_classid]
           }
         })
-        this.tool.showMessage(res,()=>{
+        /*this.tool.showMessage(res,()=>{
           this.listData()
-        })
+        })*/
+        if (res.code == 0){
+          Message({
+            message: res.data[0].errmsg,
+            type: 'error',
+            duration:3000,
+            showClose:true
+          });
+        }else {
+          Message({
+            message: '操作成功',
+            type: 'success',
+            duration:3000,
+            showClose:true
+          });
+        }
+        this.listData()
       }).catch(() => {
         this.$message({
           type: 'info',

+ 1 - 1
src/WebsiteManagement/consultManage/modules/detailInfo.vue

@@ -66,7 +66,7 @@
         <div style="margin-top: 10px">
           <previewImage v-if="form.cover" style="width:256px" :image="image"
                         @onSuccess="clearCover"></previewImage>
-          <upload v-else btntype="image" :folderid="folderid" accept=".JPG,.PNG"
+          <upload v-else btntype="image" :folderid="folderid" accept=".JPG,.PNG" :disabled="true"
                   :bindData="{ ownertable: 'sat_notice', ownerid: form.sat_noticeid, usetype: 'cover' }"
                   @onSuccess="onCoverSubmit"></upload>
           <p class="info">注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG</p>

+ 4 - 4
src/WebsiteManagement/consultManage/modules/edit.vue

@@ -60,10 +60,6 @@
                   @onSuccess="onCoverSubmit"></upload>
           <p class="info">注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG</p>
         </div>
-        <p style="font-size: 14px;margin-top: 10px">资讯正文</p>
-        <div style="margin-top: 10px">
-          <myEditor ref="editor" :content="form.content" :id="form.sat_noticeid"></myEditor>
-        </div>
         <p style="font-size: 14px;margin-top: 10px">附件上传</p>
         <div style="margin-top: 10px">
           <attachmentList :attinfos="attinfo_attachment" @onSuccess="queryNoticeMain" :onlyread="store.state.pageOnlyRead">
@@ -72,6 +68,10 @@
                     @onSuccess="onUploadSuccess"></upload>
           </attachmentList>
         </div>
+        <p style="font-size: 14px;margin-top: 10px">资讯正文</p>
+        <div style="margin-top: 10px">
+          <myEditor ref="editor" :content="form.content" :id="form.sat_noticeid"></myEditor>
+        </div>
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" type="primary" @click="onCancel" plain class="normal-btn-width" >取 消</el-button>

+ 2 - 2
src/components/previewImage/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="image-panel">
-    <el-image 
+    <el-image
       v-if="image.url"
       ref="preview"
       style="width: 100%;height:100%"
@@ -74,4 +74,4 @@ export default {
   font-size: 16px;
   background: rgba(0,0,0,.8);
 }
-</style>
+</style>

+ 1 - 2
src/components/upload/hw_obs_upload.vue

@@ -5,7 +5,7 @@
       <i class="el-icon-plus"></i>
     </div>
     <!-- 图片类型 -->
-    <div v-else-if="btntype === 'image'" @click="dialogUploadVisible = true" class="image-upload-btn">
+    <div v-else-if="btntype === 'image'" @click="dialogUploadVisible = true" class="image-upload-btn" :style="disabled?'pointerEvents: none':'pointerEvents: auto'">
       <i class="el-icon-plus"></i>
     </div>
     <!-- 宽图类型 -->
@@ -90,7 +90,6 @@ export default {
   },
   methods: {
     handleChange (file, filelist) {
-      console.log(file)
       this.filelist = filelist
       var index = file.raw.name.lastIndexOf(".");
       var ext = file.name.substr(index + 1);