戴艳蓉 3 years ago
parent
commit
11365dbe92

+ 9 - 10
src/components/Tinymce/index.vue

@@ -120,7 +120,6 @@ export default {
       const _this = this;
       window.tinymce.init({
         selector: `#${this.tinymceId}`,
-
         content_style:
           "html,body { width: 100%;height: 100%;position: relative; background: transparent;padding:0;margin: 0;box-sizing: border-box;} body{padding:16px} p{margin:0;line-height:40px} img{ display: inline-block;}",
         language: this.languageTypeList["zh"],
@@ -147,7 +146,7 @@ export default {
             editor.setContent(_this.value);
           }
           _this.hasInit = true;
-          editor.on("NodeChange Change KeyUp SetContent", () => {
+          editor.on("NodeChange Change KeyUp SetContent", () => { //节点更改密钥设置内容
             this.hasChange = true;
             this.$emit("input", editor.getContent());
           });
@@ -177,7 +176,7 @@ export default {
         //   return img
         // },
         images_upload_handler(blobInfo, success, failure, progress) {
-          console.log(blobInfo.blob());
+          // console.log(blobInfo.blob());
           // console.log(success);
           // console.log(failure);
           // console.log(progress);
@@ -241,13 +240,13 @@ export default {
     getContent() {
       window.tinymce.get(this.tinymceId).getContent();
     },
-    imageSuccessCBK(arr) {
-      arr.forEach((v) =>
-        window.tinymce
-          .get(this.tinymceId)
-          .insertContent(`<img class="wscnph" src="${v.url}" >`)
-      );
-    },
+    // imageSuccessCBK(arr) {
+    //   arr.forEach((v) =>
+    //     window.tinymce
+    //       .get(this.tinymceId)
+    //       .insertContent(`<img class="wscnph" src="${v.url}" >`)
+    //   );
+    // },
   },
 };
 </script>

+ 1 - 1
src/views/purchaseAndSale/adjust/addEdit.vue

@@ -157,7 +157,7 @@ export default {
           this.$refs.ruleForm.clearValidate();
 
           this.ruleForm = {
-            title: "我是一个标题", // 账号
+            title: "", // 账号
             company_type: platformType,
             model_id: [], // 功能区
             remark: `<h4>【故障现象描述:】</h4>\n<p style="font-size: 12px;">必填 Ctrl+V粘贴截图</p>\n<h4>【期望结果描述:】</h4>\n<p style="font-size: 12px;">必填 Ctrl+V粘贴截图</p>`,

+ 50 - 21
src/views/purchaseAndSale/adjust/detail.vue

@@ -3,7 +3,6 @@
     <div
       v-if="powers && powers.length > 0 && powers.some((item) => item == '007')"
     >
-      {{ powers }}
       <div class="left">
         <div class="title clear">
           <div class="title-left">#{{ ruleForm.bugNo }}</div>
@@ -20,7 +19,7 @@
         <div class="stockApply-com">
           <el-tabs :size="'mini'" v-model="activeName">
             <el-tab-pane label="描述详情" name="1">
-              <div class="desc">
+              <div class="desc" v-if="powers.some((item) => item == '005')">
                 <tinymce
                   v-if="newTime !== ''"
                   v-model="ruleForm.remark"
@@ -28,9 +27,12 @@
                   :height="'350px'"
                 />
               </div>
-              <div class="desc">
-                <div v-html="html" class="show-html"></div>
+              <div class="desc" v-else>
+                <div class="desc-main">
+                  <div v-html="ruleForm.remark" class="show-html"></div>
+                </div>
               </div>
+
               <div class="pinglun">
                 <div class="pinglun-title">评论</div>
                 <div
@@ -101,15 +103,16 @@
                 </div>
                 <div
                   class="my-page"
-                  v-if="pageInfo.total > 5"
-                  style="margin: -40px 0 0 0"
+                  v-if="parmValue.total > 5"
                 >
                   <el-pagination
                     @current-change="handleCurrentChange"
-                    :current-page="pageInfo.page"
-                    :page-size="pageInfo.size"
+                    @prev-click='handleCurrentChange'
+                    @next-click='handleCurrentChange'
+                    :current-page="parmValue.page"
+                    :page-size="parmValue.size"
                     layout="total, prev, pager, next"
-                    :total="pageInfo.total"
+                    :total="parmValue.total"
                   >
                   </el-pagination>
                 </div>
@@ -127,7 +130,10 @@
           <el-button
             class="fr"
             :size="'mini'"
-            v-if="!isDetail"
+            v-if="
+              powers.some((item) => item == '005') ||
+              powers.some((item) => item == '012')
+            "
             type="primary"
             style="margin: 6px 0 0 0"
             @click="submitForm"
@@ -232,7 +238,12 @@
             />
           </el-form-item>
           <el-form-item label="创建人:">
-            <div class="show-input">{{ ruleForm.apply_name }}</div>
+            <div
+              class="show-input"
+              :class="{ disabled: !powers.some((item) => item == '012') }"
+            >
+              {{ ruleForm.apply_name }}
+            </div>
           </el-form-item>
 
           <el-form-item label="创建人部门:">
@@ -314,13 +325,9 @@ export default {
         page: 1, // 页码
         size: 5, // 每页显示条数
         id: this.queryId,
-      },
-      tableData: [],
-      pageInfo: {
-        size: 5,
-        curr: 1,
         total: 0,
       },
+      tableData: [],
       bugNo: "",
       statusOptions: statusOptions,
       levelOptions: levelOptions,
@@ -343,13 +350,13 @@ export default {
   },
   methods: {
     async handleCurrentChange(val) {
+      console.log(val);
       this.parmValue.page = val;
-      this.pageInfo.curr = val;
       await this.searchList();
     },
     async initForm() {
       this.loading = true;
-      this.newTime=""
+      this.newTime = "";
       this.InitializeForm();
       await this.resetForm();
       await this.initData();
@@ -491,7 +498,7 @@ export default {
     },
     // 刷新表格
     async searchList() {
-      this.tableData = [];
+      // this.tableData = [];
       this.parmValue.id = this.queryId;
       const res = await asyncRequest.cloudlist(this.parmValue);
       if (res && res.code === 0 && res.data) {
@@ -500,12 +507,12 @@ export default {
           v.edit = false;
         });
         this.tableData = list;
-        this.pageInfo.total = Number(count);
+        this.parmValue.total = Number(count);
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
       } else {
         this.tableData = [];
-        this.pageInfo.total = 0;
+        this.parmValue.total = 0;
       }
     },
     // 重置
@@ -645,6 +652,18 @@ export default {
       width: 100%;
       box-sizing: border-box;
       padding: 0 2px 0 0;
+      height: 421px;
+
+      .desc-main {
+        position: relative;
+        border: 2px solid #dfe4ed;
+        line-height: 40px;
+        width: 100%;
+        height: 100%;
+        padding: 16px;
+        box-sizing: border-box;
+        overflow-y: scroll;
+      }
     }
     .pinglun {
       width: 100%;
@@ -745,6 +764,12 @@ export default {
         }
       }
     }
+    .my-page{
+      position: relative;
+      margin: -30px 0 10px 0;
+      width: 100%;
+      box-sizing: border-box;
+    }
   }
   .right {
     width: 350px;
@@ -793,6 +818,10 @@ export default {
             background: rgb(242, 245, 250);
           }
         }
+        &.disabled {
+          color: #c0c4cc !important;
+          // cursor: not-allowed !important;
+        }
         &.hei {
           height: auto !important;
           line-height: 28px auto !important;