commit by yzf

master
Yang 3 years ago
parent 49faa7d480
commit 95fbbae9f1

@ -223,7 +223,8 @@ export default {
let indexValue=document.querySelectorAll(".sItem")[i].querySelectorAll("select")[0].selectedIndex;
let indexName=document.querySelectorAll(".sItem")[i].querySelectorAll("select")[1].selectedIndex;
let item =arr1.find(m=>m.FFactoryID==document.querySelectorAll(".sItem")[i].querySelectorAll("select")[0].value);
let item =arr1.find(m=>m==document.querySelectorAll(".sItem")[i].querySelectorAll("select")[0].value);
debugger
if(item!=null)
{
layer.msg("已存在相同模式", {
@ -269,7 +270,7 @@ export default {
let indexValue=document.querySelectorAll(".sItem")[i].querySelectorAll("select")[0].selectedIndex;
let indexName=document.querySelectorAll(".sItem")[i].querySelectorAll("select")[1].selectedIndex;
let item =arr1.find(m=>m.FFactoryID==document.querySelectorAll(".sItem")[i].querySelectorAll("select")[0].value);
let item =arr1.find(m=>m==document.querySelectorAll(".sItem")[i].querySelectorAll("select")[0].value);
if(item!=null)
{
layer.msg("已存在相同模式", {

@ -130,7 +130,7 @@ export default {
const freezingColumnSetting = ref([]);
const originalColumns = ref([]);
const infoList = ref([]);
const materialInfoList=ref([]);
const typeList = ref([
[],
[]
@ -173,7 +173,7 @@ export default {
return column.cellClass = column.key + "_" + rowIndex + "_" + columnIndex;
};
const idx = ref([]);
const materialInfoList=ref([]);
return {
dataColumn,
dataList,

@ -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"]) {
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 column.cellClass = column.cellClass + " one";
return document.getElementsByClassName(column.key + "_" + rowIndex + "_" + columnIndex)[0].classList.add("one");
case "2":
return column.cellClass = column.cellClass + " twe";
return document.getElementsByClassName(column.key + "_" + rowIndex + "_" + columnIndex)[0].classList.add("twe");
case "3":
return column.cellClass = column.cellClass + " three";
return document.getElementsByClassName(column.key + "_" + rowIndex + "_" + columnIndex)[0].classList.add("three");
case "4":
return column.cellClass = column.cellClass + " four";
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);

Loading…
Cancel
Save