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="teamName" />
<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="操作"
@ -154,83 +159,88 @@
/>
<!-- 添加或修改设备班组维护对话框 -->
<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-row>
<el-col :span="12">
<el-form-item label="班组编号" prop="teamCode">
<el-input
v-model="form.teamCode"
placeholder="请输入班组编号"
style="width: 300px"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="班组名称" prop="teamName">
<el-input
v-model="form.teamName"
placeholder="请输入班组名称"
style="width: 300px"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="班组类型" prop="teamType">
<el-select
v-model="form.teamType"
placeholder="请选择班组类型"
@change="$forceUpdate()"
clearable
style="width: 300px"
>
<el-option
v-for="item in teamTypeOption"
:key="item.teamType"
:label="item.label"
:value="item.teamType"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="班组人员" prop="teamPerson">
<el-input
v-model="form.teamPerson"
placeholder="请选择班组人员"
style="width: 680px"
>
<el-button
slot="append"
@click="handleSelectPerson"
icon="el-icon-search"
></el-button>
</el-input>
<ItemSelectPerson
ref="itemSelectPerson"
@onSelected="onItemSelectedPerson"
>
</ItemSelectPerson>
</el-form-item>
</el-col>
<el-row>
<el-col :span="8">
<el-form-item label="班组编号" prop="teamCode">
<el-input
v-model="form.teamCode"
placeholder="请输入班组编号"
style="width: 200px"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="班组名称" prop="teamName">
<el-input
v-model="form.teamName"
placeholder="请输入班组名称"
style="width: 200px"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="班组类型" prop="teamType">
<el-select
v-model="form.teamType"
placeholder="请选择班组类型"
@change="$forceUpdate()"
clearable
style="width: 200px"
>
<el-option
v-for="item in teamTypeOption"
:key="item.teamType"
:label="item.label"
:value="item.teamType"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="班组人员" prop="teamPerson">
<el-input
v-model="form.teamPerson"
placeholder="请选择班组人员名字"
style="width: 840px"
>
<el-button
slot="append"
@click="handleSelectPerson"
icon="el-icon-search"
></el-button>
</el-input>
<ItemSelectPerson
ref="itemSelectPerson"
@onSelected="onItemSelectedPerson"
>
</ItemSelectPerson>
</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-card>
<div class = "my-team">
<template>
<el-transfer
filterable
filter-placeholder="请输入班组人员名称"
:titles="['可选班组人员', '当前班组人员']"
:button-texts="['解除添加', '添加']"
:data="leftList"
v-model="rightList"
style="text-align: left"
<el-divider></el-divider>
<el-card>
<div class="my-team">
<template>
<el-transfer
filterable
filter-placeholder="请输入班组人员名称"
:titles="['可选班组人员', '当前班组人员']"
:button-texts="['解除添加', '添加']"
:data="leftList"
v-model="rightList"
style="text-align: left"
>
</el-transfer>
</template>
</div>
</el-card>
</el-transfer>
</template>
</div>
</el-card>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -258,7 +268,9 @@ export default {
components: { ItemSelectPerson },
data() {
return {
//
//
// peopleList: [],
//
leftList: [],
// key
rightList: [],
@ -325,17 +337,22 @@ export default {
//
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 2000;
listTeamMembers(this.queryParams).then(response => {
for(let i in response.rows){
// 穿
listTeamMembers(this.queryParams).then((response) => {
for (let i in response.rows) {
// 穿
this.leftList.push({
key: response.rows[i].userId,
label: response.rows[i].teamUserName
})
key: response.rows[i].userId,
label: response.rows[i].teamUserName,
});
// this.peopleList.push({
// key: response.rows[i].userId,
// label: response.rows[i].nickName
// })
}
for(let i in response.selected){
this.rightList.push(response.selected[i].key);
this.form.rightData = this.rightList;
for (let i in response.selected) {
this.rightList.push(response.selected[i].key);
this.form.rightData = this.rightList;
}
this.loading = false;
});
@ -407,24 +424,39 @@ export default {
const id = row.id || this.ids;
getEquTeam(id).then((response) => {
this.form = response.data;
for(let i in response.data.selectedData){
for (let i in response.data.selectedData) {
// 穿
this.rightList.push(
response.data.selectedData[i].userId
)
};
console.log('response.data.selectedData',response.data.selectedData);
this.rightList.push(response.data.selectedData[i].userId);
}
console.log("response.data.selectedData", response.data.selectedData);
this.open = true;
this.title = "修改设备班组维护";
});
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
var people = "";
if (valid) {
if (this.form.id != null) {
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) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
@ -474,6 +506,15 @@ export default {
})
.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() {
this.download(
@ -489,11 +530,11 @@ export default {
</script>
<style>
.el-transfer-panel{
width: 320px;
height: 400px;
}
.el-transfer-panel__list.is-filterable{
height: 300px;
}
.el-transfer-panel {
width: 320px;
height: 400px;
}
.el-transfer-panel__list.is-filterable {
height: 300px;
}
</style>

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

@ -32,7 +32,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</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="index" width="90" align="center" :index="indexMethod" label="序号"/>
@ -186,6 +186,7 @@ export default {
cancel() {
this.showFlag = false;
this.reset();
this.getList();
},
//
reset() {

Loading…
Cancel
Save