|
@@ -13,7 +13,7 @@
|
|
|
:options="sectorOptions"
|
|
|
:props="{ checkStrictly: true }"
|
|
|
clearable
|
|
|
- ></el-cascader>
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="时间:">
|
|
|
<div class="date-select">
|
|
@@ -26,8 +26,7 @@
|
|
|
dateType = item.key;
|
|
|
setDate(item.key);
|
|
|
"
|
|
|
- >{{ item.label }}</span
|
|
|
- >
|
|
|
+ >{{ item.label }}</span>
|
|
|
</div>
|
|
|
<el-date-picker
|
|
|
v-model="stratAndEnd"
|
|
@@ -56,13 +55,16 @@
|
|
|
:options="teamOptions"
|
|
|
:props="{ checkStrictly: true }"
|
|
|
clearable
|
|
|
- ></el-cascader>
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div class="more-btn-wrapper">
|
|
|
- <el-button type="primary" size="mini" @click="query_project(form_all)"
|
|
|
- >筛 选
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ @click="query_project(form_all)"
|
|
|
+ >筛 选
|
|
|
</el-button>
|
|
|
<el-button size="mini" @click="query_Reset">重 置</el-button>
|
|
|
</div>
|
|
@@ -77,129 +79,129 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import moment from "moment";
|
|
|
-import { projectList } from "@/api/projectIndex";
|
|
|
-import { testPost } from "@/api/dataBig";
|
|
|
-/*页面专有展示组件*/
|
|
|
-import dataTitle from "./components/dataTitle";
|
|
|
+import moment from 'moment'
|
|
|
+import { projectList } from '@/api/projectIndex'
|
|
|
+import { testPost } from '@/api/dataBig'
|
|
|
+/* 页面专有展示组件*/
|
|
|
+import dataTitle from './components/dataTitle'
|
|
|
|
|
|
export default {
|
|
|
+ components: { dataTitle },
|
|
|
data() {
|
|
|
return {
|
|
|
// enum
|
|
|
dateSelect: [
|
|
|
{
|
|
|
- key: "week",
|
|
|
- label: "本周"
|
|
|
+ key: 'week',
|
|
|
+ label: '本周'
|
|
|
},
|
|
|
{
|
|
|
- key: "month",
|
|
|
- label: "本月"
|
|
|
+ key: 'month',
|
|
|
+ label: '本月'
|
|
|
},
|
|
|
{
|
|
|
- key: "year",
|
|
|
- label: "本年"
|
|
|
+ key: 'year',
|
|
|
+ label: '本年'
|
|
|
}
|
|
|
],
|
|
|
// 筛选
|
|
|
form_all: {},
|
|
|
DetailedScreening: false,
|
|
|
stratAndEnd: [], // 开始结束日期
|
|
|
- dateType: "week", // 时间选择类型
|
|
|
+ dateType: 'week', // 时间选择类型
|
|
|
bugCountTimeType: 1, // 获取趋缺陷势图数据接口入参:1本周 2本月 3本年
|
|
|
timeTypeList: [
|
|
|
// 日期选择
|
|
|
- { code: 1, label: "周" },
|
|
|
- { code: 2, label: "月" },
|
|
|
- { code: 3, label: "年" }
|
|
|
+ { code: 1, label: '周' },
|
|
|
+ { code: 2, label: '月' },
|
|
|
+ { code: 3, label: '年' }
|
|
|
],
|
|
|
sectorOptions: [], // 部门数据
|
|
|
teamOptions: [] // 团队数据
|
|
|
- };
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
- this.init();
|
|
|
+ this.init()
|
|
|
},
|
|
|
methods: {
|
|
|
setDate(type) {
|
|
|
// 日期筛选
|
|
|
- let startDate = null;
|
|
|
- let endDate = null;
|
|
|
+ let startDate = null
|
|
|
+ let endDate = null
|
|
|
switch (type) {
|
|
|
- case "week":
|
|
|
+ case 'week':
|
|
|
startDate = moment()
|
|
|
- .startOf("week")
|
|
|
- .format("YYYY.MM.DD");
|
|
|
+ .startOf('week')
|
|
|
+ .format('YYYY.MM.DD')
|
|
|
endDate = moment()
|
|
|
- .endOf("week")
|
|
|
- .format("YYYY.MM.DD");
|
|
|
- this.bugCountTimeType = this.timeTypeList[0].code;
|
|
|
- break;
|
|
|
- case "month":
|
|
|
+ .endOf('week')
|
|
|
+ .format('YYYY.MM.DD')
|
|
|
+ this.bugCountTimeType = this.timeTypeList[0].code
|
|
|
+ break
|
|
|
+ case 'month':
|
|
|
startDate = moment()
|
|
|
- .startOf("month")
|
|
|
- .format("YYYY.MM.DD");
|
|
|
+ .startOf('month')
|
|
|
+ .format('YYYY.MM.DD')
|
|
|
endDate = moment()
|
|
|
- .endOf("month")
|
|
|
- .format("YYYY.MM.DD");
|
|
|
- this.bugCountTimeType = this.timeTypeList[1].code;
|
|
|
- break;
|
|
|
- case "year":
|
|
|
+ .endOf('month')
|
|
|
+ .format('YYYY.MM.DD')
|
|
|
+ this.bugCountTimeType = this.timeTypeList[1].code
|
|
|
+ break
|
|
|
+ case 'year':
|
|
|
startDate = moment()
|
|
|
- .startOf("year")
|
|
|
- .format("YYYY.MM.DD");
|
|
|
+ .startOf('year')
|
|
|
+ .format('YYYY.MM.DD')
|
|
|
endDate = moment()
|
|
|
- .endOf("year")
|
|
|
- .format("YYYY.MM.DD");
|
|
|
- this.bugCountTimeType = this.timeTypeList[2].code;
|
|
|
- break;
|
|
|
+ .endOf('year')
|
|
|
+ .format('YYYY.MM.DD')
|
|
|
+ this.bugCountTimeType = this.timeTypeList[2].code
|
|
|
+ break
|
|
|
}
|
|
|
- this.stratAndEnd = [startDate, endDate];
|
|
|
- this.onSubmit();
|
|
|
+ this.stratAndEnd = [startDate, endDate]
|
|
|
+ this.onSubmit()
|
|
|
},
|
|
|
query_project(e) {
|
|
|
// 查询
|
|
|
if (this.isToOne) {
|
|
|
- this.curIndex = 1;
|
|
|
- this.currentPage = 1;
|
|
|
+ this.curIndex = 1
|
|
|
+ this.currentPage = 1
|
|
|
}
|
|
|
- this.table_loading = true;
|
|
|
- this.query_object = {};
|
|
|
- this.query_object = e;
|
|
|
- this.query_object.bizId = this.bizId;
|
|
|
- this.query_object.curIndex = this.curIndex;
|
|
|
- this.query_object.pageSize = this.pageSize;
|
|
|
+ this.table_loading = true
|
|
|
+ this.query_object = {}
|
|
|
+ this.query_object = e
|
|
|
+ this.query_object.bizId = this.bizId
|
|
|
+ this.query_object.curIndex = this.curIndex
|
|
|
+ this.query_object.pageSize = this.pageSize
|
|
|
projectList(this.query_object).then(res => {
|
|
|
- this.table_project = res.data;
|
|
|
- this.total = res.total;
|
|
|
- this.table_loading = false;
|
|
|
- });
|
|
|
- this.isToOne = true;
|
|
|
+ this.table_project = res.data
|
|
|
+ this.total = res.total
|
|
|
+ this.table_loading = false
|
|
|
+ })
|
|
|
+ this.isToOne = true
|
|
|
},
|
|
|
query_Reset() {
|
|
|
// 重置
|
|
|
- this.$set(this.form_all, "priority", this.query_object.priority);
|
|
|
- this.$set(this.form_all, "name", this.query_object.name);
|
|
|
- this.$set(this.form_all, "projectOwner", this.query_object.projectOwner);
|
|
|
- this.$set(this.form_all, "bizType", "");
|
|
|
- this.$set(this.form_all, "creater", "");
|
|
|
+ this.$set(this.form_all, 'priority', this.query_object.priority)
|
|
|
+ this.$set(this.form_all, 'name', this.query_object.name)
|
|
|
+ this.$set(this.form_all, 'projectOwner', this.query_object.projectOwner)
|
|
|
+ this.$set(this.form_all, 'bizType', '')
|
|
|
+ this.$set(this.form_all, 'creater', '')
|
|
|
this.$message({
|
|
|
- message: "已重置",
|
|
|
- type: "success",
|
|
|
+ message: '已重置',
|
|
|
+ type: 'success',
|
|
|
duration: 1000,
|
|
|
offset: 150
|
|
|
- });
|
|
|
- this.query_project(this.form_all);
|
|
|
+ })
|
|
|
+ this.query_project(this.form_all)
|
|
|
},
|
|
|
init() {
|
|
|
testPost().then(res => {
|
|
|
- console.log(res);
|
|
|
- });
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
},
|
|
|
onSubmit() {}
|
|
|
- },
|
|
|
- components: { dataTitle }
|
|
|
-};
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
.data-big-wrapper {
|