fix:禅道245

This commit is contained in:
shijing 2025-12-18 13:58:08 +08:00
parent 30f677d119
commit d9557dfa7a
1 changed files with 18 additions and 29 deletions

View File

@ -966,41 +966,30 @@ export default {
}, },
getMaterialList() { getMaterialList() {
let that = this; let that = this;
this.$API.mtm.material.list let obj = {
.req({ page: 0, type: 20, count__gte: 1 }) query: {
.then((res) => { "select_dept": "",
let data = []; "groupby_dept": "",
if (res.length > 0) { "material_types": "20",
res.forEach((item) => { "select_material": "material.name as material_name",
"groupby_material": "material.name",
"select_material_name": "",
"groupby_material_name": ""
}
};
that.$API.bi.dataset.exec.req("materialCount", obj).then((res) => {
let data = [];
let list = res.data2.ds0;
if (list.length > 0) {
list.forEach((item) => {
let arr = []; let arr = [];
let colorText = ""; arr[0] = item.material_name ;
if (
item.count_safe !== null &&
item.count_safe < item.count
) {
colorText =
'<span style="color:red;">' +
item.count +
"</span>";
} else {
colorText =
'<span style="color:green;">' +
item.count +
"</span>";
}
arr[0] =
item.name +
"|" +
item.specification +
"|" +
item.model;
arr[1] = item.count; arr[1] = item.count;
data.push(arr); data.push(arr);
}); });
} }
that.taskBoard.data = data; that.taskBoard.data = data;
// console.log('getMaterialList', data) })
});
}, },
showTime() { showTime() {
this.currentTime = this.$TOOL.dateFormat(new Date(), "hh:mm:ss"); this.currentTime = this.$TOOL.dateFormat(new Date(), "hh:mm:ss");