update 检测统计

This commit is contained in:
lb 2023-08-04 16:51:26 +08:00
parent 1c7e908d2e
commit 8fd1504dc0
2 changed files with 140 additions and 49 deletions

View File

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

View File

@ -40,7 +40,7 @@
@close="handleSummaryClose"
@cancel="handleSummaryClose"
@confirm="handleSummaryClose">
<summaryTable />
<summaryTable :list="summaryList" />
</base-dialog>
</div>
</template>
@ -106,7 +106,7 @@ export default {
tableProps: [
{
width: 160,
prop: 'inspectionDetContent',
prop: 'content',
label: '检测内容',
align: 'center',
},
@ -163,56 +163,56 @@ export default {
prop: 'typeTotal',
label: '检测类型总数',
align: 'center',
subcomponent: {
name: 'TextOnly',
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {
text: '各产线相加数量',
};
},
methods: {
handleEmit(payload) {
console.log('handleEmit', payload);
},
},
render(h) {
return h('el-button', { props: { type: 'text' } }, this.text);
},
},
// subcomponent: {
// name: 'TextOnly',
// props: {
// injectData: {
// type: Object,
// default: () => ({}),
// },
// },
// data() {
// return {
// text: '线',
// };
// },
// methods: {
// handleEmit(payload) {
// console.log('handleEmit', payload);
// },
// },
// render(h) {
// return h('el-button', { props: { type: 'text' } }, this.text);
// },
// },
},
{
width: 128,
prop: 'ratio',
label: '比例',
align: 'center',
subcomponent: {
name: 'TextOnly',
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {
text: '比例',
};
},
methods: {
handleEmit(payload) {
console.log('handleEmit', payload);
},
},
render(h) {
return h('el-button', { props: { type: 'text' } }, this.text);
},
},
// subcomponent: {
// name: 'TextOnly',
// props: {
// injectData: {
// type: Object,
// default: () => ({}),
// },
// },
// data() {
// return {
// text: '',
// };
// },
// methods: {
// handleEmit(payload) {
// console.log('handleEmit', payload);
// },
// },
// render(h) {
// return h('el-button', { props: { type: 'text' } }, this.text);
// },
// },
},
],
//
@ -220,15 +220,101 @@ export default {
pageNo: 1,
pageSize: 10,
},
list: [],
summaryList: [],
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: {},
mounted() {
this.getList();
},
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() {
this.summaryOpen = false;
},
/** 搜索按钮 */
handleSearchBarBtnClick(btn) {
switch (btn.btnName) {
case 'search':
@ -250,6 +336,7 @@ export default {
break;
}
},
/** 处理表格事件 */
handleEmitFun() {},
},
};