Merge branch 'master' of http://www.koelndom.cn:13030/Huabao/FactorySystemWeb
commit
cc7aa78207
@ -0,0 +1,104 @@
|
|||||||
|
|
||||||
|
<template>
|
||||||
|
<lay-container fluid="true" class="content-box">
|
||||||
|
<lay-button size="sm" type="primary" @click="_downSAP()">导出SAP</lay-button>
|
||||||
|
<lay-button size="sm" type="primary" @click="_downMateialView()">导出视图</lay-button>
|
||||||
|
<lay-table height="360px" v-if="dataColumn.length > 0" :columns="dataColumn" :data-source="dataList"
|
||||||
|
:cellStyle="cellStyle">
|
||||||
|
</lay-table>
|
||||||
|
</lay-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.content-box {
|
||||||
|
height: 400px;
|
||||||
|
margin: 20px 10px;
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
clear: both;
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
ref
|
||||||
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
getPageList
|
||||||
|
} from "/src/api/api/common";
|
||||||
|
|
||||||
|
import {
|
||||||
|
getFormulaByFTestCode
|
||||||
|
} from "/src/api/api/formula";
|
||||||
|
import {
|
||||||
|
DownMateialView,
|
||||||
|
DownSAP
|
||||||
|
} from "/src/api/api/material";
|
||||||
|
|
||||||
|
import {
|
||||||
|
getListByHalfMaterialTeamId
|
||||||
|
} from "/src/api/api/view"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setup() {
|
||||||
|
const dataColumn = ref([]);
|
||||||
|
const dataList = ref([]);
|
||||||
|
const cellStyle = function (row, column, rowIndex, columnIndex) {
|
||||||
|
return column.style || "";
|
||||||
|
};
|
||||||
|
const pageInfo = ref({
|
||||||
|
total: 0,
|
||||||
|
limit: 10,
|
||||||
|
current: 1
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
dataColumn,
|
||||||
|
dataList,
|
||||||
|
cellStyle,
|
||||||
|
pageInfo
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
dataInfoObj: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this._getViewList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async _downMateialView() {
|
||||||
|
let result = await DownMateialView({
|
||||||
|
FID: this.dataInfoObj.FID,
|
||||||
|
FName: this.dataInfoObj.FName
|
||||||
|
});
|
||||||
|
if (result.Code == "200") {
|
||||||
|
window.location.href = result.Data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async _downSAP() {
|
||||||
|
let result = await DownSAP({
|
||||||
|
FID: this.dataInfoObj.FID,
|
||||||
|
FName: this.dataInfoObj.FName
|
||||||
|
});
|
||||||
|
if (result.Code == "200") {
|
||||||
|
window.location.href = result.Data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//获取角色集合
|
||||||
|
async _getViewList() {
|
||||||
|
debugger
|
||||||
|
let _data = await getFormulaByFTestCode({
|
||||||
|
"code":this.dataInfoObj.NewFTestCode
|
||||||
|
});
|
||||||
|
debugger
|
||||||
|
this.dataColumn =_data.columns;
|
||||||
|
this.dataList =_data.rows;
|
||||||
|
},
|
||||||
|
cancelClick() {
|
||||||
|
this.$emit('cancelClick', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue