页面修改

dev-scheduling
jinna 2 weeks ago
parent 21127bd08e
commit cd6d843513
  1. 16
      src/views/equiptManagement/workwearManagement/index.vue
  2. 4
      src/views/exemption/components/addDialog.vue
  3. 2
      src/views/orderManagement/components/exception/resourceMissing.vue
  4. 13
      src/views/productionManagement/coatingMaterial.vue
  5. 313
      src/views/recorderList/index.vue

@ -1,10 +1,12 @@
<template>
<basic-container>
<el-tabs v-model="tabPosition" class="demo-tabs" @tab-change="tabPositionChange">
<el-tab-pane label="飞靶设置" name="feiBaSet">
<!-- 表格数据 -->
<el-tab-pane label="飞靶设置" name="feiBaSet"></el-tab-pane>
<el-tab-pane label="挂具设置" name="rackSet"></el-tab-pane>
</el-tabs>
<avue-crud
:height="460"
v-if="tabPosition == 'feiBaSet'"
:option="feiBaOption"
:table-loading="feibaLoading"
:data="data"
@ -25,10 +27,9 @@
<el-button type="danger" plain @click="removeFn">删除</el-button>
</template>
</avue-crud>
</el-tab-pane>
<el-tab-pane label="挂具设置" name="rackSet">
<avue-crud
:height="460"
v-if="tabPosition == 'rackSet'"
:option="rackOption"
:table-loading="gjLoading"
:data="data"
@ -49,9 +50,6 @@
<el-button type="danger" plain @click="removeFn">删除</el-button>
</template>
</avue-crud>
</el-tab-pane>
</el-tabs>
</basic-container>
</template>

