wenbobowen 4 жил өмнө
parent
commit
69058f6121

+ 4 - 0
src/components/searchHeader/searchBox.vue

@@ -77,6 +77,10 @@ export default {
 .searchBox {
   .row {
     width: 810px;
+    margin-top: 15px;
+    &:first-child {
+      margin-top: 0;
+    }
   }
   .name {
     width: 80px;

+ 19 - 5
src/views/projectManage/onlineproblem/detial/index.vue

@@ -17,6 +17,9 @@
       <i class="el-icon-delete icon" @click="deateModel = true" />
     </div>
     <div class="content base">
+      <header class="headerH2">
+        <headTitle title="基础信息" />
+      </header>
       <baseContent
         v-if="form_data"
         :data="form_data"
@@ -52,7 +55,7 @@
           :value.sync="form_data.replayDesc"
           :empty-text="'点击'"
           :input-button="'添加复盘内容'"
-          :styles="{ padding: '12px 0 20px 0' }"
+          :styles="{ padding: '20px 0 20px 0' }"
           @change="(e) => onChange('replayDesc', e, true)"
         />
       </div>
@@ -61,8 +64,6 @@
       <header class="headerH2">
         <headTitle title="改进项" :icon="makeBetterEdit ? '' : 'el-icon-edit'" :open-btn="true" @handle="makeBetterEdit = true">
           <span slot="handleSlot">
-            <!-- <i class="el-icon-edit" @click="$emit('handle')" /> -->
-            <!-- <span></span> -->
             <span v-show="makeBetterEdit" class="makeBetterBtn" @click="makeBetterSave">
               <i class="el-icon-circle-check" />
               保存
@@ -174,7 +175,7 @@ export default {
   methods: {
     async search() {
       const res = await getDetial({ id: this.id })
-      if (res.code === 200) {
+      if (res.code === 200 && res.data) {
         this.form_data = JSON.parse(JSON.stringify(res.data))
         this.copy_form_data = JSON.parse(JSON.stringify(res.data))
         this.replayUrl = res.data.replayUrl || ''
@@ -220,6 +221,13 @@ export default {
     },
     onChange(key, value, isUpdate = false) {
       //  确保每次更新一项
+      if (key === 'title' && !value) {
+        this.$message({
+          message: '名称不能为空',
+          type: 'error'
+        })
+        return
+      }
       this.updateData = { [key]: value }
       if (isUpdate) {
         this.update()
@@ -303,7 +311,7 @@ export default {
     padding: 20px 30px;
     .makeBetter {
       width: calc(100% - 190px);
-      padding: 12px 0px 20px 0px
+      padding: 20px 0px 20px 0px
     }
     &.actionDynamic {
       padding: 0px;
@@ -311,6 +319,12 @@ export default {
         padding: 20px 30px;
       }
     }
+    &.base {
+      .headerH2 {
+        margin-top: 0px;
+        margin-bottom: 20px;
+      }
+    }
   }
   .headerH1 {
     display: flex;

+ 6 - 4
src/views/projectManage/onlineproblem/index.vue

@@ -33,19 +33,21 @@ export default {
   },
   methods: {
     async listSearch(data) {
-      const res = await getlist(data)
-      this.dataList = res.data.list || []
+      const res = await getlist({ ...data, bizId: this.$store.state.global.bizId })
+      if (res.code === 200) {
+        this.dataList = res.data.list || []
+      }
     },
     async chartSearch(key, value) {
       if (key) {
         this.chartSearchData[key] = value
       }
-      const chartData = await getChartData(this.chartSearchData)
+      const chartData = await getChartData({ ...this.chartSearchData, bizId: this.$store.state.global.bizId })
       this.chartData = chartData.data
       this.chartListSearch(chartData.data.data[0].code)
     },
     async chartListSearch(code) {
-      const chartList = await getChartListData({ ...this.chartSearchData, ...{ code }})
+      const chartList = await getChartListData({ ...this.chartSearchData, ...{ code }, bizId: this.$store.state.global.bizId })
       this.dataList = [chartList.data] || []
       // 埋点-搜索视图
       window.log({ c: 'problem', d: 'get_problem_statistic' })