|
@@ -5,8 +5,8 @@
|
|
|
<el-tabs v-model="activeName" style="margin: 2%; min-height: 80vh; font-size: 14px;" @tab-click="handleClick">
|
|
|
<el-tab-pane label="日报报告" name="first">
|
|
|
<div style="margin: 30px 0;">搜索
|
|
|
- <el-input v-model="state" size="medium" filterable placeholder="请搜索" style="width:20%;margin: 0 10px;" @change="getList(state)" />
|
|
|
- <el-button type="primary" size="medium" plain @click="centerDialogVisible = true">新建日报报告</el-button>
|
|
|
+ <el-input v-model="state" size="medium" filterable placeholder="搜索" style="width:20%;margin: 0 10px;" @change="getList(state)" />
|
|
|
+ <el-button type="primary" size="medium" plain @click="getQueryData(), centerDialogVisible = true">新建日报报告</el-button>
|
|
|
</div>
|
|
|
<template>
|
|
|
<el-table :data="tableData" size="mini" :header-cell-style="{ background: '#F2F3F6' }" fit border style="width: 100%">
|
|
@@ -37,7 +37,7 @@
|
|
|
<el-tab-pane label="准出报告" name="second">
|
|
|
<div style="margin: 30px 0;">搜索
|
|
|
<el-input v-model="state" size="medium" filterable placeholder="搜索" style="width:20%; margin: 0 10px;" @change="getListPern(state)" />
|
|
|
- <el-button type="primary" size="medium" plain @click="getQueryData1(), centerDialogVisible = true">新建准出报告</el-button>
|
|
|
+ <el-button type="primary" size="medium" plain @click="getQueryData(), centerDialogVisible1 = true">新建准出报告</el-button>
|
|
|
</div>
|
|
|
<template>
|
|
|
<el-table :data="tableData1" size="mini" :header-cell-style="{ background: '#F2F3F6' }" fit border style="width: 100%">
|
|
@@ -71,7 +71,7 @@
|
|
|
<el-tab-pane label="提测报告" name="third">
|
|
|
<div style="margin: 30px 0;">搜索
|
|
|
<el-input v-model="state" size="medium" filterable placeholder="搜索" style="width:20%; margin: 0 10px;" @change="getListTest(state)" />
|
|
|
- <el-button type="primary" plain size="medium" @click="getQueryData2(), centerDialogVisible = true">新建提测报告</el-button>
|
|
|
+ <el-button type="primary" plain size="medium" @click="getQueryData(), centerDialogVisible2 = true">新建提测报告</el-button>
|
|
|
</div>
|
|
|
<template>
|
|
|
<el-table :data="tableData2" size="mini" :header-cell-style="{ background: '#F2F3F6' }" fit border style="width: 100%">
|
|
@@ -102,44 +102,39 @@
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<!-- 日报 -->
|
|
|
- <el-dialog title="选择任务" :visible.sync="centerDialogVisible" width="30%" center @close="closeChange">
|
|
|
- <div style="text-align:text;margin:10px 0;">
|
|
|
- <el-button ref="btn2" size="mini" @click="getQueryData">任务</el-button>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-select v-model="queryDataState.code" filterable placeholder="请选择任务" style="width:100%;">
|
|
|
+ <el-dialog title="选择任务" :visible.sync="centerDialogVisible" width="30%" center>
|
|
|
+ <div style="display: flex; align-items: center; justify-content: space-between; ">
|
|
|
+ <div style="width:100px;">选择任务 :</div>
|
|
|
+ <el-select v-model="queryData.code" filterable placeholder="请选择任务" size="mini" style="width:100%;">
|
|
|
<el-option v-for="item in restaurants" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="createPresentation(queryDataState.code)">创建</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="createPresentation(queryData.code)">创建</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<!-- 准出 -->
|
|
|
- <el-dialog title="选择任务" :visible.sync="centerDialogVisible1" width="30%" center @close="closeChange">
|
|
|
- <div style="text-align:text;margin:10px 0;">
|
|
|
- <el-button ref="btn2" size="mini" @click="getQueryData1">任务</el-button>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-select v-model="states" filterable placeholder="请选择任务" style="width:100%;">
|
|
|
+ <el-dialog title="选择任务" :visible.sync="centerDialogVisible1" width="30%" center>
|
|
|
+ <div style="display: flex; align-items: center; justify-content: space-between; ">
|
|
|
+ <div style="width:100px;">选择任务 :</div>
|
|
|
+ <el-select v-model="queryData.ClientReport" filterable placeholder="请选择任务" size="mini" style="width:100%;">
|
|
|
<el-option v-for="item in restaurants" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="selectionReport1(states)">创建</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="selectionReport1(queryData.ClientReport)">创建</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<!-- 提测 -->
|
|
|
- <el-dialog title="提示" :visible.sync="centerDialogVisible2" width="30%" center @close="closeChange">
|
|
|
- <div style="text-align:text;margin:0;">
|
|
|
- <el-button ref="btn2" size="mini" @click="getQueryData2">任务</el-button>
|
|
|
+ <el-dialog title="选择任务" :visible.sync="centerDialogVisible2" width="30%" center>
|
|
|
+ <div style="display: flex; align-items: center; justify-content: space-between; ">
|
|
|
+ <div style="width:100px;">选择任务 :</div>
|
|
|
+ <el-select v-model="queryData.TestReport" filterable placeholder="请选择任务" size="mini" style="width:100%;">
|
|
|
+ <el-option v-for="item in restaurants" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
- <div style="margin:20px 0 10px 0">选择任务 :</div>
|
|
|
- <el-select v-model="queryData2.state2" filterable placeholder="搜索" style="width:80%;">
|
|
|
- <el-option v-for="item in restaurants" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
- </el-select>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="selectionReport(queryData2)">创建</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="selectionReport(queryData.TestReport)">创建</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -172,7 +167,6 @@ export default {
|
|
|
bizJson: localStorage.getItem('bizId'),
|
|
|
centerDialogVisible: false,
|
|
|
getListAllData: [],
|
|
|
- queryDataState: {},
|
|
|
pageSize: 5,
|
|
|
curIndex: 1,
|
|
|
total: 0,
|
|
@@ -192,11 +186,9 @@ export default {
|
|
|
name: ''
|
|
|
},
|
|
|
centerDialogVisible2: false,
|
|
|
- queryData2: {},
|
|
|
data_type: {},
|
|
|
total1: 0, // 准出
|
|
|
centerDialogVisible1: false,
|
|
|
- states: '',
|
|
|
dialogVisible1: false, // 提测弹窗
|
|
|
dialogDaily: false,
|
|
|
dialogClient: false,
|
|
@@ -218,8 +210,6 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getQueryData()
|
|
|
- this.getQueryData1()
|
|
|
- this.getQueryData2()
|
|
|
},
|
|
|
methods: {
|
|
|
handleClick(tab, event) {
|
|
@@ -306,7 +296,7 @@ export default {
|
|
|
this.$refs.DailyReport.init(2, data)
|
|
|
})
|
|
|
},
|
|
|
- queryPresentation1(data) {
|
|
|
+ queryPresentation1(data) { // 准出编辑
|
|
|
this.dialogClient = true
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.ClientReport.init(2, data)
|
|
@@ -319,80 +309,61 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
selectionReport1(e) {
|
|
|
- if (this.states !== '') {
|
|
|
- for (var ele of this.restaurants) {
|
|
|
- if (e === ele.id) {
|
|
|
- var type = ele
|
|
|
- this.dialogClient = true
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.ClientReport.init(7, [type.taskId])
|
|
|
- })
|
|
|
- }
|
|
|
+ if (e !== '') {
|
|
|
+ var taskData = ''
|
|
|
+ this.restaurants.map(item => {
|
|
|
+ item.id === e ? taskData = item : ''
|
|
|
+ })
|
|
|
+ if (taskData.status !== 3) {
|
|
|
+ this.$message({ message: '存在状态不是【测试中】的任务,请将任务状态为【测试中】才可提测,请检查!', type: 'warning' })
|
|
|
+ } else {
|
|
|
+ this.dialogClient = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.ClientReport.init(7, [e])
|
|
|
+ })
|
|
|
}
|
|
|
} else {
|
|
|
- this.centerDialogVisible = true
|
|
|
this.$message({ message: '提示,请选择要添加的任务ID', type: 'warning' })
|
|
|
return false
|
|
|
}
|
|
|
},
|
|
|
selectionReport(e) {
|
|
|
- if (this.queryData.state !== '') {
|
|
|
- for (var ele of this.restaurants) {
|
|
|
- if (ele.id === e.state) {
|
|
|
- this.data_type = ele
|
|
|
- }
|
|
|
- }
|
|
|
- this.dialogVisible1 = true
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.TestReport.init(7, [this.data_type.taskId])
|
|
|
+ if (e !== '') {
|
|
|
+ var taskData = ''
|
|
|
+ this.restaurants.map(item => {
|
|
|
+ item.id === e ? taskData = item : ''
|
|
|
})
|
|
|
+ if (taskData.status !== 1) {
|
|
|
+ this.$message({ message: '存在状态不是【开发中】的任务,请将任务状态为【开发中】才可提测,请检查!', type: 'warning' })
|
|
|
+ } else {
|
|
|
+ this.dialogVisible1 = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.TestReport.init(7, [e])
|
|
|
+ })
|
|
|
+ }
|
|
|
} else {
|
|
|
- this.centerDialogVisible = true
|
|
|
+ this.centerDialogVisible2 = true
|
|
|
this.$message({ message: '提示,请选择要添加的任务ID', type: 'warning' })
|
|
|
}
|
|
|
},
|
|
|
- // 切换项目任务
|
|
|
- getQueryData2(e) {
|
|
|
- this.$set(this.queryData2, 'state', '')
|
|
|
- this.$set(this.queryData2, 'radio', undefined)
|
|
|
- this.restaurants = []
|
|
|
- taskListCreate({ statusList: [1], bizId: localStorage.getItem('bizId') }).then(res => {
|
|
|
- const arr = []
|
|
|
- for (var vel of res.data.taskInfoList) {
|
|
|
- arr.push({ name: vel.name, id: vel.id, typeString: e })
|
|
|
- }
|
|
|
- this.restaurants = arr
|
|
|
- this.$refs['btn2'].$el.style.background = '#409EFF'
|
|
|
- this.$refs['btn2'].$el.style.color = '#ffffff'
|
|
|
- })
|
|
|
- },
|
|
|
- // 切换项目任务
|
|
|
- getQueryData1(e) {
|
|
|
+ // 获取任务数据
|
|
|
+ getQueryData(e) {
|
|
|
+ this.$set(this.queryData, 'TestReport', '')
|
|
|
+ this.$set(this.queryData, 'ClientReport', '')
|
|
|
+ this.$set(this.queryData, 'code', '')
|
|
|
this.restaurants = []
|
|
|
- this.states = ''
|
|
|
taskListCreate({ statusList: [3], bizId: localStorage.getItem('bizId') }).then(res => {
|
|
|
- const arr = []
|
|
|
- for (var vel of res.data.taskInfoList) {
|
|
|
- arr.push({ name: vel.name, id: vel.id, typeString: e })
|
|
|
- }
|
|
|
- this.restaurants = arr
|
|
|
- this.$refs['btn2'].$el.style.background = '#409EFF'
|
|
|
- this.$refs['btn2'].$el.style.color = '#ffffff'
|
|
|
+ this.restaurants = res.data.taskInfoList
|
|
|
})
|
|
|
},
|
|
|
|
|
|
createPresentation(e) {
|
|
|
if (e !== '') {
|
|
|
- for (var ele of this.restaurants) {
|
|
|
- if (e === ele.id) {
|
|
|
- var type = ele
|
|
|
- }
|
|
|
- }
|
|
|
this.queryData.state = ''
|
|
|
this.centerDialogVisible = false
|
|
|
this.dialogDaily = true
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.DailyReport.init(7, [type.taskId])
|
|
|
+ this.$refs.DailyReport.init(7, [e])
|
|
|
})
|
|
|
} else {
|
|
|
this.$message({ type: 'error', message: '请选择任务' })
|
|
@@ -404,27 +375,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- // dialog关闭回调
|
|
|
- closeChange() {
|
|
|
- this.$refs['btn2'].$el.style.background = '#FFFFFF'
|
|
|
- this.$refs['btn2'].$el.style.color = '#606266'
|
|
|
- },
|
|
|
-
|
|
|
- // 切换任务
|
|
|
- getQueryData() {
|
|
|
- this.restaurants = []
|
|
|
- this.states = ''
|
|
|
- this.$set(this.queryDataState, 'code', '')
|
|
|
- taskListCreate({ statusList: [3], bizId: localStorage.getItem('bizId') }).then(res => {
|
|
|
- const arr = []
|
|
|
- for (var vel of res.data.taskInfoList) {
|
|
|
- arr.push({ name: vel.name, id: vel.id, taskId: vel.id })
|
|
|
- }
|
|
|
- this.restaurants = arr
|
|
|
- this.$refs['btn2'].$el.style.background = '#409EFF'
|
|
|
- this.$refs['btn2'].$el.style.color = '#ffffff'
|
|
|
- })
|
|
|
- },
|
|
|
// 日报/准出/提测
|
|
|
toReportView(ele, index) {
|
|
|
switch (index) {
|