test #47

Merged
gtz217 merged 273 commits from test into master 2023-10-17 08:53:54 +08:00
2 changed files with 140 additions and 49 deletions
Showing only changes of commit 8fd1504dc0 - Show all commits

View File

@ -26,7 +26,12 @@
export default { export default {
name: 'SummaryTable', name: 'SummaryTable',
components: {}, components: {},
props: {}, props: {
list: {
type: Array,
default: () => [],
},
},
data() { data() {
return { return {
queryParams: { queryParams: {
@ -60,7 +65,6 @@ export default {
align: 'center', align: 'center',
}, },
], ],
list: [{}],
}; };
}, },
computed: {}, computed: {},

View File

@ -40,7 +40,7 @@
@close="handleSummaryClose" @close="handleSummaryClose"
@cancel="handleSummaryClose" @cancel="handleSummaryClose"
@confirm="handleSummaryClose"> @confirm="handleSummaryClose">
<summaryTable /> <summaryTable :list="summaryList" />
</base-dialog> </base-dialog>
</div> </div>
</template> </template>
@ -106,7 +106,7 @@ export default {
tableProps: [ tableProps: [
{ {
width: 160, width: 160,
prop: 'inspectionDetContent', prop: 'content',
label: '检测内容', label: '检测内容',
align: 'center', align: 'center',
}, },
@ -163,56 +163,56 @@ export default {
prop: 'typeTotal', prop: 'typeTotal',
label: '检测类型总数', label: '检测类型总数',
align: 'center', align: 'center',
subcomponent: { // subcomponent: {
name: 'TextOnly', // name: 'TextOnly',
props: { // props: {
injectData: { // injectData: {
type: Object, // type: Object,
default: () => ({}), // default: () => ({}),
}, // },
}, // },
data() { // data() {
return { // return {
text: '各产线相加数量', // text: '线',
}; // };
}, // },
methods: { // methods: {
handleEmit(payload) { // handleEmit(payload) {
console.log('handleEmit', payload); // console.log('handleEmit', payload);
}, // },
}, // },
render(h) { // render(h) {
return h('el-button', { props: { type: 'text' } }, this.text); // return h('el-button', { props: { type: 'text' } }, this.text);
}, // },
}, // },
}, },
{ {
width: 128, width: 128,
prop: 'ratio', prop: 'ratio',
label: '比例', label: '比例',
align: 'center', align: 'center',
subcomponent: { // subcomponent: {
name: 'TextOnly', // name: 'TextOnly',
props: { // props: {
injectData: { // injectData: {
type: Object, // type: Object,
default: () => ({}), // default: () => ({}),
}, // },
}, // },
data() { // data() {
return { // return {
text: '比例', // text: '',
}; // };
}, // },
methods: { // methods: {
handleEmit(payload) { // handleEmit(payload) {
console.log('handleEmit', payload); // console.log('handleEmit', payload);
}, // },
}, // },
render(h) { // render(h) {
return h('el-button', { props: { type: 'text' } }, this.text); // return h('el-button', { props: { type: 'text' } }, this.text);
}, // },
}, // },
}, },
], ],
// //
@ -220,15 +220,101 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
}, },
list: [], summaryList: [],
summaryOpen: false, summaryOpen: false,
list: [
/** mock data */
{
content: 'asdfasdf',
line1: '',
line2: '',
line3: '',
line4: '',
line5: '',
line6: '',
line7: '',
line8: '',
line9: '',
line10: '',
typeTotal: 100,
ratio: '93%',
},
{
content: 'fdasfs',
line1: '',
line2: '',
line3: '',
line4: '',
line5: '',
line6: '',
line7: '',
line8: '',
line9: '',
line10: '',
typeTotal: 100,
ratio: '93%',
},
{
content: 'asdfdfffffff',
line1: '',
line2: '',
line3: '',
line4: '',
line5: '',
line6: '',
line7: '',
line8: '',
line9: '',
line10: '',
typeTotal: 100,
ratio: '93%',
},
],
}; };
}, },
computed: {}, computed: {},
mounted() {
this.getList();
},
methods: { methods: {
getList() {
this.getSummaryList();
this.getDetailedList();
},
/** 获取 检测总数 列表 */
async getSummaryList() {
const response = await this.$axios(
'/monitoring/statistical-data/getUpPart',
{
params: {
startTime: '2023-07-01 00:00:00',
endTime: '2023-08-10 00:00:00',
},
}
);
this.summaryList = response.data;
},
/** 获取 检测内容和产线关联 列表 */
async getDetailedList() {
const {
data: { data, otherList, otherMap, nameData },
} = await this.$axios('/monitoring/statistical-data/getDownPart', {
params: {
startTime: '2023-07-01 00:00:00',
endTime: '2023-08-10 00:00:00',
},
});
// this.list = response.data;
console.log("data", data);
console.log("otherList", otherList);
console.log("otherMap", otherMap);
console.log("nameData", nameData);
},
/** 总览关闭 */
handleSummaryClose() { handleSummaryClose() {
this.summaryOpen = false; this.summaryOpen = false;
}, },
/** 搜索按钮 */
handleSearchBarBtnClick(btn) { handleSearchBarBtnClick(btn) {
switch (btn.btnName) { switch (btn.btnName) {
case 'search': case 'search':
@ -250,6 +336,7 @@ export default {
break; break;
} }
}, },
/** 处理表格事件 */
handleEmitFun() {}, handleEmitFun() {},
}, },
}; };