|
@@ -145,105 +145,127 @@
|
|
|
<el-tab-pane label="基础信息" name="first">
|
|
|
<el-form ref="seeTemp" :model="see.temp" label-position="right" label-width="115px" style="width: 90%;margin:0 auto 30px" @click.native.prevent @submit.native.prevent>
|
|
|
<el-row>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="牧场:" prop="pastureName">
|
|
|
<el-input ref="pastureName" v-model="see.temp.pastureName" placeholder="牧场" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="部门:" prop="departmentName">
|
|
|
<el-input ref="departmentName" v-model="see.temp.departmentName" placeholder="部门" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="设备类别:" prop="eqClassName">
|
|
|
<el-input ref="departmentName" v-model="see.temp.eqClassName" placeholder="设备类别" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="设备名称:" prop="eqName">
|
|
|
+ <el-input ref="eqName" v-model="see.temp.eqName" placeholder="设备名称" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="设备内部编号:" prop="eqCode">
|
|
|
<el-input ref="assetCode" v-model="see.temp.eqCode" placeholder="设备内部编号" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="设备规格:" prop="eqName">
|
|
|
- <el-input ref="eqName" v-model="see.temp.eqName" placeholder="设备规格" disabled />
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="设备规格:" prop="specification">
|
|
|
+ <el-input ref="specification" v-model="see.temp.specification" placeholder="设备规格" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="品牌:" prop="brandName">
|
|
|
<el-input ref="eqCode" v-model="see.temp.brandName" placeholder="品牌" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="原值:" prop="yuanzhi">
|
|
|
+ <el-input ref="yuanzhi" v-model="see.temp.yuanzhi" placeholder="原值" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-col :span="8">
|
|
|
-
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="用途:" prop="purpose">
|
|
|
<el-input ref="unit" v-model="see.temp.purpose" placeholder="用途" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="购置日期:" prop="purchaseDate">
|
|
|
<el-input ref="purchaseDate" v-model="see.temp.purchaseDate" placeholder="购置日期" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="财务编号:" prop="financeCode">
|
|
|
<el-input ref="financeCode" v-model="see.temp.financeCode" placeholder="财务编号" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="维修费用:" prop="yearMaintainCost">
|
|
|
+ <el-input ref="yearMaintainCost" v-model="see.temp.yearMaintainCost" placeholder="维修费用" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="残值:" prop="salvage">
|
|
|
<el-input ref="salvage" v-model="see.temp.salvage" placeholder="残值" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="保养级别:" prop="upkeepgrade">
|
|
|
<el-input ref="upkeepgrade" v-model="see.temp.upkeepgrade" placeholder="保养级别" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="保养费用:" prop="yearUpkeepCost">
|
|
|
<el-input ref="yearUpkeepCost" v-model="see.temp.yearUpkeepCost" placeholder="保养费用" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="工作类别:" prop="work">
|
|
|
+ <el-input ref="work" v-model="see.temp.work" placeholder="工作类别" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="责任人:" prop="employeName">
|
|
|
<el-input ref="employeName" v-model="see.temp.employeName" placeholder="责任人" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="物联网编码:" prop="license">
|
|
|
<el-input ref="license" v-model="see.temp.license" placeholder="物联网编码" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="标准工作时长:" prop="duration">
|
|
|
<el-input ref="duration" v-model="see.temp.duration" placeholder="标准工作时长" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="状态:" prop="status">
|
|
|
+ <el-input ref="status" v-model="see.temp.status" placeholder="状态" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="油卡号:" prop="cardCode">
|
|
|
<el-input ref="cardCode" v-model="see.temp.cardCode" placeholder="油卡号" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="油卡类型:" prop="cardType">
|
|
|
<el-input ref="cardType" v-model="see.temp.cardType" placeholder="油卡类型" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="油卡状态:" prop="enable">
|
|
|
<el-input ref="enable" v-model="see.temp.enable" placeholder="油卡状态" disabled />
|
|
|
</el-form-item>
|
|
@@ -409,7 +431,8 @@ export default {
|
|
|
const obj = {
|
|
|
startTime: '',
|
|
|
endTime: "",
|
|
|
- eqId:this.see.temp.eqId
|
|
|
+ eqId:this.see.temp.eqId,
|
|
|
+ cardCode: this.see.temp.cardCode
|
|
|
}
|
|
|
if (this.getdataListParm.parammaps.inputDatetime == '' || this.getdataListParm.parammaps.inputDatetime == null) {
|
|
|
this.getdataListParm.parammaps.inputDatetime = ''
|
|
@@ -530,7 +553,8 @@ export default {
|
|
|
if (response.data.list !== null) {
|
|
|
this.list = response.data.list.map((child) => {
|
|
|
const status = this.statusMap.find(item => item.id == child.status);
|
|
|
- child.status = status.value || '暂无状态'
|
|
|
+ console.log(status,'status')
|
|
|
+ child.status = status && status.value || ''
|
|
|
child.enable = child.enable == true ? '禁用' : '启用'
|
|
|
return child;
|
|
|
})
|
|
@@ -683,9 +707,9 @@ processData(downLoadList, filterVal, tHeader) {
|
|
|
const ids = arr.map((child) => { return child.id })
|
|
|
this.getdataListParm.parammaps.pastureId = ids.toString();
|
|
|
}
|
|
|
-
|
|
|
+ this.getdataListParm.parammaps.pagecount = 999999;
|
|
|
const obj = JSON.parse(JSON.stringify(this.getdataListParm.parammaps));
|
|
|
- // obj.pastureId = Cookies.get('pastureid');
|
|
|
+ // obj.parammaps.pagecount = 999999;
|
|
|
delete obj.pastureArr
|
|
|
getDownLoadData(obj).then(response => {
|
|
|
var downLoadList = response.data.list.map((child) => {
|
|
@@ -694,32 +718,37 @@ processData(downLoadList, filterVal, tHeader) {
|
|
|
child.enable = child.enable == true ? '禁用' : '启用'
|
|
|
return child
|
|
|
})
|
|
|
+ this.percentage = 99;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.isPercentage = false;
|
|
|
+ this.getdataListParm.parammaps.pagecount = 50;
|
|
|
+ }, 2000);
|
|
|
|
|
|
|
|
|
- const days = downLoadList[0].day;
|
|
|
- const currentData = downLoadList[0];
|
|
|
+ const days = downLoadList.length > 0 && downLoadList[0].day || [];
|
|
|
let filterVal = []
|
|
|
- const filterVal0 = ['date','pastureName', 'eqClassName', 'eqName', 'eqCode', 'status', 'purchaseDate', 'financeCode', 'departmentName', 'employeName', 'license', 'duration', 'cardCode', 'cardType', 'enable'];
|
|
|
+ const filterVal0 = ['date', 'pastureName', 'eqClassName','eqName', 'eqCode', 'specification', 'brandName', 'status', 'purpose', 'purchaseDate', 'financeCode', 'yuanzhi', 'salvage', 'upkeepgrade', 'yearUpkeepCost', 'yearMaintainCost', 'departmentName', 'employeName', 'license', 'duration', 'work',
|
|
|
+ 'cardCode', 'cardType', 'enable'];
|
|
|
filterVal = [...filterVal0];
|
|
|
|
|
|
// 添加每一天的 hours 和 diesel 数据
|
|
|
- currentData.day.forEach(day => {
|
|
|
+ days.forEach(day => {
|
|
|
filterVal.push(`${day}(时长)`); // 添加对应的 hours
|
|
|
});
|
|
|
- currentData.day.forEach(day => {
|
|
|
+ days.forEach(day => {
|
|
|
filterVal.push(`${day}(加油量)`); // 添加对应的 diesel
|
|
|
});
|
|
|
|
|
|
- if (response.data.list !== '') {
|
|
|
- this.percentage = 99;
|
|
|
- setTimeout(() => {
|
|
|
- this.isPercentage = false;
|
|
|
- }, 2000);
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
const table = this.$refs.table;
|
|
|
- const labels = table.columns.map((column) => column.label !== '序号' && column.label !== '操作' ? column.label : null).filter(label => label !== null);
|
|
|
- const tHeader = ['日期',...labels, ...currentData.day.map(d => `${d}(时长)`), ...currentData.day.map(d => `${d}(加油量)`)];
|
|
|
+
|
|
|
+
|
|
|
+ const labels = ['日期', '牧场', '设备类别','设备名称', '设备内部编号', '设备规格', '品牌', '状态', '用途', '购置日期', '财务编号','原值', '残值', '保养级别', '保养费用', '维修费用', '部门', '责任人', '物联网编码', '标准工作时长', '工作类别',
|
|
|
+ '油卡号','油卡类型','油卡状态'
|
|
|
+ ];
|
|
|
+ const tHeader = [...labels, ...days.map(d => `${d}(时长)`), ...days.map(d => `${d}(加油量)`)];
|
|
|
|
|
|
const processedData = this.processData(downLoadList, filterVal, tHeader);
|
|
|
|