|
@@ -56,7 +56,8 @@
|
|
|
size="small"
|
|
size="small"
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
@change="handleRuleNameChange"
|
|
@change="handleRuleNameChange"
|
|
|
- :disabled="isBindPlan"
|
|
|
|
|
|
|
+ :disabled="isBindPlan"
|
|
|
|
|
+ filterable
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in ruleNameList"
|
|
v-for="item in ruleNameList"
|
|
@@ -84,7 +85,7 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="设备分类" prop="categoryLevelId">
|
|
<el-form-item label="设备分类" prop="categoryLevelId">
|
|
|
- <ele-tree-select
|
|
|
|
|
|
|
+ <!-- <ele-tree-select
|
|
|
clearable
|
|
clearable
|
|
|
:data="classifyTree"
|
|
:data="classifyTree"
|
|
|
v-model="addForm.categoryLevelId"
|
|
v-model="addForm.categoryLevelId"
|
|
@@ -93,7 +94,8 @@
|
|
|
labelKey="name"
|
|
labelKey="name"
|
|
|
valueKey="id"
|
|
valueKey="id"
|
|
|
@change="chooseClassify"
|
|
@change="chooseClassify"
|
|
|
- />
|
|
|
|
|
|
|
+ /> -->
|
|
|
|
|
+ <equipmentSelect v-model="addForm.categoryLevelId" @changeNode="chooseClassify" @setRootId="getRootId"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
@@ -102,7 +104,8 @@
|
|
|
v-model="addForm.categoryId"
|
|
v-model="addForm.categoryId"
|
|
|
size="small"
|
|
size="small"
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
- :disabled="isBindPlan"
|
|
|
|
|
|
|
+ :disabled="isBindPlan"
|
|
|
|
|
+ filterable
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in equipmentList"
|
|
v-for="item in equipmentList"
|
|
@@ -121,7 +124,8 @@
|
|
|
size="small"
|
|
size="small"
|
|
|
clearable
|
|
clearable
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
- :disabled="isBindPlan"
|
|
|
|
|
|
|
+ :disabled="isBindPlan"
|
|
|
|
|
+ filterable
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in uerList"
|
|
v-for="item in uerList"
|
|
@@ -134,7 +138,8 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8" v-if="addForm.autoOrder">
|
|
<el-col :span="8" v-if="addForm.autoOrder">
|
|
|
<el-form-item :label="formLabel + '部门'" prop="groupId">
|
|
<el-form-item :label="formLabel + '部门'" prop="groupId">
|
|
|
- <ele-tree-select
|
|
|
|
|
|
|
+ <deptSelect v-model="addForm.groupId" @changeGroup="searchDeptNodeClick"/>
|
|
|
|
|
+ <!-- <ele-tree-select
|
|
|
clearable
|
|
clearable
|
|
|
:data="deptData"
|
|
:data="deptData"
|
|
|
v-model="addForm.groupId"
|
|
v-model="addForm.groupId"
|
|
@@ -143,7 +148,7 @@
|
|
|
labelKey="name"
|
|
labelKey="name"
|
|
|
valueKey="id"
|
|
valueKey="id"
|
|
|
@change="searchDeptNodeClick"
|
|
@change="searchDeptNodeClick"
|
|
|
- />
|
|
|
|
|
|
|
+ /> -->
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8" v-if="addForm.autoOrder">
|
|
<el-col :span="8" v-if="addForm.autoOrder">
|
|
@@ -154,6 +159,7 @@
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
:disabled="isBindPlan"
|
|
:disabled="isBindPlan"
|
|
|
multiple
|
|
multiple
|
|
|
|
|
+ filterable
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in executorList"
|
|
v-for="item in executorList"
|
|
@@ -273,16 +279,16 @@
|
|
|
<el-table-column label="规格型号" align="center" prop="model">
|
|
<el-table-column label="规格型号" align="center" prop="model">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="所需数量" align="center" prop="num">
|
|
<el-table-column label="所需数量" align="center" prop="num">
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model.number="scope.row.num"
|
|
|
|
|
- size="small"
|
|
|
|
|
- oninput="value=value.replace(/[^\d]/g,'')"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- placeholder="输入数量"
|
|
|
|
|
- @input="changeNum"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model.number="scope.row.num"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ oninput="value=value.replace(/[^\d]/g,'')"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ placeholder="输入数量"
|
|
|
|
|
+ @input="changeNum"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="单位" align="center" prop="measuringUnit">
|
|
<el-table-column label="单位" align="center" prop="measuringUnit">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -324,16 +330,18 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import RuleItemSelection from '@/components/ruleItemSelection'
|
|
|
|
|
-import AddSpareDialog from '@/components/addSpareDialog'
|
|
|
|
|
-import {deepClone} from "@/utils"
|
|
|
|
|
|
|
+import RuleItemSelection from '@/components/ruleItemSelection';
|
|
|
|
|
+import AddSpareDialog from '@/components/addSpareDialog';
|
|
|
|
|
+import {deepClone} from "@/utils";
|
|
|
import { getRule , getCategory , getAssetList , saveOrUpdate , getInfoById } from '@/api/ruleManagement/plan';
|
|
import { getRule , getCategory , getAssetList , saveOrUpdate , getInfoById } from '@/api/ruleManagement/plan';
|
|
|
import { getDetail , getCode } from '@/api/ruleManagement/matter';
|
|
import { getDetail , getCode } from '@/api/ruleManagement/matter';
|
|
|
import { listOrganizations , getUserPage } from '@/api/system/organization';
|
|
import { listOrganizations , getUserPage } from '@/api/system/organization';
|
|
|
- import { getTreeByType } from '@/api/classifyManage'
|
|
|
|
|
|
|
+ import { getTreeByType } from '@/api/classifyManage';
|
|
|
|
|
+ import equipmentSelect from '@/components/CommomSelect/equipment-select.vue';
|
|
|
|
|
+ import deptSelect from '@/components/CommomSelect/dept-select.vue';
|
|
|
export default {
|
|
export default {
|
|
|
name: 'addPatrolConfigDialog',
|
|
name: 'addPatrolConfigDialog',
|
|
|
- components: { RuleItemSelection, AddSpareDialog },
|
|
|
|
|
|
|
+ components: { RuleItemSelection, AddSpareDialog , equipmentSelect , deptSelect },
|
|
|
props: {
|
|
props: {
|
|
|
dialogTitle: {
|
|
dialogTitle: {
|
|
|
type: String,
|
|
type: String,
|
|
@@ -429,8 +437,8 @@ export default {
|
|
|
ruleNameList:[],
|
|
ruleNameList:[],
|
|
|
addDialogLoading:false,
|
|
addDialogLoading:false,
|
|
|
equipmentList:[],
|
|
equipmentList:[],
|
|
|
- deptData:[], //部门树
|
|
|
|
|
- classifyTree:[], //设备分类树
|
|
|
|
|
|
|
+ // deptData:[], //部门树
|
|
|
|
|
+ // classifyTree:[], //设备分类树
|
|
|
rootId:null,
|
|
rootId:null,
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -448,11 +456,9 @@ export default {
|
|
|
// 获取审核人列表数据
|
|
// 获取审核人列表数据
|
|
|
this.getUserList()
|
|
this.getUserList()
|
|
|
// 获取部门
|
|
// 获取部门
|
|
|
- this.getDeptList()
|
|
|
|
|
|
|
+ // this.getDeptList()
|
|
|
// 获取规则名称
|
|
// 获取规则名称
|
|
|
- this._getRuleNameList()
|
|
|
|
|
- // 获取设备分类树
|
|
|
|
|
- this.getClassifyTree()
|
|
|
|
|
|
|
+ this._getRuleNameList()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
@@ -557,6 +563,7 @@ export default {
|
|
|
for (let j = 0; j < this.addForm.deviceInfo.length; j++) {
|
|
for (let j = 0; j < this.addForm.deviceInfo.length; j++) {
|
|
|
if ( this.planRuleEquiList[i].code === this.addForm.deviceInfo[j].substanceCode ) {
|
|
if ( this.planRuleEquiList[i].code === this.addForm.deviceInfo[j].substanceCode ) {
|
|
|
this.planRuleEquiList[i]['sparePart'] = this.addForm.deviceInfo[j]['sparePart']
|
|
this.planRuleEquiList[i]['sparePart'] = this.addForm.deviceInfo[j]['sparePart']
|
|
|
|
|
+ this.$set(this.planRuleEquiList[i],'totalCost',this.addForm.deviceInfo[j]['totalCost'])
|
|
|
// this.planRuleEquiList[i]['totalCost'] = this.addForm.deviceInfo[j]['totalCost']
|
|
// this.planRuleEquiList[i]['totalCost'] = this.addForm.deviceInfo[j]['totalCost']
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -585,17 +592,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
} catch (error) {}
|
|
} catch (error) {}
|
|
|
},
|
|
},
|
|
|
- // 获取部门列表数据
|
|
|
|
|
- async getDeptList () {
|
|
|
|
|
- try {
|
|
|
|
|
- let list = await listOrganizations()
|
|
|
|
|
- this.deptData = this.$util.toTreeData({
|
|
|
|
|
- data: list,
|
|
|
|
|
- idField: 'id',
|
|
|
|
|
- parentIdField: 'parentId'
|
|
|
|
|
- });
|
|
|
|
|
- } catch (error) {}
|
|
|
|
|
- },
|
|
|
|
|
|
|
+
|
|
|
//选择部门(搜索)
|
|
//选择部门(搜索)
|
|
|
searchDeptNodeClick (info) {
|
|
searchDeptNodeClick (info) {
|
|
|
if (info) {
|
|
if (info) {
|
|
@@ -607,18 +604,16 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- // 获取设备分类树
|
|
|
|
|
- async getClassifyTree(){
|
|
|
|
|
- const res = await getTreeByType(1)
|
|
|
|
|
- this.classifyTree = res.data
|
|
|
|
|
- this.rootId = res.data[0].id
|
|
|
|
|
- },
|
|
|
|
|
|
|
|
|
|
// 分类树的选择
|
|
// 分类树的选择
|
|
|
chooseClassify(val){
|
|
chooseClassify(val){
|
|
|
this.categoryEquipment(val)
|
|
this.categoryEquipment(val)
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ getRootId(val){
|
|
|
|
|
+ this.rootId = val
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
// 获取设备分类数据
|
|
// 获取设备分类数据
|
|
|
async categoryEquipment(id){
|
|
async categoryEquipment(id){
|
|
|
const params = {categoryLevelId:id,pageNum:1,size:-1}
|
|
const params = {categoryLevelId:id,pageNum:1,size:-1}
|
|
@@ -706,7 +701,7 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
this.selectedSpare = []
|
|
this.selectedSpare = []
|
|
|
}
|
|
}
|
|
|
- console.log('this.selectedSpare',this.selectedSpare)
|
|
|
|
|
|
|
+ // console.log('this.selectedSpare',this.selectedSpare)
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 从备品备件弹窗将数据丢到备品备件配置
|
|
// 从备品备件弹窗将数据丢到备品备件配置
|
|
@@ -768,12 +763,8 @@ export default {
|
|
|
item => {
|
|
item => {
|
|
|
const { equiLocation, equiLocationCode } = this.getEquiLocation(item)
|
|
const { equiLocation, equiLocationCode } = this.getEquiLocation(item)
|
|
|
return {
|
|
return {
|
|
|
- substanceName: item.name,
|
|
|
|
|
substanceId: item.id,
|
|
substanceId: item.id,
|
|
|
sparePart: item.sparePart?item.sparePart:[],
|
|
sparePart: item.sparePart?item.sparePart:[],
|
|
|
- substanceCode: item.code,
|
|
|
|
|
- mode: item.category.modelType,
|
|
|
|
|
- position: equiLocation,
|
|
|
|
|
totalCost:item.totalCost
|
|
totalCost:item.totalCost
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|