|
|
@ -146,16 +146,16 @@
|
|
|
|
v-hasPermi="['device:faultType:remove']"
|
|
|
|
v-hasPermi="['device:faultType:remove']"
|
|
|
|
>删除</el-button>
|
|
|
|
>删除</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<!-- <el-col :span="1.5">-->
|
|
|
|
<el-button
|
|
|
|
<!-- <el-button-->
|
|
|
|
type="warning"
|
|
|
|
<!-- type="warning"-->
|
|
|
|
plain
|
|
|
|
<!-- plain-->
|
|
|
|
icon="el-icon-download"
|
|
|
|
<!-- icon="el-icon-download"-->
|
|
|
|
size="mini"
|
|
|
|
<!-- size="mini"-->
|
|
|
|
@click="handleExport"
|
|
|
|
<!-- @click="handleExport"-->
|
|
|
|
v-hasPermi="['device:faultType:export']"
|
|
|
|
<!-- v-hasPermi="['device:faultType:export']"-->
|
|
|
|
>导出</el-button>
|
|
|
|
<!-- >导出</el-button>-->
|
|
|
|
</el-col>
|
|
|
|
<!-- </el-col>-->
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
@ -163,23 +163,23 @@
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
|
|
|
|
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
|
|
|
|
<el-table-column v-if="false" label="主键" align="center" prop="faultId" />
|
|
|
|
<el-table-column v-if="false" label="主键" align="center" prop="faultId" />
|
|
|
|
<el-table-column label="故障类型编码" align="center" prop="faultCode" />
|
|
|
|
<el-table-column width="150" label="故障类型编码" align="center" prop="faultCode" />
|
|
|
|
<el-table-column label="故障类型" align="center" prop="faultType" />
|
|
|
|
<el-table-column width="150" label="故障类型" align="center" prop="faultType" />
|
|
|
|
<el-table-column label="故障子类" align="center" prop="faultSubclass" />
|
|
|
|
<el-table-column width="150" label="故障子类" align="center" prop="faultSubclass" />
|
|
|
|
<el-table-column label="备注" align="center" prop="faultRemark" />
|
|
|
|
<el-table-column width="180" label="备注" align="center" prop="faultRemark" />
|
|
|
|
<el-table-column v-if="false" label="工厂编码" align="center" prop="factoryCode" />
|
|
|
|
<el-table-column v-if="false" label="工厂编码" align="center" prop="factoryCode" />
|
|
|
|
<el-table-column v-if="false" label="备用字段1" align="center" prop="attr1" />
|
|
|
|
<el-table-column v-if="false" label="备用字段1" align="center" prop="attr1" />
|
|
|
|
<el-table-column v-if="false" label="备用字段2" align="center" prop="attr2" />
|
|
|
|
<el-table-column v-if="false" label="备用字段2" align="center" prop="attr2" />
|
|
|
|
<el-table-column v-if="false" label="备用字段3" align="center" prop="attr3" />
|
|
|
|
<el-table-column v-if="false" label="备用字段3" align="center" prop="attr3" />
|
|
|
|
<el-table-column v-if="false" label="删除标志" align="center" prop="delFlag" />
|
|
|
|
<el-table-column v-if="false" label="删除标志" align="center" prop="delFlag" />
|
|
|
|
<el-table-column label="创建人" align="center" prop="createBy" />
|
|
|
|
<el-table-column width="100" label="创建人" align="center" prop="createBy" />
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
|
|
|
<el-table-column width="180" label="创建时间" align="center" prop="createTime">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="更新人" align="center" prop="updateBy" />
|
|
|
|
<el-table-column width="100" label="更新人" align="center" prop="updateBy" />
|
|
|
|
<el-table-column label="更新时间" align="center" prop="updateTime" width="180">
|
|
|
|
<el-table-column width="180" label="更新时间" align="center" prop="updateTime">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -385,15 +385,19 @@ export default {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if (this.form.faultId != null) {
|
|
|
|
if (this.form.faultId != null) {
|
|
|
|
updateFaultType(this.form).then(response => {
|
|
|
|
updateFaultType(this.form).then(response => {
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
if (response.code != 500) {
|
|
|
|
this.open = false;
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.getList();
|
|
|
|
this.open = false;
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
addFaultType(this.form).then(response => {
|
|
|
|
addFaultType(this.form).then(response => {
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
if (response.code != 500) {
|
|
|
|
this.open = false;
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.getList();
|
|
|
|
this.open = false;
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -402,7 +406,26 @@ export default {
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
handleDelete(row) {
|
|
|
|
handleDelete(row) {
|
|
|
|
const faultIds = row.faultId || this.ids;
|
|
|
|
const faultIds = row.faultId || this.ids;
|
|
|
|
this.$modal.confirm('是否确认删除故障类型维护编号为"' + faultIds + '"的数据项?').then(function() {
|
|
|
|
var faultCodes = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 处理信息
|
|
|
|
|
|
|
|
for (let i = 0; i < this.faultTypeList.length; i++) {
|
|
|
|
|
|
|
|
for (let j = 0; j < faultIds.length; j++) {
|
|
|
|
|
|
|
|
if (faultIds[j] == this.faultTypeList[i].faultId) {
|
|
|
|
|
|
|
|
faultCodes = faultCodes + this.faultTypeList[i].faultCode + ',';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (faultCodes == '') {
|
|
|
|
|
|
|
|
for (let i = 0; i < this.faultTypeList.length; i++) {
|
|
|
|
|
|
|
|
if (faultIds == this.faultTypeList[i].faultId) {
|
|
|
|
|
|
|
|
faultCodes = this.faultTypeList[i].faultCode;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$modal.confirm('是否确认删除故障类型维护编号为"' + faultCodes + '"的数据项?').then(function() {
|
|
|
|
return delFaultType(faultIds);
|
|
|
|
return delFaultType(faultIds);
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|