yangwl
A0010407 1 year ago
parent 3ebef94a3d
commit ce92f7e861

@ -117,7 +117,12 @@
<el-table-column label="班组编号" align="center" prop="teamCode" /> <el-table-column label="班组编号" align="center" prop="teamCode" />
<el-table-column label="班组名称" align="center" prop="teamName" /> <el-table-column label="班组名称" align="center" prop="teamName" />
<el-table-column label="班组类型" align="center" prop="teamType" /> <el-table-column label="班组类型" align="center" prop="teamType" />
<el-table-column label="班组人员" align="center" prop="teamPerson" width="250"/> <el-table-column
label="班组人员"
align="center"
prop="teamPerson"
width="250"
/>
<el-table-column label="工厂号" align="center" prop="factoryCode" /> <el-table-column label="工厂号" align="center" prop="factoryCode" />
<el-table-column <el-table-column
label="操作" label="操作"
@ -154,35 +159,40 @@
/> />
<!-- 添加或修改设备班组维护对话框 --> <!-- 添加或修改设备班组维护对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> <el-dialog
:title="title"
:visible.sync="open"
width="1000px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="8">
<el-form-item label="班组编号" prop="teamCode"> <el-form-item label="班组编号" prop="teamCode">
<el-input <el-input
v-model="form.teamCode" v-model="form.teamCode"
placeholder="请输入班组编号" placeholder="请输入班组编号"
style="width: 300px" style="width: 200px"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="8">
<el-form-item label="班组名称" prop="teamName"> <el-form-item label="班组名称" prop="teamName">
<el-input <el-input
v-model="form.teamName" v-model="form.teamName"
placeholder="请输入班组名称" placeholder="请输入班组名称"
style="width: 300px" style="width: 200px"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="8">
<el-form-item label="班组类型" prop="teamType"> <el-form-item label="班组类型" prop="teamType">
<el-select <el-select
v-model="form.teamType" v-model="form.teamType"
placeholder="请选择班组类型" placeholder="请选择班组类型"
@change="$forceUpdate()" @change="$forceUpdate()"
clearable clearable
style="width: 300px" style="width: 200px"
> >
<el-option <el-option
v-for="item in teamTypeOption" v-for="item in teamTypeOption"
@ -197,8 +207,8 @@
<el-form-item label="班组人员" prop="teamPerson"> <el-form-item label="班组人员" prop="teamPerson">
<el-input <el-input
v-model="form.teamPerson" v-model="form.teamPerson"
placeholder="请选择班组人员" placeholder="请选择班组人员名字"
style="width: 680px" style="width: 840px"
> >
<el-button <el-button
slot="append" slot="append"
@ -216,7 +226,7 @@
</el-row> </el-row>
<el-divider></el-divider> <el-divider></el-divider>
<el-card> <el-card>
<div class = "my-team"> <div class="my-team">
<template> <template>
<el-transfer <el-transfer
filterable filterable
@ -258,6 +268,8 @@ export default {
components: { ItemSelectPerson }, components: { ItemSelectPerson },
data() { data() {
return { return {
//
// peopleList: [],
// //
leftList: [], leftList: [],
// key // key
@ -325,15 +337,20 @@ export default {
// //
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.queryParams.pageSize = 2000; this.queryParams.pageSize = 2000;
listTeamMembers(this.queryParams).then(response => { listTeamMembers(this.queryParams).then((response) => {
for(let i in response.rows){ for (let i in response.rows) {
// 穿 // 穿
this.leftList.push({ this.leftList.push({
key: response.rows[i].userId, key: response.rows[i].userId,
label: response.rows[i].teamUserName label: response.rows[i].teamUserName,
}) });
// this.peopleList.push({
// key: response.rows[i].userId,
// label: response.rows[i].nickName
// })
} }
for(let i in response.selected){ for (let i in response.selected) {
this.rightList.push(response.selected[i].key); this.rightList.push(response.selected[i].key);
this.form.rightData = this.rightList; this.form.rightData = this.rightList;
} }
@ -407,13 +424,11 @@ export default {
const id = row.id || this.ids; const id = row.id || this.ids;
getEquTeam(id).then((response) => { getEquTeam(id).then((response) => {
this.form = response.data; this.form = response.data;
for(let i in response.data.selectedData){ for (let i in response.data.selectedData) {
// 穿 // 穿
this.rightList.push( this.rightList.push(response.data.selectedData[i].userId);
response.data.selectedData[i].userId }
) console.log("response.data.selectedData", response.data.selectedData);
};
console.log('response.data.selectedData',response.data.selectedData);
this.open = true; this.open = true;
this.title = "修改设备班组维护"; this.title = "修改设备班组维护";
}); });
@ -422,9 +437,26 @@ export default {
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
var people = "";
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
this.form.rightData = this.rightList; this.form.rightData = this.rightList;
// if(this.form.rightData != null){
// this.form.rightData.forEach((item) => {
// this.peopleList.forEach((item1) => {
// if(item1.key == item){
// this.form.teamPerson = [];
// this.form.teamPerson.push(item1.label);
// }
// });
// });
// }
// if (Array.isArray(this.form.teamPerson)) {
// this.form.teamPerson = this.listToString(this.form.teamPerson);
// }
updateEquTeam(this.form).then((response) => { updateEquTeam(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
@ -474,6 +506,15 @@ export default {
}) })
.catch(() => {}); .catch(() => {});
}, },
//
// listToString(list, separator) {
// let strs = "";
// separator = separator || ",";
// for (let i in list) {
// strs += list[i].url + separator;
// }
// return strs != "" ? strs.substr(0, strs.length - 1) : "";
// },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download( this.download(
@ -489,11 +530,11 @@ export default {
</script> </script>
<style> <style>
.el-transfer-panel{ .el-transfer-panel {
width: 320px; width: 320px;
height: 400px; height: 400px;
} }
.el-transfer-panel__list.is-filterable{ .el-transfer-panel__list.is-filterable {
height: 300px; height: 300px;
} }
</style> </style>

@ -316,9 +316,14 @@
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-tabs type="border-card"> <el-tabs type="border-card" :key="new Date().getTime()">
<el-tab-pane label="基本信息"> <el-tab-pane label="基本信息">
<el-descriptions :column="3" border> <el-descriptions
:column="3"
border
:contentStyle="CS"
:label-style="LS"
>
<el-descriptions-item label="设备编码">{{ <el-descriptions-item label="设备编码">{{
form.equipmentCode form.equipmentCode
}}</el-descriptions-item> }}</el-descriptions-item>
@ -342,7 +347,11 @@
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="1" border> <el-descriptions :column="1" border>
<el-descriptions-item label="故障图片"> <el-descriptions-item
label="故障图片"
:contentStyle="CS"
:label-style="LSP"
>
<el-image <el-image
v-for="(item, index) in urlLists" v-for="(item, index) in urlLists"
:key="index" :key="index"
@ -351,17 +360,17 @@
></el-descriptions-item> ></el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息"> <el-tab-pane label="检查项信息" v-if="checkList != null">
<el-table :data="checkList" border style="width: 100%"> <el-table :data="checkList" border style="width: 100%">
<el-table-column prop="itemName" label="检查项名称" width="200"> <el-table-column prop="itemName" label="检查项名称" width="200">
</el-table-column> </el-table-column>
<el-table-column prop="itemMethod" label="检查项方法" width="200"> <el-table-column prop="itemMethod" label="检查项方法" width="160">
</el-table-column> </el-table-column>
<el-table-column prop="standardName" label="标准名称" width="180"> <el-table-column prop="standardName" label="标准名称" width="180">
</el-table-column> </el-table-column>
<el-table-column prop="standardType" label="标准类型" width="100"> <el-table-column prop="standardType" label="标准类型" width="85">
</el-table-column> </el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="50"> <el-table-column prop="detailReach" label="是否达标" width="85">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:options="dict.type.device_reach_standard" :options="dict.type.device_reach_standard"
@ -369,13 +378,13 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualValue" label="实际值" width="50"> <el-table-column prop="actualValue" label="实际值" width="70">
</el-table-column> </el-table-column>
<el-table-column prop="detailUpLimit" label="上限" width="50"> <el-table-column prop="detailUpLimit" label="上限" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50"> <el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="单位" width="45"> <el-table-column prop="detailUnit" label="单位" width="47">
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
@ -605,9 +614,14 @@
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-tabs type="border-card"> <el-tabs type="border-card" :key="new Date().getTime()">
<el-tab-pane label="基本信息"> <el-tab-pane label="基本信息">
<el-descriptions :column="3" border> <el-descriptions
:column="3"
border
:contentStyle="CS"
:label-style="LS"
>
<el-descriptions-item label="设备编码">{{ <el-descriptions-item label="设备编码">{{
form.equipmentCode form.equipmentCode
}}</el-descriptions-item> }}</el-descriptions-item>
@ -645,8 +659,12 @@
form.orderDesc form.orderDesc
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="1" border> <el-descriptions :column="1" border :contentStyle="CS" :label-style="LSP2">
<el-descriptions-item label="故障图片"> <el-descriptions-item
label="故障图片"
:contentStyle="CS"
:label-style="LSP"
>
<el-image <el-image
v-for="(item, index) in urlLists" v-for="(item, index) in urlLists"
:key="index" :key="index"
@ -655,6 +673,34 @@
></el-descriptions-item> ></el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息" v-if="checkList != null">
<el-table :data="checkList" border style="width: 100%">
<el-table-column prop="itemName" label="检查项名称" width="200">
</el-table-column>
<el-table-column prop="itemMethod" label="检查项方法" width="160">
</el-table-column>
<el-table-column prop="standardName" label="标准名称" width="180">
</el-table-column>
<el-table-column prop="standardType" label="标准类型" width="85">
</el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="85">
<template slot-scope="scope">
<dict-tag
:options="dict.type.device_reach_standard"
:value="scope.row.detailReach"
/>
</template>
</el-table-column>
<el-table-column prop="actualValue" label="实际值" width="70">
</el-table-column>
<el-table-column prop="detailUpLimit" label="上限" width="50">
</el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column>
<el-table-column prop="detailUnit" label="单位" width="47">
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="报修审核结果"> <el-tab-pane label="报修审核结果">
<el-descriptions <el-descriptions
@ -739,35 +785,6 @@
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息" v-if="checkList != null ">
<el-table :data="checkList" border style="width: 100%">
<el-table-column prop="itemName" label="检查项名称" width="200">
</el-table-column>
<el-table-column prop="itemMethod" label="检查项方法" width="200">
</el-table-column>
<el-table-column prop="standardName" label="标准名称" width="180">
</el-table-column>
<el-table-column prop="standardType" label="标准类型" width="85">
</el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="65">
<template slot-scope="scope">
<dict-tag
:options="dict.type.device_reach_standard"
:value="scope.row.detailReach"
/>
</template>
</el-table-column>
<el-table-column prop="actualValue" label="实际值" width="50">
</el-table-column>
<el-table-column prop="detailUpLimit" label="上限" width="50">
</el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column>
<el-table-column prop="detailUnit" label="单位" width="47">
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs> </el-tabs>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -917,7 +934,7 @@
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-tabs type="border-card"> <el-tabs type="border-card" :key="new Date().getTime()">
<el-tab-pane label="基本信息"> <el-tab-pane label="基本信息">
<el-descriptions <el-descriptions
:column="3" :column="3"
@ -951,7 +968,7 @@
<el-descriptions-item <el-descriptions-item
label="故障图片" label="故障图片"
:contentStyle="CS" :contentStyle="CS"
:label-style="LS" :label-style="LSP"
> >
<el-image <el-image
v-for="(item, index) in urlLists" v-for="(item, index) in urlLists"
@ -961,17 +978,17 @@
></el-descriptions-item> ></el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息" v-if="checkList != null "> <el-tab-pane label="检查项信息" v-if="checkList != null">
<el-table :data="checkList" border style="width: 100%"> <el-table :data="checkList" border style="width: 100%">
<el-table-column prop="itemName" label="检查项名称" width="200"> <el-table-column prop="itemName" label="检查项名称" width="200">
</el-table-column> </el-table-column>
<el-table-column prop="itemMethod" label="检查项方法" width="200"> <el-table-column prop="itemMethod" label="检查项方法" width="160">
</el-table-column> </el-table-column>
<el-table-column prop="standardName" label="标准名称" width="180"> <el-table-column prop="standardName" label="标准名称" width="180">
</el-table-column> </el-table-column>
<el-table-column prop="standardType" label="标准类型" width="85"> <el-table-column prop="standardType" label="标准类型" width="85">
</el-table-column> </el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="65"> <el-table-column prop="detailReach" label="是否达标" width="85">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:options="dict.type.device_reach_standard" :options="dict.type.device_reach_standard"
@ -979,7 +996,7 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualValue" label="实际值" width="50"> <el-table-column prop="actualValue" label="实际值" width="70">
</el-table-column> </el-table-column>
<el-table-column prop="detailUpLimit" label="上限" width="50"> <el-table-column prop="detailUpLimit" label="上限" width="50">
</el-table-column> </el-table-column>
@ -1021,22 +1038,17 @@ export default {
return { return {
CS: { CS: {
"text-align": "center", // "text-align": "center", //
"min-width": "100px", //
"word-break": "break-all", //
}, },
LS: { LS: {
color: "#000",
"text-align": "center", "text-align": "center",
},
"font-weight": "600", LSP: {
"text-align": "center",
height: "40px", width: "110px",
},
"min-width": "110px", LSP2: {
"text-align": "center",
"word-break": "keep-all", width: "120px",
}, },
teamOption: [], teamOption: [],
// //
@ -1319,8 +1331,16 @@ export default {
}); });
this.form.fileList = newFiles; this.form.fileList = newFiles;
} }
if (
this.form.orderSource == "点检" ||
this.form.orderSource == "巡检"
) {
Message.warning("点检、巡检报修信息自动生成,不可修改!");
} else {
this.open = true; this.open = true;
this.title = "修改故障报修"; this.title = "修改故障报修";
}
}); });
}, },
/** 查看按钮操作 */ /** 查看按钮操作 */
@ -1331,10 +1351,10 @@ export default {
this.form = response.data; this.form = response.data;
if (response.data.files != null) { if (response.data.files != null) {
var newFiles = []; var newFiles = [];
console.log("1",response.data.files) console.log("1", response.data.files);
response.data.files.forEach((item) => { response.data.files.forEach((item) => {
var newFile = {}; var newFile = {};
console.log("2",response.data.files) console.log("2", response.data.files);
newFile.name = item.fileName; newFile.name = item.fileName;
newFile.url = item.fileAddress; newFile.url = item.fileAddress;
newFiles.push(newFile); newFiles.push(newFile);
@ -1347,7 +1367,7 @@ export default {
}); });
this.urlLists = urlLists; this.urlLists = urlLists;
console.log("2222222222", this.urlLists); console.log("2222222222", this.urlLists);
} else if(response.data.files == null) { } else if (response.data.files == null) {
this.urlLists = null; this.urlLists = null;
} }
this.checkList = null; this.checkList = null;

@ -32,7 +32,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="sparePartsLedgerList" @selection-change="handleSelectionChange" ref="multipleTable"> <el-table v-loading="loading" :data="sparePartsLedgerList" @selection-change="handleSelectionChange" ref="multipleTable" >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- 序号 --> <!-- 序号 -->
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"/> <el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"/>
@ -186,6 +186,7 @@ export default {
cancel() { cancel() {
this.showFlag = false; this.showFlag = false;
this.reset(); this.reset();
this.getList();
}, },
// //
reset() { reset() {

Loading…
Cancel
Save