Przeglądaj źródła

Merge branch 'usecase_daily_0.0.2' into http_test

洪海涛 4 lat temu
rodzic
commit
28aefb27c6
2 zmienionych plików z 203 dodań i 195 usunięć
  1. 15 15
      src/router/newRouter.js
  2. 188 180
      src/views/ToConfigure/components/bizConfigure.vue

+ 15 - 15
src/router/newRouter.js

@@ -355,21 +355,21 @@ const layout = [
       }
     ]
   },
-  {
-    path: '/dataBigManage',
-    name: '数据大盘',
-    component: Layout,
-    icon: 'data-big',
-    redirect: '/dataBigManage/index',
-    children: [
-      {
-        path: 'index',
-        name: '数据大盘',
-        component: () => import('@/views/dataBigManage/index.vue'),
-        meta: { title: '数据大盘' }
-      }
-    ]
-  },
+  // {
+  //   path: '/dataBigManage',
+  //   name: '数据大盘',
+  //   component: Layout,
+  //   icon: 'data-big',
+  //   redirect: '/dataBigManage/index',
+  //   children: [
+  //     {
+  //       path: 'index',
+  //       name: '数据大盘',
+  //       component: () => import('@/views/dataBigManage/index.vue'),
+  //       meta: { title: '数据大盘' }
+  //     }
+  //   ]
+  // },
   {
     path: '/monthlyReport',
     name: '质量月报',

+ 188 - 180
src/views/ToConfigure/components/bizConfigure.vue

@@ -1,180 +1,188 @@
-<template>
-  <div style="margin: 0 10px;">
-    <p class="biz_property">
-      业务线属性
-      <i v-if="Prohibit" class="el-icon-edit icon-sty" @click="Prohibit = false" />
-    </p>
-    <el-radio-group v-model="radio" :disabled="Prohibit" class="biz_radio">
-      <el-radio label="0"> 公开 </el-radio>
-      <el-radio label="1"> 私密(仅成员可见)</el-radio>
-    </el-radio-group>
-    <el-button v-if="!Prohibit" size="small" class="biz_buttom" @click="cancel"> 取消 </el-button>
-    <el-button v-if="!Prohibit" size="small" class="biz_buttom" type="primary" @click="preservation"> 保存 </el-button>
-    <!--- ck ---->
-    <p class="biz_property">
-      提测前checklist拦截
-      <el-tooltip class="item" effect="dark" content="设置为拦截后,业务线发送提测报告前会校验checklist是否已创建" placement="top">
-        <i class="el-icon-info" />
-      </el-tooltip>
-      <i v-if="!isCkEdit" class="el-icon-edit icon-sty" @click="isCkEdit = true" />
-    </p>
-    <el-radio-group v-model="ckStatus" :disabled="!isCkEdit" class="biz_radio">
-      <el-radio label="1"> 拦截 </el-radio>
-      <el-radio label="0"> 不拦截</el-radio>
-    </el-radio-group>
-    <el-button v-if="isCkEdit" size="small" class="biz_buttom" @click="cancel"> 取消 </el-button>
-    <el-button v-if="isCkEdit" size="small" class="biz_buttom" type="primary" @click="preservation"> 保存 </el-button>
-    <!-- ck -->
-    <div v-if="bizObj.fromDpm">
-      <p class="biz_property">
-        排期同步望岳
-        <el-tooltip class="item" effect="dark" content="设置质惠排期调整后同步到望岳的时间。可配置时间范围为5~60分钟。默认30分钟。" placement="top">
-          <i class="el-icon-info" />
-        </el-tooltip>
-        <i v-if="Schedule" class="el-icon-edit icon-sty" @click="Schedule = false" />
-      </p>
-      <div v-if="Schedule" class="biz-Wangyue biz_radio"> {{ num }} 分钟</div>
-      <div v-if="!Schedule" class="biz_layout biz_radio">
-        <el-input-number v-if="!Schedule" v-model="num" size="mini" :min="5" :max="60" :controls="false" controls-position="right" />
-        <div v-if="!Schedule" class="biz-Wangyue" style="margin-left: 10px;"> 分钟</div>
-        <el-button v-if="!Schedule" size="small" class="biz_buttom" @click="cloneSchedule"> 取消 </el-button>
-        <el-button v-if="!Schedule" size="small" class="biz_buttom" type="primary" @click="changeSchedule"> 保存 </el-button>
-      </div>
-    </div>
-    <!-- 任务关闭 -->
-    <p class="biz_property">
-      任务关闭
-      <i v-if="taskBtnShow" class="el-icon-edit icon-sty" @click="taskBtnShow = false" />
-    </p>
-    <el-radio-group v-model="taskClose" :disabled="taskBtnShow" class="biz_radio">
-      <el-radio :label="1"> 允许 </el-radio>
-      <el-radio :label="0"> 不允许</el-radio>
-    </el-radio-group>
-    <el-button v-if="!taskBtnShow" size="small" class="biz_buttom" @click="cancel"> 取消 </el-button>
-    <el-button v-if="!taskBtnShow" size="small" class="biz_buttom" type="primary" @click="preservation"> 保存 </el-button>
-    <p class="biz_property">
-      是否需要技术文档
-      <i v-if="file" class="el-icon-edit icon-sty" @click="file = false" />
-    </p>
-    <el-radio-group v-model="isTaskDoc" :disabled="file" class="biz_radio">
-      <el-radio :label="1"> 是 </el-radio>
-      <el-radio :label="0"> 否</el-radio>
-    </el-radio-group>
-    <el-button v-if="!file" size="small" class="biz_buttom" @click="cancel"> 取消 </el-button>
-    <el-button v-if="!file" size="small" class="biz_buttom" type="primary" @click="preservation"> 保存 </el-button>
-  </div>
-</template>
-
-<script>
-import { mapGetters } from 'vuex'
-import { settingGetBizList, settingUpdateBiz, updateBiz } from '@/api/toConfigure.js'
-export default {
-  data() {
-    return {
-      radio: '1',
-      taskClose: 0, // 任务关闭code
-      isTaskDoc: 0,
-      Prohibit: true,
-      taskBtnShow: true, // 任务关闭按钮
-      file: true, // 是否需要技术文档
-      Schedule: true, // 排期同步望岳
-      isCkEdit: false, // checklist编辑
-      ckStatus: '0', // ckecklist状态
-      bizObj: {},
-      num: 30
-    }
-  },
-  computed: {
-    ...mapGetters(['bizId'])
-  },
-  watch: {
-    bizId: {
-      handler(newV) {
-        if (newV === -1) return
-        this.getBizIdList()
-      },
-      immediate: true
-    }
-  },
-  methods: {
-    async getBizIdList() { // 获取业务线属性
-      const res = await settingGetBizList({ id: this.bizId })
-      if (res.code === 200) {
-        this.bizObj = res.data[0]
-        this.num = this.bizObj.syncScheduleDpm
-        this.radio = JSON.stringify(this.bizObj.isSecret)
-        this.ckStatus = '' + this.bizObj.isChecklistIntercept
-        this.taskClose = this.bizObj.isTaskClose
-        this.isTaskDoc = this.bizObj.isTaskDoc
-      }
-    },
-    async preservation() { // 保存业务线配置
-      const res = await settingUpdateBiz({ id: this.bizId, isSecret: Number(this.radio), bizName: this.bizObj.name, isChecklistIntercept: Number(this.ckStatus), isTaskClose: this.taskClose, isTaskDoc: this.isTaskDoc })
-      if (res.code === 200) {
-        this.Prohibit = true
-        this.taskBtnShow = true
-        this.isCkEdit = false
-        this.file = true
-        this.$message({ message: '修改成功', type: 'success', duration: 1000, offset: 150 })
-      }
-    },
-    cancel() {
-      this.Prohibit = true
-      this.taskBtnShow = true
-      this.file = true
-      this.isCkEdit = false
-      this.radio = JSON.stringify(this.bizObj.isSecret)
-      this.ckStatus = '' + this.bizObj.isChecklistIntercept
-    },
-    async changeSchedule() { // 设置同步望岳时间
-      const res = await updateBiz({ id: this.bizId, syncScheduleDpm: this.num })
-      if (res.code === 200) {
-        this.getBizIdList()
-        this.Schedule = true
-        this.$message({ message: `修改时间为 ${this.num} 分钟`, type: 'success', duration: 1000, offset: 150 })
-      }
-    },
-    cloneSchedule() {
-      this.num = this.bizObj.syncScheduleDpm
-      this.Schedule = true
-      this.$message({ message: '已取消修改', type: 'success', duration: 1000, offset: 150 })
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-.biz_property {
-  font-size: 16px;
-  line-height: 22px;
-  color: #444444;
-}
-.biz_buttom {
-  width: 70px;
-}
-.biz_radio {
-  margin: 20px 30px 30px 0;
-}
-.biz_layout {
-  display: flex;
-  justify-content: flex-start;
-}
-.icon-sty {
-  margin-left: 10px;
-  color: #409EFF;
-  cursor: pointer;
-}
-.biz-Wangyue {
-  margin-right: 30px;
-  font-size: 14px;
-  font-family: MicrosoftYaHei;
-  line-height: 28px;
-  color: #444444;
-}
-</style>
-
-<style lang="less">
-.el-tooltip__popper.is-dark {
-    max-width: 200px;
-  }
-</style>
+<template>
+  <div style="margin: 0 10px;">
+    <p class="biz_property">
+      业务线属性
+      <i v-if="Prohibit" class="el-icon-edit icon-sty" @click="Prohibit = false" />
+    </p>
+    <el-radio-group v-model="radio" :disabled="Prohibit" class="biz_radio">
+      <el-radio label="0"> 公开 </el-radio>
+      <el-radio label="1"> 私密(仅成员可见)</el-radio>
+    </el-radio-group>
+    <el-button v-if="!Prohibit" size="small" class="biz_buttom" @click="cancel"> 取消 </el-button>
+    <el-button v-if="!Prohibit" size="small" class="biz_buttom" type="primary" @click="preservation('bizAttr')"> 保存 </el-button>
+    <!--- ck ---->
+    <p class="biz_property">
+      提测前checklist拦截
+      <el-tooltip class="item" effect="dark" content="设置为拦截后,业务线发送提测报告前会校验checklist是否已创建" placement="top">
+        <i class="el-icon-info" />
+      </el-tooltip>
+      <i v-if="!isCkEdit" class="el-icon-edit icon-sty" @click="isCkEdit = true" />
+    </p>
+    <el-radio-group v-model="ckStatus" :disabled="!isCkEdit" class="biz_radio">
+      <el-radio label="1"> 拦截 </el-radio>
+      <el-radio label="0"> 不拦截</el-radio>
+    </el-radio-group>
+    <el-button v-if="isCkEdit" size="small" class="biz_buttom" @click="cancel"> 取消 </el-button>
+    <el-button v-if="isCkEdit" size="small" class="biz_buttom" type="primary" @click="preservation('checklist')"> 保存 </el-button>
+    <!-- ck -->
+    <div v-if="bizObj.fromDpm">
+      <p class="biz_property">
+        排期同步望岳
+        <el-tooltip class="item" effect="dark" content="设置质惠排期调整后同步到望岳的时间。可配置时间范围为5~60分钟。默认30分钟。" placement="top">
+          <i class="el-icon-info" />
+        </el-tooltip>
+        <i v-if="Schedule" class="el-icon-edit icon-sty" @click="Schedule = false" />
+      </p>
+      <div v-if="Schedule" class="biz-Wangyue biz_radio"> {{ num }} 分钟</div>
+      <div v-if="!Schedule" class="biz_layout biz_radio">
+        <el-input-number v-if="!Schedule" v-model="num" size="mini" :min="5" :max="60" :controls="false" controls-position="right" />
+        <div v-if="!Schedule" class="biz-Wangyue" style="margin-left: 10px;"> 分钟</div>
+        <el-button v-if="!Schedule" size="small" class="biz_buttom" @click="cloneSchedule"> 取消 </el-button>
+        <el-button v-if="!Schedule" size="small" class="biz_buttom" type="primary" @click="changeSchedule"> 保存 </el-button>
+      </div>
+    </div>
+    <!-- 任务关闭 -->
+    <p class="biz_property">
+      任务关闭
+      <i v-if="taskBtnShow" class="el-icon-edit icon-sty" @click="taskBtnShow = false" />
+    </p>
+    <el-radio-group v-model="taskClose" :disabled="taskBtnShow" class="biz_radio">
+      <el-radio :label="1"> 允许 </el-radio>
+      <el-radio :label="0"> 不允许</el-radio>
+    </el-radio-group>
+    <el-button v-if="!taskBtnShow" size="small" class="biz_buttom" @click="cancel"> 取消 </el-button>
+    <el-button v-if="!taskBtnShow" size="small" class="biz_buttom" type="primary" @click="preservation('taskClose')"> 保存 </el-button>
+    <p class="biz_property">
+      是否需要技术文档
+      <i v-if="file" class="el-icon-edit icon-sty" @click="file = false" />
+    </p>
+    <el-radio-group v-model="isTaskDoc" :disabled="file" class="biz_radio">
+      <el-radio :label="1"> 是 </el-radio>
+      <el-radio :label="0"> 否</el-radio>
+    </el-radio-group>
+    <el-button v-if="!file" size="small" class="biz_buttom" @click="cancel"> 取消 </el-button>
+    <el-button v-if="!file" size="small" class="biz_buttom" type="primary" @click="preservation('techDoc')"> 保存 </el-button>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from 'vuex'
+import { settingGetBizList, settingUpdateBiz, updateBiz } from '@/api/toConfigure.js'
+export default {
+  data() {
+    return {
+      radio: '1',
+      taskClose: 0, // 任务关闭code
+      isTaskDoc: 0,
+      Prohibit: true,
+      taskBtnShow: true, // 任务关闭按钮
+      file: true, // 是否需要技术文档
+      Schedule: true, // 排期同步望岳
+      isCkEdit: false, // checklist编辑
+      ckStatus: '0', // ckecklist状态
+      bizObj: {},
+      num: 30
+    }
+  },
+  computed: {
+    ...mapGetters(['bizId'])
+  },
+  watch: {
+    bizId: {
+      handler(newV) {
+        if (newV === -1) return
+        this.getBizIdList()
+      },
+      immediate: true
+    }
+  },
+  methods: {
+    async getBizIdList() { // 获取业务线属性
+      const res = await settingGetBizList({ id: this.bizId })
+      if (res.code === 200) {
+        this.bizObj = res.data[0]
+        this.num = this.bizObj.syncScheduleDpm
+        this.radio = JSON.stringify(this.bizObj.isSecret)
+        this.ckStatus = '' + this.bizObj.isChecklistIntercept
+        this.taskClose = this.bizObj.isTaskClose
+        this.isTaskDoc = this.bizObj.isTaskDoc
+      }
+    },
+    async preservation(type = '') { // 保存业务线配置
+      const res = await settingUpdateBiz({
+        id: this.bizId,
+        isSecret: Number(this.radio),
+        bizName: this.bizObj.name,
+        isChecklistIntercept: Number(this.ckStatus),
+        isTaskClose: this.taskClose,
+        type: type,
+        isTaskDoc: this.isTaskDoc
+      })
+      if (res.code === 200) {
+        this.Prohibit = true
+        this.taskBtnShow = true
+        this.isCkEdit = false
+        this.file = true
+        this.$message({ message: '修改成功', type: 'success', duration: 1000, offset: 150 })
+      }
+    },
+    cancel() {
+      this.Prohibit = true
+      this.taskBtnShow = true
+      this.file = true
+      this.isCkEdit = false
+      this.radio = JSON.stringify(this.bizObj.isSecret)
+      this.ckStatus = '' + this.bizObj.isChecklistIntercept
+    },
+    async changeSchedule() { // 设置同步望岳时间
+      const res = await updateBiz({ id: this.bizId, syncScheduleDpm: this.num })
+      if (res.code === 200) {
+        this.getBizIdList()
+        this.Schedule = true
+        this.$message({ message: `修改时间为 ${this.num} 分钟`, type: 'success', duration: 1000, offset: 150 })
+      }
+    },
+    cloneSchedule() {
+      this.num = this.bizObj.syncScheduleDpm
+      this.Schedule = true
+      this.$message({ message: '已取消修改', type: 'success', duration: 1000, offset: 150 })
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.biz_property {
+  font-size: 16px;
+  line-height: 22px;
+  color: #444444;
+}
+.biz_buttom {
+  width: 70px;
+}
+.biz_radio {
+  margin: 20px 30px 30px 0;
+}
+.biz_layout {
+  display: flex;
+  justify-content: flex-start;
+}
+.icon-sty {
+  margin-left: 10px;
+  color: #409EFF;
+  cursor: pointer;
+}
+.biz-Wangyue {
+  margin-right: 30px;
+  font-size: 14px;
+  font-family: MicrosoftYaHei;
+  line-height: 28px;
+  color: #444444;
+}
+</style>
+
+<style lang="less">
+.el-tooltip__popper.is-dark {
+    max-width: 200px;
+  }
+</style>