Bläddra i källkod

月报:分析添加标记重点问题

洪海涛 4 år sedan
förälder
incheckning
78deac3b7c

+ 36 - 8
src/views/monthlyReport/childrenPage/editReport/components/VarText.vue

@@ -5,29 +5,44 @@
         {{ name }}:
       </div>
       <div class="value">
-        <el-input
-          v-if="pageDate.status < 20 && !isHistory"
-          v-model="textValue"
-          type="textarea"
-          :placeholder="headerTitleType === 'Head2' ? `请针对${headerTitle}进行分析` : '请输入'"
-          show-word-limit
-        />
+        <el-row v-if="pageDate.status < 20 && !isHistory" type="flex" justify="space-between">
+          <el-input
+            v-model="textValue"
+            type="textarea"
+            :placeholder="headerTitleType === 'Head2' ? `请针对${headerTitle}进行分析,建议格式:【1、事实描述:XXXXXX;2、根因分析:XXXXXX;3、建议:XXXXXX。】` : '请输入'"
+            show-word-limit
+          />
+          <el-button
+            style="margin-left: 20px;margin-right: 20px;font-size: 14px;font-weight: 400;"
+            type="text"
+            @click="markingIssues"
+          >
+            标记
+          </el-button>
+        </el-row>
         <span
           v-if="pageDate.status > 10 && textValue || isHistory && textValue"
           style="display: inline-block;line-height: 1.65;background-color: #f7f7f7; padding: 10px; border-radius: 5px;"
           v-html="textValue.replace(/\n/g, '<br />')"
-          />
+        />
       </div>
     </div>
+    <span @click.stop>
+      <markingIssues ref="markingIssues" />
+    </span>
   </div>
 </template>
 
 <script>
 import { mapState } from 'vuex'
+import markingIssues from './markingIssues'
 import _ from 'lodash'
 
 export default {
   name: 'VarText',
+  components: {
+    markingIssues
+  },
   props: {
     title: {
       type: String,
@@ -84,6 +99,16 @@ export default {
   methods: {
     upData() {
       this.$emit('input', this.textValue)
+    },
+    markingIssues() {
+      this.$refs.markingIssues.modalShow = true
+      this.$nextTick(() => {
+        this.$refs.markingIssues.openModal({
+          title: '标记为重点问题',
+          normalAreaName: `${this.value}`,
+          headerTitle: this.headerTitle
+        })
+      })
     }
   }
 }
@@ -93,6 +118,7 @@ export default {
 .fixedText {
   //margin-top: 10px;
   padding-top: 10px;
+
   .top-title {
     width: 100%;
     display: flex;
@@ -126,6 +152,7 @@ export default {
     }
   }
 }
+
 .VarTextV2 {
   padding-top: 10px;
   margin-top: 5px;
@@ -136,6 +163,7 @@ export default {
   //  }
   //}
 }
+
 .fontWeight {
   font-weight: 600;
   padding-top: 10px;

+ 23 - 23
src/views/monthlyReport/childrenPage/editReport/components/markingIssues.vue

@@ -1,25 +1,25 @@
 <template>
   <div>
     <normal-dialog
-      v-if="modalShow"
-      ref="normalDialog"
-      v-loading="loading"
-      :show-dialog="false"
-      is-succes
-      :title="titleName"
-      width="45%"
-      @succes="updateModule"
+        v-if="modalShow"
+        ref="normalDialog"
+        v-loading="loading"
+        :show-dialog="false"
+        is-succes
+        :title="titleName"
+        width="45%"
+        @succes="updateModule"
     >
       <el-form :key="domKey" label-width="100px" style="padding-right: 20px;padding-left: 20px">
         <el-form-item label="问题">
           <el-input
-            v-model="normalAreaName"
-            autocomplete="off"
-            size="small"
-            type="textarea"
-            :autosize="{ minRows: 2, maxRows: 30 }"
-            show-word-limit
-            placeholder="请输入问题"
+              v-model="normalAreaName"
+              autocomplete="off"
+              size="small"
+              type="textarea"
+              :autosize="{ minRows: 2, maxRows: 30 }"
+              show-word-limit
+              placeholder="请输入问题"
           />
         </el-form-item>
         <el-form-item label="责任团队">
@@ -27,10 +27,10 @@
         </el-form-item>
         <el-form-item label="责任人">
           <searchPeople
-            ref="searchPeople"
-            style="width: 100%"
-            :value.sync="multiplePeople"
-            :multiple="true"
+              ref="searchPeople"
+              style="width: 100%"
+              :value.sync="multiplePeople"
+              :multiple="true"
           />
         </el-form-item>
       </el-form>
@@ -108,7 +108,7 @@ export default {
       this.subTitles = subTitles
       this.headerTitle = headerTitle
       if (normalAreaName) this.normalAreaName = normalAreaName
-      this.setDefaultValues()
+      // this.setDefaultValues()
       this.loading = false
     },
     // 设置默认值
@@ -166,8 +166,8 @@ export default {
           (elm) => elm.name.search(/模块/) > -1
         )[0]
         this.normalAreaName =
-          this.menuData[headerKeyMK.headerKey] &&
-          `${this.menuData[headerKeyMK.headerKey]}模块一次全量回滚`
+            this.menuData[headerKeyMK.headerKey] &&
+            `${this.menuData[headerKeyMK.headerKey]}模块一次全量回滚`
       }
       if (this.cascaderValue && this.cascaderValue.length) {
         this.setDeptCharge()
@@ -197,7 +197,7 @@ export default {
   }
 }
 </script>
-<style scoped lang='less'>
+<style scoped lang="less">
 /deep/ .el-form-item__label {
   text-align: left !important;
 }