|
|
|
|
@ -102,7 +102,8 @@ import {
|
|
|
|
|
} from "/src/api/api/common";
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
getInfoData
|
|
|
|
|
getInfoData,
|
|
|
|
|
GetMaterialInfoList
|
|
|
|
|
} from "/src/api/api/materialType";
|
|
|
|
|
import OperateLog from "./OperateLog.vue";
|
|
|
|
|
import FormulaView from "./FormulaView.vue";
|
|
|
|
|
@ -128,25 +129,28 @@ export default {
|
|
|
|
|
[]
|
|
|
|
|
]);
|
|
|
|
|
const cellStyle = function (row, column, rowIndex, columnIndex) {
|
|
|
|
|
let back = column.table == "TFS_ViewMaterial" ? "background:rgb(246, 246, 246)" : ""
|
|
|
|
|
return back;
|
|
|
|
|
}
|
|
|
|
|
const cellClassName = function (row, column, rowIndex, columnIndex) {
|
|
|
|
|
debugger
|
|
|
|
|
let info=row["info"];
|
|
|
|
|
switch (info[column.key+"Type"]) {
|
|
|
|
|
case "1":
|
|
|
|
|
return column.cellClass = column.cellClass + " one";
|
|
|
|
|
case "2":
|
|
|
|
|
return column.cellClass = column.cellClass + " twe";
|
|
|
|
|
case "3":
|
|
|
|
|
return column.cellClass = column.cellClass + " three";
|
|
|
|
|
case "4":
|
|
|
|
|
return column.cellClass = column.cellClass + " four";
|
|
|
|
|
let back = column.table == "TFS_ViewMaterial" ? "background:rgb(246, 246, 246)" : "";
|
|
|
|
|
let info = row["info"];
|
|
|
|
|
if (info) {
|
|
|
|
|
if (typeof(document.getElementsByClassName(column.key + "_" + rowIndex + "_" + columnIndex)[0])!="undefined") {
|
|
|
|
|
switch (info[column.key + "Type"]) {
|
|
|
|
|
case "1":
|
|
|
|
|
return document.getElementsByClassName(column.key + "_" + rowIndex + "_" + columnIndex)[0].classList.add("one");
|
|
|
|
|
case "2":
|
|
|
|
|
return document.getElementsByClassName(column.key + "_" + rowIndex + "_" + columnIndex)[0].classList.add("twe");
|
|
|
|
|
case "3":
|
|
|
|
|
return document.getElementsByClassName(column.key + "_" + rowIndex + "_" + columnIndex)[0].classList.add("three");
|
|
|
|
|
case "4":
|
|
|
|
|
return document.getElementsByClassName(column.key + "_" + rowIndex + "_" + columnIndex)[0].classList.add("four");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return column.cellClass || "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return back;
|
|
|
|
|
};
|
|
|
|
|
const cellClassName = function (row, column, rowIndex, columnIndex) {
|
|
|
|
|
return column.cellClass = column.key + "_" + rowIndex + "_" + columnIndex;
|
|
|
|
|
};
|
|
|
|
|
const inputCodeValue = ref("");
|
|
|
|
|
const inputDescValue = ref("");
|
|
|
|
|
const visible2 = ref(false)
|
|
|
|
|
@ -157,6 +161,9 @@ export default {
|
|
|
|
|
const freezingColumnSetting = ref([]);
|
|
|
|
|
const originalColumns = ref([]);
|
|
|
|
|
const tmpDataColumn = ref([]);
|
|
|
|
|
|
|
|
|
|
const idx = ref([]);
|
|
|
|
|
const materialInfoList=ref([]);
|
|
|
|
|
return {
|
|
|
|
|
dataColumn,
|
|
|
|
|
dataList,
|
|
|
|
|
@ -175,7 +182,9 @@ export default {
|
|
|
|
|
showFreezingColumnSettingBox,
|
|
|
|
|
freezingColumnSetting,
|
|
|
|
|
originalColumns,
|
|
|
|
|
tmpDataColumn
|
|
|
|
|
tmpDataColumn,
|
|
|
|
|
materialInfoList,
|
|
|
|
|
idx
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
props: {
|
|
|
|
|
@ -190,6 +199,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.getUserPower();
|
|
|
|
|
this.initPage(this.idx);
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async getUserPower() {
|
|
|
|
|
@ -206,12 +216,13 @@ export default {
|
|
|
|
|
this.initPage(layer.load(2));
|
|
|
|
|
},
|
|
|
|
|
async initPage(idx) {
|
|
|
|
|
this.idx=idx;
|
|
|
|
|
let _data = await getMaterialViewsByTeamId({
|
|
|
|
|
teamId: this.dataInfoObj.FTeamID,
|
|
|
|
|
teamWorkType: this.dataInfoObj.FTeamworkType,
|
|
|
|
|
teamType: 1
|
|
|
|
|
}, "MaterialTeamwork");
|
|
|
|
|
|
|
|
|
|
this.materialInfoList = await GetMaterialInfoList() || null;
|
|
|
|
|
let freezingCols = await GetFreezingColumns();
|
|
|
|
|
|
|
|
|
|
this.typeList[0] = _data.types.filter(s => s.FDepth == 1) || [];
|
|
|
|
|
@ -318,10 +329,11 @@ export default {
|
|
|
|
|
localStorage.setItem('EditView' + saveId, JSON.stringify(_data.rows));
|
|
|
|
|
|
|
|
|
|
this.editColumn = editColumn;
|
|
|
|
|
this.dataList = _data.rows.map(function(item){
|
|
|
|
|
item["info"]=_data.infos.find(s => s.FDataID == item.FMaterialID) || null;
|
|
|
|
|
let $this=this;
|
|
|
|
|
this.dataList = _data.rows.map(function (item) {
|
|
|
|
|
item["info"]=$this.materialInfoList.Data.find(s=>s.FDataID==item.FTypeID2);
|
|
|
|
|
return item;
|
|
|
|
|
});;
|
|
|
|
|
});
|
|
|
|
|
this.dataColumn = dataColumn;
|
|
|
|
|
this.originalColumns = this.deepCopy(dataColumn);
|
|
|
|
|
|
|
|
|
|
|