|
@@ -215,7 +215,6 @@
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
:default-time="['00:00:00','23:59:59']"
|
|
|
:picker-options="pickerOptions"
|
|
|
- @change="changDate"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -271,11 +270,11 @@
|
|
|
|
|
|
<script>
|
|
|
const _ = require('lodash')
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
import bugTableDialog from '@/views/projectManage/bugList/details/bugTableDialog' // 缺陷主页表格
|
|
|
import createdBug from '@/views/projectManage/bugList/file/createdBug' // 新建缺陷
|
|
|
import normalDialog from '@/components/dialog/normalDialog'
|
|
|
import filterList from '@/views/projectManage/bugList/details/filterList' // 筛选过滤器
|
|
|
-import { deepClone } from '@/utils/global'
|
|
|
import searchPeople from '@/components/select/searchPeople' // 人员select
|
|
|
import '@/styles/PublicStyle/index.scss'
|
|
|
import {
|
|
@@ -370,6 +369,20 @@ export default {
|
|
|
indexPage: {}
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['bizId'])
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ bizId: {
|
|
|
+ handler(newV) {
|
|
|
+ if (newV === -1) return
|
|
|
+ this.bugListSelect() // 获取下拉option
|
|
|
+ this.taskListCreate() // 获取所属任务
|
|
|
+ this.getFilterList() // 筛选项保存
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
+ },
|
|
|
created() {
|
|
|
if (this.$route.query.startDate && this.$route.query.endDate) {
|
|
|
this.stratAndEnd = [this.$route.query.startDate, this.$route.query.endDate]
|
|
@@ -377,14 +390,8 @@ export default {
|
|
|
if (this.$route.query.filterId) {
|
|
|
this.getFilterItem(this.$route.query.filterId)
|
|
|
}
|
|
|
- this.bugListSelect() // 获取下拉option
|
|
|
- this.taskListCreate() // 获取所属任务
|
|
|
- this.getFilterList() // 筛选项保存
|
|
|
this.$store.state.data.status = true
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.$refs.bugTableDialog.bugGetTableList({})
|
|
|
- },
|
|
|
destroyed() {
|
|
|
this.$store.state.data.status = false
|
|
|
},
|
|
@@ -392,13 +399,6 @@ export default {
|
|
|
changeSelect() {
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
- changDate(date) { // 创建时间添加到url参数中
|
|
|
- if (date) {
|
|
|
- this.$router.push({ path: this.$route.path, query: { startDate: date[0], endDate: date[1] }})
|
|
|
- } else {
|
|
|
- this.$router.push({ path: this.$route.path })
|
|
|
- }
|
|
|
- },
|
|
|
getBugList() { // 查询功能
|
|
|
this.$forceUpdate()
|
|
|
if (!this.stratAndEnd) {
|
|
@@ -415,10 +415,12 @@ export default {
|
|
|
this.indexPage.curIndex = e.curIndex
|
|
|
},
|
|
|
resetQuery() { // 重置
|
|
|
- this.$router.push({ path: this.$route.path })
|
|
|
+ const query = _.cloneDeep(this.$route.query)
|
|
|
+ delete query.filterId
|
|
|
+ this.$router.replace({ path: this.$route.path, query: query })
|
|
|
this.stratAndEnd = []
|
|
|
let combination = {}
|
|
|
- combination = deepClone(this.formInline)
|
|
|
+ combination = _.cloneDeep(this.formInline)
|
|
|
this.formInline = { bugName: combination.bugName }
|
|
|
this.$set(this.formInline, 'bugId', combination.bugId)
|
|
|
this.$set(this.formInline, 'status', combination.status)
|
|
@@ -452,7 +454,7 @@ export default {
|
|
|
}, 500),
|
|
|
async taskListCreate(val) { // 获取所属任务
|
|
|
const params = {
|
|
|
- bizId: Number(localStorage.getItem('bizId'))
|
|
|
+ bizId: this.bizId
|
|
|
}
|
|
|
if (val) {
|
|
|
params.name = val
|
|
@@ -498,7 +500,7 @@ export default {
|
|
|
},
|
|
|
bugDataGet() {
|
|
|
// 所属模块
|
|
|
- settingQueryBizModuleList(Number(localStorage.getItem('bizId'))).then(
|
|
|
+ settingQueryBizModuleList(this.bizId).then(
|
|
|
res => {
|
|
|
this.business_platform_Modular = res.data.map(item => ({
|
|
|
...item,
|
|
@@ -554,13 +556,13 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
async toSave() {
|
|
|
- const saveObj = deepClone(this.formInline)
|
|
|
+ const saveObj = _.cloneDeep(this.formInline)
|
|
|
delete saveObj.curIndex
|
|
|
delete saveObj.pageSize
|
|
|
const res = await createFilter({
|
|
|
name: this.searchForm.name,
|
|
|
content: JSON.stringify(saveObj),
|
|
|
- bizId: Number(localStorage.getItem('bizId'))
|
|
|
+ bizId: this.bizId
|
|
|
})
|
|
|
if (res.code === 200) {
|
|
|
this.$message({ showClose: true, message: '保存成功', type: 'success' })
|
|
@@ -571,17 +573,17 @@ export default {
|
|
|
},
|
|
|
async getFilterList() { // 获取过滤器列表
|
|
|
const params = {
|
|
|
- bizId: Number(localStorage.getItem('bizId'))
|
|
|
+ bizId: this.bizId
|
|
|
}
|
|
|
const res = await getFilterList(params)
|
|
|
this.filterList = res.data
|
|
|
},
|
|
|
async getFilterItem(filterId) { // 获取单个过滤器
|
|
|
this.stratAndEnd = []
|
|
|
- const combination = deepClone(this.formInline)
|
|
|
+ const combination = _.cloneDeep(this.formInline)
|
|
|
const { bugId, status, priorityLevel } = combination
|
|
|
this.formInline = { bugId, status, priorityLevel }
|
|
|
- this.$router.push({ path: this.$route.path, query: { filterId: filterId }})
|
|
|
+ this.$router.push({ path: this.$route.path, query: { ...this.$route.query, filterId: filterId }})
|
|
|
const res = await getFilterItem(filterId)
|
|
|
if (res.code === 200) {
|
|
|
const filter = JSON.parse(res.data.content)
|