@ -218,8 +218,8 @@ export default {
uploadDelete(file, column) {
console.log('uploadDelete', file, column);
this.attachLink = '';
this.formData.attachLink = []
// return true;
this.formData.fileUrl = ''
return true;
},
uploadExceed(limit, files, fileList, column) {
this.$message.error('最多只能上传一个文件');

@ -402,7 +402,7 @@ export default {
},
{
label: '缺失资源',
prop: 'ypQty',
prop: 'validationMomo',
search: false,
sortable: true,
width: 120,

@ -1,18 +1,13 @@
<template>
<basic-container>
<el-tabs v-model="tabPosition" class="demo-tabs" @tab-change="tabPositionChange">
<el-tab-pane label="物料需求申报" name="1">
<el-tab-pane label="物料需求申报" name="1"></el-tab-pane>
<el-tab-pane label="化验含量" name="2"></el-tab-pane>
<el-tab-pane label="添加量申报" name="3"></el-tab-pane>
</el-tabs>
<materialRequirements v-if="tabPosition=='1'"></materialRequirements>
</el-tab-pane>
<el-tab-pane label="化验含量" name="2">
<assayedContent v-if="tabPosition=='2'"></assayedContent>
</el-tab-pane>
<el-tab-pane label="添加量申报" name="3">
<addRequirements v-if="tabPosition=='3'"></addRequirements>
</el-tab-pane>
</el-tabs>
</basic-container>
</template>

@ -2,9 +2,13 @@
<basic-container>
<!-- 记录仪管理 -->
<el-tabs v-model="tabPosition" class="demo-tabs" @tab-change="tabPositionChange">
<el-tab-pane label="记录仪" name="recorder">
<el-tab-pane label="记录仪" name="recorder"> </el-tab-pane>
<el-tab-pane label="记录仪曲线配置" name="recorderLineSetting"> </el-tab-pane>
<el-tab-pane label="记录仪历史曲线" name="recorderHistoryLine"> </el-tab-pane>
</el-tabs>
<avue-crud
:height="460"
v-if="tabPosition == 'recorder'"
:option="option"
:table-loading="loading"
:data="data"
@ -21,7 +25,6 @@
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
>
<template #menu="{ row, index, size }">
<el-button type="text" @click="showDetail(row)" v-if="tabPosition == 'recorder'"
@ -56,10 +59,9 @@
>
</template>
</avue-crud>
</el-tab-pane>
<el-tab-pane label="记录仪曲线配置" name="recorderLineSetting">
<avue-crud
:height="460"
v-if="tabPosition == 'recorderLineSetting'"
:option="option"
:table-loading="loading"
:data="data"
@ -86,10 +88,7 @@
>
</template>
<template #menu-left>
<el-button
type="primary"
@click="handleAdd"
v-if="tabPosition == 'recorderLineSetting'"
<el-button type="primary" @click="handleAdd" v-if="tabPosition == 'recorderLineSetting'"
>新增</el-button
>
<el-button
@ -108,8 +107,8 @@
>
</template>
</avue-crud>
</el-tab-pane>
<el-tab-pane label="记录仪历史曲线" name="recorderHistoryLine">
<div v-if="tabPosition == 'recorderHistoryLine'">
<el-form
:inline="true"
:model="searchForm"
@ -140,8 +139,8 @@
<div style="width: 100%; height: 70vh">
<div style="width: 100%; height: 100%" ref="historyCurve"></div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<el-dialog append-to-body title="详情" width="80%" v-model="detailDialog">
<avue-crud
class="detail-crud-option"
@ -216,14 +215,9 @@
<el-button type="primary" @click="insertEvent()">插入一行</el-button>
<el-button plain type="danger" @click="remove">删除选择行</el-button>
</div>
<el-form
ref="tableForm"
:model="lineForm"
:rules="formRules"
label-width="0px"
>
<el-form ref="tableForm" :model="lineForm" :rules="formRules" label-width="0px">
<!-- 全局错误提示 -->
<div v-if="formError" class="error-message" style="color: #f56c6c; margin-bottom: 10px;">
<div v-if="formError" class="error-message" style="color: #f56c6c; margin-bottom: 10px">
{{ formError }}
</div>
<el-table :data="lineForm.settingData" @select="selectChange">
@ -234,23 +228,29 @@
</template>
<template #default="scope">
<el-form-item :prop="`settingData[${scope.$index}].name`" :rules="formRules.name">
<el-input style="margin-top:10px;" v-model="scope.row.name"></el-input>
<el-input style="margin-top: 10px" v-model="scope.row.name"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="参数显示名称" prop="showName" align="center">
<template #default="scope">
<el-form-item :prop="`settingData[${scope.$index}].showName`" :rules="formRules.showName">
<el-input style="margin-top:10px;" v-model="scope.row.showName"></el-input>
<el-form-item
:prop="`settingData[${scope.$index}].showName`"
:rules="formRules.showName"
>
<el-input style="margin-top: 10px" v-model="scope.row.showName"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="是否显示曲线图" prop="showGraph" align="center">
<template #default="scope">
<el-form-item :prop="`settingData[${scope.$index}].showGraph`" :rules="formRules.showGraph">
<div style="width:100%;display:flex;justify-content: center;">
<el-form-item
:prop="`settingData[${scope.$index}].showGraph`"
:rules="formRules.showGraph"
>
<div style="width: 100%; display: flex; justify-content: center">
<el-switch
style="margin-top:10px;"
style="margin-top: 10px"
v-model="scope.row.showGraph"
active-color="#13ce66"
inactive-color="#ff4949"
@ -265,7 +265,7 @@
<!-- <el-input v-model="scope.row.crcX"></el-input> -->
<el-form-item :prop="`settingData[${scope.$index}].crcX`" :rules="formRules.crcX">
<el-input
style="margin-top:10px;"
style="margin-top: 10px"
v-model.number="scope.row.crcX"
oninput="scope.row.crcX=scope.row.crcX.replace(/[^\d]/g,'')"
></el-input>
@ -286,9 +286,23 @@
<script>
import recorderColumnData from './js/recorderColumnData';
import { getRecorderList,addRecorder,updateRecorder,deleteRecorder,getRecorderDetail,addpackCycle,
getpackCycleList,updatepackCycle,getRecorderLineSetting,addRecorderLineSetting,getRecorderLineSettingDetail,
updateRecorderLineSetting,deleteRecorderLineSetting,getRecorderHistoryLine,getRecorderHistoryDetail } from '@/api/equiptManagement/recorderList';
import {
getRecorderList,
addRecorder,
updateRecorder,
deleteRecorder,
getRecorderDetail,
addpackCycle,
getpackCycleList,
updatepackCycle,
getRecorderLineSetting,
addRecorderLineSetting,
getRecorderLineSettingDetail,
updateRecorderLineSetting,
deleteRecorderLineSetting,
getRecorderHistoryLine,
getRecorderHistoryDetail,
} from '@/api/equiptManagement/recorderList';
export default {
data() {
return {
@ -306,7 +320,7 @@ export default {
data: [],
form: {},
lineForm: {
settingData:[]
settingData: [],
},
detailDialog: false,
detailData: [],
@ -458,7 +472,7 @@ export default {
required: true,
message: '请至少添加一行数据',
trigger: 'submit',
type: 'array' //
type: 'array', //
},
{
validator: (rule, value, callback) => {
@ -468,15 +482,13 @@ export default {
callback();
}
},
trigger: 'submit'
}
trigger: 'submit',
},
],
// name
name: [
{ required: true, message: '请输入参数名称', trigger: ['change', 'submit'] }
],
}
name: [{ required: true, message: '请输入参数名称', trigger: ['change', 'submit'] }],
},
};
},
mounted() {
@ -491,19 +503,19 @@ export default {
let params = {
code: this.searchForm.code,
startDate: this.searchForm.queryDate[0],
endDate: this.searchForm.queryDate[1]
}
endDate: this.searchForm.queryDate[1],
};
getRecorderHistoryLine(params).then(res => {
console.log('res-----------',res)
console.log('res-----------', res);
let chartData = {
yArray: res.data.data.yarray,
crcX: res.data.data.x,
xData:res.data.data.xdata
}
xData: res.data.data.xdata,
};
this.$nextTick(() => {
this.setEchart(chartData);
});
})
});
// let chartData = {
// yArray: [
// {
@ -778,69 +790,67 @@ export default {
});
},
searchChange(params, done) {
if (this.tabPosition == "recorder") {
if (this.tabPosition == 'recorder') {
this.query = params;
this.query.crtCode = this.query.recorder
this.query.crtCode = this.query.recorder;
this.recorderPage.currentPage = 1;
this.getRecorder()
done()
this.getRecorder();
done();
} else if (this.tabPosition == 'recorderLineSetting') {
this.lineQuery = params;
this.recorderLinePage.currentPage = 1
this.getRecorderLine()
done()
this.recorderLinePage.currentPage = 1;
this.getRecorderLine();
done();
}
},
remoteMethod(query) {
if (query) {
this.selectLoading = true
this.selectLoading = true;
getRecorderList({ crtCode: query }).then(res => {
this.codeArr = res.data.data.records
this.selectLoading = false
})
this.codeArr = res.data.data.records;
this.selectLoading = false;
});
} else {
getRecorderList({ crtCode: '' }).then(res => {
this.codeArr = res.data.data.records
this.selectLoading = false
})
this.codeArr = res.data.data.records;
this.selectLoading = false;
});
// this.codeArr = []
}
},
searchReset() {
if (this.tabPosition == "recorder") {
this.query = {}
this.getRecorder()
}else if(this.tabPosition == "recorderLineSetting"){
this.lineQuery = {}
this.getRecorderLine()
if (this.tabPosition == 'recorder') {
this.query = {};
this.getRecorder();
} else if (this.tabPosition == 'recorderLineSetting') {
this.lineQuery = {};
this.getRecorderLine();
}
},
handleDelete() {
if (this.selectionList.length == 0) {
this.$message.error('请至少选择一条数据')
return
this.$message.error('请至少选择一条数据');
return;
}
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
if(this.tabPosition == "recorderLineSetting"){
if (this.tabPosition == 'recorderLineSetting') {
deleteRecorderLineSetting({
ids:this.selectionList.map(item => item.id).join(',')
ids: this.selectionList.map(item => item.id).join(','),
}).then(res => {
if (res.data.code == 200) {
this.$message.success('删除成功')
this.getRecorderLine()
this.$message.success('删除成功');
this.getRecorderLine();
}
})
});
}
})
});
},
selectionChange(list) {
this.selectionList = list
this.selectionList = list;
},
getRecorder() {
getRecorderList({
@ -856,11 +866,11 @@ export default {
getRecorderLineSetting({
current: this.recorderLinePage.currentPage,
size: this.recorderLinePage.pageSize,
...this.lineQuery
...this.lineQuery,
}).then(res => {
this.data = res.data.data.records
this.recorderLinePage.total = res.data.data.total
})
this.data = res.data.data.records;
this.recorderLinePage.total = res.data.data.total;
});
},
// tab
tabPositionChange(val) {
@ -869,14 +879,14 @@ export default {
this.option.column = recorderColumnData[val];
if (this.tabPosition == 'recorderLineSetting') {
this.option.addBtn = false;
this.option.menuAlign = "center"
this.option.menuWidth = 70
this.option.selection = true
this.getRecorderLine()
this.option.menuAlign = 'center';
this.option.menuWidth = 70;
this.option.selection = true;
this.getRecorderLine();
} else if (this.tabPosition == 'recorder') {
this.option.addBtn = true
this.option.menuWidth = 150
this.option.selection = false
this.option.addBtn = true;
this.option.menuWidth = 150;
this.option.selection = false;
this.getRecorder();
}
},
@ -888,47 +898,49 @@ export default {
row._select = !row._select;
},
rowSave(row, done, loading) {
if(this.tabPosition == "recorder"){
if (this.tabPosition == 'recorder') {
let params = {
crtCode: row.crtCode,
memo:row.memo
}
addRecorder(params).then(res =>{
memo: row.memo,
};
addRecorder(params)
.then(res => {
if (res.data.code == 200) {
this.$message.success('新增成功')
done()
this.getRecorder()
this.$message.success('新增成功');
done();
this.getRecorder();
}
}).catch(err =>{
done()
})
.catch(err => {
done();
});
}
},
rowUpdate(row, index, done, loading) {
if(this.tabPosition == "recorder"){
if (this.tabPosition == 'recorder') {
let params = {
id: row.id,
crtCode: row.crtCode,
memo:row.memo
}
memo: row.memo,
};
updateRecorder(params).then(res => {
if (res.data.code == 200) {
this.$message.success('修改成功')
done()
this.getRecorder()
this.$message.success('修改成功');
done();
this.getRecorder();
}
})
});
}
},
beforeOpen(done, type) {
console.log('type=============',type)
console.log('type=============', type);
if (['edit', 'view'].includes(type)) {
getRecorderDetail({ id: this.form.id }).then(res => {
this.form = res.data.data;
done()
done();
});
} else if (['add'].includes(type)) {
done()
done();
}
},
remove() {
@ -951,16 +963,16 @@ export default {
}
},
closeDialog() {
this.formError = ''
this.formError = '';
this.$refs.tableForm?.resetFields();
this.lineForm.settingData = []
this.addDialog = false
this.lineForm.settingData = [];
this.addDialog = false;
},
handleSave() {
this.formError = '';
if (this.deviceCode == '' && this.addType == 'add') {
this.$message.error('设备编码不能为空')
return
this.$message.error('设备编码不能为空');
return;
}
// Form
@ -979,49 +991,49 @@ export default {
return;
}
this.lineForm.settingData.map(item => {
item.code = this.addType == 'add' ? this.deviceCode : item.code
item.showGraph = item.showGraph == true ? 1 : 0
})
item.code = this.addType == 'add' ? this.deviceCode : item.code;
item.showGraph = item.showGraph == true ? 1 : 0;
});
if (this.addType == 'add') {
addRecorderLineSetting({
code: this.deviceCode,
recorderCompareEntities:this.lineForm.settingData
recorderCompareEntities: this.lineForm.settingData,
}).then(res => {
if (res.data.code == 200) {
this.$message.success('新增成功')
this.getRecorderLine()
this.$message.success('新增成功');
this.getRecorderLine();
this.addDialog = false;
}
})
});
} else {
updateRecorderLineSetting({ ...this.lineForm.settingData[0] }).then(res => {
if (res.data.code == 200) {
this.$message.success('修改成功')
this.getRecorderLine()
this.$message.success('修改成功');
this.getRecorderLine();
this.addDialog = false;
}
})
});
}
// this.addDialog = false;
})
});
},
rowEdit(row, index) {
if (this.tabPosition == 'recorder') {
this.$refs.crud.rowEdit(row, index);
} else if (this.tabPosition == 'recorderLineSetting') {
this.lineForm.settingData = []
this.lineForm.settingData = [];
this.addType = 'edit';
getRecorderLineSettingDetail({
id:row.id
id: row.id,
}).then(res => {
console.log('res00000000000000000',res)
res.data.data.showGraph = res.data.data.showGraph == 1 ? true : false
this.lineForm.settingData[0] = res.data.data
console.log('res00000000000000000', res);
res.data.data.showGraph = res.data.data.showGraph == 1 ? true : false;
this.lineForm.settingData[0] = res.data.data;
setTimeout(() => {
this.addDialog = true;
},100)
})
}, 100);
});
}
},
showDetail(row) {
@ -1035,11 +1047,11 @@ export default {
setCycle() {
getpackCycleList({
current: 1,
size:10
size: 10,
}).then(res => {
this.setForm = res.data.data.records.length > 0 ? res.data.data.records[0] : {}
this.setForm = res.data.data.records.length > 0 ? res.data.data.records[0] : {};
this.settingDialog = true;
})
});
},
handleAdd() {
this.addType = 'add';
@ -1054,8 +1066,8 @@ export default {
if (this.tabPosition == 'recorder') {
deleteRecorder({ ids: row.id }).then(res => {
if (res.data.code == 200) {
this.$message.success('删除成功')
this.getRecorder()
this.$message.success('删除成功');
this.getRecorder();
}
});
}
@ -1067,19 +1079,18 @@ export default {
if (!this.setForm.id) {
addpackCycle(this.setForm).then(res => {
if (res.data.code == 200) {
this.$message.success('保存成功')
this.$message.success('保存成功');
this.settingDialog = false;
}
});
} else {
updatepackCycle(this.setForm).then(res => {
if (res.data.code == 200) {
this.$message.success('保存成功')
this.$message.success('保存成功');
this.settingDialog = false;
}
})
});
}
}
});
},
@ -1088,21 +1099,21 @@ export default {
// id:this.detailId,
recorder: this.detailId,
current: this.detailPage.currentPage,
size:this.detailPage.pageSize
size: this.detailPage.pageSize,
}).then(res => {
console.log('res',res)
this.detailData = res.data.data.records
this.detailPage.total = res.data.data.total
console.log('res', res);
this.detailData = res.data.data.records;
this.detailPage.total = res.data.data.total;
this.detailDialog = true;
})
});
},
detailCurrentChange(currentPage) {
this.detailPage.currentPage = currentPage
this.loadData()
this.detailPage.currentPage = currentPage;
this.loadData();
},
detailSizeChange(pageSize) {
this.detailPage.pageSize = pageSize
this.loadData()
this.detailPage.pageSize = pageSize;
this.loadData();
},
onLoad() {
this.data = [

Loading…
Cancel
Save