Просмотр исходного кода

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-eam into dev

quwangxin 3 лет назад
Родитель
Сommit
f1ee7741fe

+ 68 - 0
src/api/ledgerAssets/index.js

@@ -0,0 +1,68 @@
+import request from '@/utils/request';
+
+// 获取类别实体分页
+export async function getBoatList (data) {
+  let par = new URLSearchParams(data);
+  const res = await request.get(`/main/category/pageSubstance?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// // 查询实例详情
+// export async function getCategoryInfo (id) {
+//   const res = await request.get(`/main/category/info/${id}`);
+//   if (res.data.code == 0) {
+//     return res.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
+
+// 获取单个类别实体明细分页
+export async function getPageSingle (data) {
+  let par = new URLSearchParams(data);
+  const res = await request.get(`/main/asset/pageSingleSubstance?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取实体列表分页
+export async function getAssetList (data) {
+  let par = new URLSearchParams(data);
+  const res = await request.get(`/main/asset/page?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 查询实例详情
+export async function getAssetInfo (id) {
+  const res = await request.get(`/main/asset/login/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 保存or更新
+export async function saveOrEdit (data) {
+  const res = await request.post(`/main/asset/saveOrEdit`, data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+// 根据类别统计位置数量 
+export async function getCount (data) {
+  let par = new URLSearchParams(data);
+  const res = await request.get(`/main/asset/countPosition?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 161 - 281
src/components/addPatrolConfigDialog/index.vue

@@ -195,133 +195,126 @@
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
-      </el-form>
       <!-- 设备分类 -->
       <!-- 设备分类 -->
-      <div class="equipment_box">
-        <div class="left_aside">
-          <div class="equipment_list_title">设备列表</div>
-          <div class="equipment_tree">
-            <el-tree
-              :data="planRuleEquiList"
-              :props="defaultProps"
-              ref="equiListTree"
-              highlight-current
-              node-key="id"
-              @node-click="handleNodeClick"
-               :disabled="isBindPlan"
-			   show-checkbox
-            ></el-tree>
-          </div>
-        </div>
-        <div class="right_aside">
-          <div class="equipment_info">
-            <div class="item_info">
-              <span class="item_label">设备编码</span>
-              <span class="item_value">{{ equipmentInfo.equiCode }}</span>
-            </div>
-            <div class="item_info">
-              <span class="item_label">设备名称</span>
-              <span class="item_value">{{ equipmentInfo.equiName }}</span>
-            </div>
-            <div class="item_info">
-              <span class="item_label">设备型号</span>
-              <span class="item_value">{{ equipmentInfo.equiModel }}</span>
-            </div>
-            <div class="item_info">
-              <span class="item_label">设备位置</span>
-              <span class="item_value">{{ equipmentInfo.equiLocation }}</span>
-            </div>
-          </div>
-          <!-- 添加操作事项 -->
-          <div>
-            <el-button type="text">操作事项</el-button>
-			<el-table
-              :data="matterRulesList"
-              border
-            >
-              <el-table-column label="序号" align="center" width="60">
-                <template slot-scope="scope">
-                  <span>{{ scope.$index + 1 }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="事项" align="center" prop="name">
-              </el-table-column>
-              <el-table-column label="内容" align="center" prop="content">
-              </el-table-column>
-              <el-table-column label="标准" align="center" prop="norm">
-              </el-table-column>
-            </el-table>
-          </div>
+		  <div class="equipment_box">
+			<div class="left_aside">
+			  <div class="equipment_list_title">设备列表</div>
+			  <div class="equipment_tree">
+				<el-tree
+				  :data="planRuleEquiList"
+				  :props="defaultProps"
+				  ref="equiListTree"
+				  highlight-current
+				  node-key="id"
+				  @node-click="handleNodeClick"
+				   :disabled="isBindPlan"
+				   show-checkbox
+				></el-tree>
+			  </div>
+			</div>
+			<div class="right_aside">
+			  <div class="equipment_info">
+				<div class="item_info">
+				  <span class="item_label">设备编码</span>
+				  <span class="item_value">{{ equipmentInfo.equiCode }}</span>
+				</div>
+				<div class="item_info">
+				  <span class="item_label">设备名称</span>
+				  <span class="item_value">{{ equipmentInfo.equiName }}</span>
+				</div>
+				<div class="item_info">
+				  <span class="item_label">设备型号</span>
+				  <span class="item_value">{{ equipmentInfo.equiModel }}</span>
+				</div>
+				<div class="item_info">
+				  <span class="item_label">设备位置</span>
+				  <span class="item_value">{{ equipmentInfo.equiLocation }}</span>
+				</div>
+			  </div>
+			  <!-- 添加操作事项 -->
+			  <div>
+				<el-button type="text">操作事项</el-button>
+				<el-table
+				  :data="matterRulesList"
+				  border
+				>
+				  <el-table-column label="序号" align="center" width="60">
+					<template slot-scope="scope">
+					  <span>{{ scope.$index + 1 }}</span>
+					</template>
+				  </el-table-column>
+				  <el-table-column label="事项" align="center" prop="name">
+				  </el-table-column>
+				  <el-table-column label="内容" align="center" prop="content">
+				  </el-table-column>
+				  <el-table-column label="标准" align="center" prop="norm">
+				  </el-table-column>
+				</el-table>
+			  </div>
 
 
-          <!-- 添加备品备件  -->
-          <div v-if="dialogTitle.includes('保养')">
-            <el-button type="text" @click="addSpareItems"  :disabled="isBindPlan"
-              >添加备品备件</el-button
-            >
-            <el-table
-              :data="planRuleEquiList[currentEquItemIndex]&&planRuleEquiList[currentEquItemIndex].partJson"
-              height="300"
-              :key='currentEquItemIndex'
-              border
-            >
-              <el-table-column label="序号" align="center" width="60">
-                <template slot-scope="scope">
-                  <span>{{ scope.$index + 1 }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="备件名称" align="center" prop="name">
-              </el-table-column>
-              <el-table-column label="规格型号" align="center" prop="model">
-              </el-table-column>
-              <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>
-              </el-table-column>
-              <el-table-column label="单位" align="center" prop="measuringUnit">
-              </el-table-column>
-              <el-table-column label="费用" align="center">
-                  <template slot-scope="scope">
-                     {{scope.row.num*scope.row.amount}}{{scope.row.unit=='wanyuan'?'万元':'元'}}
-                  </template>
-              </el-table-column>
-              <el-table-column label="操作" align="center" width="70">
-                <template slot-scope="scope">
-                  <el-button
-                    type="text"
-                    @click="handleDeleteSpareItem(scope.$index)"
-                     :disabled="isBindPlan"
-                    >删除</el-button
-                  >
-                </template>
-              </el-table-column>
-            </el-table>
-            <div style="text-align: center">备件总费用:
-              {{planRuleEquiList[currentEquItemIndex]&&planRuleEquiList[currentEquItemIndex].totalCost?planRuleEquiList[currentEquItemIndex].totalCost:'-'}}
-              元
-            </div>
-          </div>
-        </div>
-      </div>
+			  <!-- 添加备品备件  -->
+			  <div v-if="dialogTitle.includes('保养')">
+				<el-button type="text" @click="addSpareItems"  :disabled="isBindPlan"
+				  >添加备品备件</el-button
+				>
+				<el-table
+				  :data="planRuleEquiList[currentEquItemIndex]&&planRuleEquiList[currentEquItemIndex].sparePart"
+				  height="300"
+				  :key='currentEquItemIndex'
+				  border
+				>
+				  <el-table-column label="序号" align="center" width="60">
+					<template slot-scope="scope">
+					  <span>{{ scope.$index + 1 }}</span>
+					</template>
+				  </el-table-column>
+				  <el-table-column label="备件名称" align="center" prop="name">
+				  </el-table-column>
+				  <el-table-column label="规格型号" align="center" prop="model">
+				  </el-table-column>
+				  <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>
+				  </el-table-column>
+				  <el-table-column label="单位" align="center" prop="measuringUnit">
+				  </el-table-column>
+				  <el-table-column label="费用" align="center">
+					  <template slot-scope="scope">
+						 {{scope.row.num*scope.row.univalence?scope.row.num*scope.row.univalence:'0'}}{{scope.row.univalenceUnit=='wanyuan'?'万元':'元'}}
+					  </template>
+				  </el-table-column>
+				  <el-table-column label="操作" align="center" width="70">
+					<template slot-scope="scope">
+					  <el-button
+						type="text"
+						@click="handleDeleteSpareItem(scope.$index)"
+						 :disabled="isBindPlan"
+						>删除</el-button
+					  >
+					</template>
+				  </el-table-column>
+				</el-table>
+				<div style="text-align: center">备件总费用:
+				  {{planRuleEquiList[currentEquItemIndex]&&planRuleEquiList[currentEquItemIndex].totalCost?planRuleEquiList[currentEquItemIndex].totalCost:'-'}}
+				  元
+				</div>
+			  </div>
+			</div>
+		  </div>
+	   </el-form>
     </div>
     </div>
     <div slot="footer" class="dialog_footer">
     <div slot="footer" class="dialog_footer">
       <el-button size="small" type="primary" @click="submit">提交</el-button>
       <el-button size="small" type="primary" @click="submit">提交</el-button>
       <el-button size="small" @click="handleClose">关闭</el-button>
       <el-button size="small" @click="handleClose">关闭</el-button>
     </div>
     </div>
-<!--   <RuleItemSelection
-      ref="ruleItemSelectionRef"
-      :ruleItem="matterRulesList"
-      :selectedMatter="selectedMatter"
-      :labelTitle="formLabel"
-      @submit="ruleItemSelectionSubmit"
-    /> -->
     <AddSpareDialog
     <AddSpareDialog
       ref="addSpareDialogRef"
       ref="addSpareDialogRef"
       :selectedSpare="selectedSpare"
       :selectedSpare="selectedSpare"
@@ -331,16 +324,8 @@
 </template>
 </template>
 
 
 <script>
 <script>
-// import planRules from '@/api/planRules/patrolConfig'
-// import contentConfig from '@/api/maintenance/patrol/ruleConfig'
-// import { getAssetsList } from '@/api/ledgerAssets/booksList'
-// import user from '@/api/main/user'
-// import dept from '@/api/main/dept'
-// import SelectTree from '@/components/selectTree'
 import RuleItemSelection from '@/components/ruleItemSelection'
 import RuleItemSelection from '@/components/ruleItemSelection'
 import AddSpareDialog from '@/components/addSpareDialog'
 import AddSpareDialog from '@/components/addSpareDialog'
-// import { mapGetters } from 'vuex'
-// import { getRuleNameList } from '@/api/stockManagement/stocking'
 import {deepClone} from "@/utils"
 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';
@@ -379,11 +364,6 @@ export default {
       executorList: [],
       executorList: [],
       currentEquItemIndex: 0,
       currentEquItemIndex: 0,
       formLabel: '',
       formLabel: '',
-      planRuleTypeObj: {
-        1: 'PATROL',
-        2: 'MAINTAIN',
-        4: 'INVENTORY'
-      },
 	  treeData:[],
 	  treeData:[],
       addForm: {
       addForm: {
 		code:'',  // 计划配置单号
 		code:'',  // 计划配置单号
@@ -413,7 +393,7 @@ export default {
 	      equiLocation: '', // 设备位置
 	      equiLocation: '', // 设备位置
 	      equiLocationCode: '', // 设备位置code
 	      equiLocationCode: '', // 设备位置code
 	      // 设备备品备件 - 巡点检不需要备品备件,保养需要
 	      // 设备备品备件 - 巡点检不需要备品备件,保养需要
-	      partJson: [ ],
+	      sparePart: [ ],
 	      totalCost:0,
 	      totalCost:0,
 	    }
 	    }
 	  ],
 	  ],
@@ -455,12 +435,7 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
-    // ...mapGetters([
-    //   'equipmentList',
-    //   // 'ruleNameList',
-    //   'planRulesDetails',
-    //   'addDialogLoading'
-    // ])
+
   },
   },
   watch: {
   watch: {
     addPatrolConfigDialog (val) {
     addPatrolConfigDialog (val) {
@@ -477,69 +452,19 @@ export default {
         // 获取规则名称
         // 获取规则名称
         this._getRuleNameList()
         this._getRuleNameList()
 		// 获取设备分类树
 		// 获取设备分类树
-		this.getClassifyTree()
-		
+		this.getClassifyTree()		
       }
       }
     },
     },
-    async planRulesDetails (val) {
-       if (!this.addPatrolConfigDialog) return
-      const tempPlanRuleEquiList = val.planRuleEquiList
-      this.addForm = val
-      delete this.addForm.createTime
-      delete this.addForm.updateTime
-      this.clickedTreeNode = true
-      // 编辑弹窗需要重新获取规则下面的事项
-      this._getMatterRulesDetails(val.ruleId)
-      // 设备分类回显需要将id转成string
-      this.addForm.categoryId = String(val.categoryId)
-      // 根据部门回显人员
-      const params = { deptCode: val.groupId, status: 1 }
-      this.getUserList(params)
-      // 回显设备事项
-      await this._getEquipmentList(val.categoryId)
-      const item = this.planRuleEquiList[0]
-      console.log('item',item)
-      // 默认选中列表第一条树节点
-      this.$nextTick(() => {
-        this.$refs.equiListTree.setCurrentKey(item.id)
-      })
-      const { equiLocation, equiLocationCode } = this.getEquiLocation(item)
-      this.equipmentInfo = {
-        equiCode: item.code,
-        equiName: item.name,
-        equiModel: item.category.modelType,
-        equiLocation: equiLocation,
-        equiLocationCode: equiLocationCode
-      }
-      this.currentEquItemIndex = 0
-      this.planRuleEquiList[0]['equiLocation'] = equiLocation
-      this.planRuleEquiList[0]['equiLocationCode'] = equiLocationCode
-      // 对比详情返回的数据和设备分类下面所有的设备列表,将itemJson同步过去
-      // for (let i = 0; i < this.planRuleEquiList.length; i++) {
-      //   for (let j = 0; j < tempPlanRuleEquiList.length; j++) {
-      //     if (
-      //       this.planRuleEquiList[i].code ===
-      //       tempPlanRuleEquiList[j].equiCode
-      //     ) {
-      //       this.planRuleEquiList[i]['itemJson'] =
-      //         tempPlanRuleEquiList[j]['itemJson']
-      //       this.planRuleEquiList[i]['partJson'] =
-      //         tempPlanRuleEquiList[j]['partJson']
-      //       break
-      //     }
-      //   }
-      // }
-    }
   },
   },
   created(){
   created(){
   },
   },
   methods: {
   methods: {
-	async init(row){
+	async init(row,tips){
 		if(row){
 		if(row){
 			this.getInfo(row.id)
 			this.getInfo(row.id)
 		}else{
 		}else{
 			//  获取计划配置单号
 			//  获取计划配置单号
-			this.getOrderCode()
+			this.getOrderCode(tips)
 			this.planRuleEquiList = []
 			this.planRuleEquiList = []
 			this.matterRulesList = []
 			this.matterRulesList = []
 		}
 		}
@@ -547,7 +472,6 @@ export default {
 	  
 	  
 	async getInfo(id){
 	async getInfo(id){
 		const res = await getInfoById(id)
 		const res = await getInfoById(id)
-		console.log('ree',res)
 		this.addForm = res
 		this.addForm = res
 		this.categoryEquipment(res.categoryLevelId)
 		this.categoryEquipment(res.categoryLevelId)
 		const params = { groupId: res.groupId }
 		const params = { groupId: res.groupId }
@@ -565,6 +489,7 @@ export default {
 		this.$nextTick(() => {
 		this.$nextTick(() => {
 		  this.$refs.equiListTree.setCheckedKeys(keys)
 		  this.$refs.equiListTree.setCheckedKeys(keys)
 		})
 		})
+		this.clickedTreeNode = true
 	},
 	},
 	
 	
 	  
 	  
@@ -590,12 +515,9 @@ export default {
         status: 1, // 状态
         status: 1, // 状态
         remark: '', // 备注
         remark: '', // 备注
 		urgent:'',
 		urgent:'',
-		bizType:0,
+		bizType:0
 	  }
 	  }
-	  this.equipmentList = []
-	  // deptData:[],   //部门树
-	  // classifyTree:[],  //设备分类树
-	  
+	  this.equipmentList = []	  
     },
     },
     // 设备分类选择
     // 设备分类选择
     async handleEquipmentClassChange (item) {
     async handleEquipmentClassChange (item) {
@@ -628,11 +550,16 @@ export default {
           this.currentEquItemIndex = 0
           this.currentEquItemIndex = 0
           this.planRuleEquiList[0]['equiLocation'] = equiLocation
           this.planRuleEquiList[0]['equiLocation'] = equiLocation
           this.planRuleEquiList[0]['equiLocationCode'] = equiLocationCode
           this.planRuleEquiList[0]['equiLocationCode'] = equiLocationCode
-          // if(this.addForm.planRuleEquiList[this.currentEquItemIndex].partJson){
-          //    this.tableList = this.addForm.planRuleEquiList[this.currentEquItemIndex].partJson
-          // }else{
-          //   this.tableList = []
-          // }
+		  
+		  // 对比详情返回的数据和设备分类下面所有的设备列表,将sparePart同步过去
+		  for (let i = 0; i < this.planRuleEquiList.length; i++) {
+		    for (let j = 0; j < this.addForm.deviceInfo.length; j++) {
+		      if ( this.planRuleEquiList[i].code === this.addForm.deviceInfo[j].substanceCode ) {
+		        this.planRuleEquiList[i]['sparePart'] = this.addForm.deviceInfo[j]['sparePart']
+		        break
+		      }
+		    }
+		  }
         })
         })
       } catch (error) {
       } catch (error) {
         this.planRuleEquiList = []
         this.planRuleEquiList = []
@@ -697,9 +624,15 @@ export default {
 	},
 	},
 	
 	
 	// 获取计划配置单号
 	// 获取计划配置单号
-	async getOrderCode () {
-	  const data = await getCode('patrolconfig_code');
-	  this.$set(this.addForm, 'code', data);
+	async getOrderCode (tips) {
+		if(tips.includes('巡点检')){
+			const data = await getCode('patrolconfig_code');
+			this.$set(this.addForm, 'code', data);
+		}
+		if(tips.includes('保养')){
+			const code = await getCode('maintainconfig_code');
+			this.$set(this.addForm, 'code', code);
+		}
 	}, 
 	}, 
 	
 	
     // 封装 - 获取设备位置名称和code方法
     // 封装 - 获取设备位置名称和code方法
@@ -737,14 +670,12 @@ export default {
     // 获取规则名列表
     // 获取规则名列表
     async _getRuleNameList () {
     async _getRuleNameList () {
       if(this.dialogTitle==='新增保养计划配置'||this.dialogTitle==='编辑保养计划配置'){
       if(this.dialogTitle==='新增保养计划配置'||this.dialogTitle==='编辑保养计划配置'){
-          // console.log('保养计划')
           const res = await getRule({type:2,pageNum:1,size:-1})
           const res = await getRule({type:2,pageNum:1,size:-1})
           if (res.list) {
           if (res.list) {
             this.ruleNameList = res.list || []
             this.ruleNameList = res.list || []
           }
           }
       }
       }
       if (this.dialogTitle==='新增巡点检计划配置'||this.dialogTitle==='编辑巡点检计划配置'){
       if (this.dialogTitle==='新增巡点检计划配置'||this.dialogTitle==='编辑巡点检计划配置'){
-          console.log('巡点检计划')
           const res = await getRule({type:1,pageNum:1,size:-1})
           const res = await getRule({type:1,pageNum:1,size:-1})
           if (res.list) {
           if (res.list) {
             this.ruleNameList = res.list || []
             this.ruleNameList = res.list || []
@@ -761,80 +692,52 @@ export default {
        this.matterRulesList = res.ruleItems
        this.matterRulesList = res.ruleItems
     },
     },
 
 
-    // 从事项弹窗将数据丢到事项配置
-    // ruleItemSelectionSubmit (list) {
-    //   if (
-    //     !this.planRuleEquiList[this.currentEquItemIndex]['itemJson']
-    //   ) {
-    //     this.planRuleEquiList[this.currentEquItemIndex]['itemJson'] = []
-    //   }
-    //   this.planRuleEquiList[this.currentEquItemIndex]['itemJson'] =
-    //     list.map(item => {
-    //       return {
-    //         id: item.id,
-    //         name: item.name,
-    //         content: item.content,
-    //         norm: item.norm
-    //       }
-    //     })
-    //   this.$forceUpdate()
-    // },
-
-
-
     // 添加备品备件
     // 添加备品备件
     addSpareItems () {
     addSpareItems () {
       if (!this.clickedTreeNode) {
       if (!this.clickedTreeNode) {
         return this.$message.warning('请选择设备分类!')
         return this.$message.warning('请选择设备分类!')
       }
       }
-      if (!this.addForm.ruleId) {
-        return this.$message.warning('请选择规则名称!')
-      }
       this.$refs.addSpareDialogRef.open()
       this.$refs.addSpareDialogRef.open()
-      if (this.planRuleEquiList[this.currentEquItemIndex]['partJson']) {
-        this.selectedSpare =
-          this.planRuleEquiList[this.currentEquItemIndex]['partJson']
+      if (this.planRuleEquiList[this.currentEquItemIndex]['sparePart']) {
+        this.selectedSpare =  this.planRuleEquiList[this.currentEquItemIndex]['sparePart']
       } else {
       } else {
         this.selectedSpare = []
         this.selectedSpare = []
       }
       }
+	  console.log('this.selectedSpare',this.selectedSpare)
     },
     },
 
 
     // 从备品备件弹窗将数据丢到备品备件配置
     // 从备品备件弹窗将数据丢到备品备件配置
     spareItemSelectSubmit (list) {
     spareItemSelectSubmit (list) {
-      console.log('list',list)
-       this.planRuleEquiList[this.currentEquItemIndex]['partJson'] = list.map(item => {
+       this.planRuleEquiList[this.currentEquItemIndex]['sparePart'] = list.map(item => {
           return {
           return {
-              name: item.informationName,
-              model: item.modelType,
+              name: item.name,
+              model: item.category.modelType,
               num: item.num,
               num: item.num,
-              unit: item.univalenceUnit,
-              amount: item.univalence,
-              measuringUnit:item.measuringUnit,
-              informationCode:item.informationCode
+              univalenceUnit: item.category.univalenceUnit,
+              univalence: item.category.univalence,
+              measuringUnit:item.category.measuringUnit,
+              code:item.code,
+			  id:item.id
           }
           }
       })
       })
-      // this.addForm.planRuleEquiList[this.currentEquItemIndex]['partJson'] = [
-      //   ...deepClone(list)
-      // ]
-      // this.tableList = this.addForm.planRuleEquiList[this.currentEquItemIndex]['partJson']
       this.$forceUpdate()
       this.$forceUpdate()
     },
     },
 
 
     // 删除备品备件
     // 删除备品备件
     handleDeleteSpareItem (index) {
     handleDeleteSpareItem (index) {
       this.planRuleEquiList[this.currentEquItemIndex][
       this.planRuleEquiList[this.currentEquItemIndex][
-        'partJson'
+        'sparePart'
       ].splice(index, 1)
       ].splice(index, 1)
       this.changeNum()
       this.changeNum()
     },
     },
 
 
     // 改变input数据重新计算总费用
     // 改变input数据重新计算总费用
     changeNum(){
     changeNum(){
-        let applayList = this.planRuleEquiList[this.currentEquItemIndex].partJson
+        let applayList = this.planRuleEquiList[this.currentEquItemIndex].sparePart
         let total = 0
         let total = 0
         applayList.map(item=>{
         applayList.map(item=>{
            if(item.hasOwnProperty('num')&&item.num!=''){
            if(item.hasOwnProperty('num')&&item.num!=''){
-              switch (item.unit) {
+              switch (item.univalenceUnit) {
                 case 'wanyuan': {
                 case 'wanyuan': {
                   item.chengs = 10000
                   item.chengs = 10000
                   break;
                   break;
@@ -846,7 +749,7 @@ export default {
                 default:
                 default:
                   break;
                   break;
               }
               }
-              total = total + item.num*item.amount*item.chengs
+              total = total + item.num*item.univalence*item.chengs
            }
            }
         })
         })
         this.$set(this.planRuleEquiList[this.currentEquItemIndex],'totalCost',total)
         this.$set(this.planRuleEquiList[this.currentEquItemIndex],'totalCost',total)
@@ -858,48 +761,25 @@ export default {
         if (valid) {
         if (valid) {
           try {
           try {
 		    const selectList = this.$refs.equiListTree.getCheckedNodes();
 		    const selectList = this.$refs.equiListTree.getCheckedNodes();
-			// console.log('selectList',selectList)
 			this.addForm.deviceInfo = selectList.map(
 			this.addForm.deviceInfo = selectList.map(
 			  item => {
 			  item => {
 				const { equiLocation, equiLocationCode } = this.getEquiLocation(item)
 				const { equiLocation, equiLocationCode } = this.getEquiLocation(item)
 			    return {
 			    return {
 			      substanceName: item.name,
 			      substanceName: item.name,
 			      substanceId: item.id,
 			      substanceId: item.id,
-			      sparePart: item.partJson?item.partJson:[],
+			      sparePart: item.sparePart?item.sparePart:[],
 				  substanceCode: item.code,
 				  substanceCode: item.code,
 				  mode: item.category.modelType,
 				  mode: item.category.modelType,
 				  position: equiLocation
 				  position: equiLocation
 			    }
 			    }
 			  }
 			  }
 			)
 			)
-            // this.planRuleEquiList = this.planRuleEquiList.map(
-            //   item => {
-            //     return {
-            //       substanceName: item.name,
-            //       substanceId: item.id,
-            //       sparePart: item.partJson?item.partJson:[],
-            //     }
-            //   }
-            // )
-      //         if (this.addForm.planRuleType instanceof Object) {
-      //           this.addForm.planRuleType =
-      //             this.planRuleTypeObj[this.addForm.planRuleType.code]
-      //         }
-      //         let arr = []
-      //         this.planRuleEquiList.map((item)=>{
-				  // if(item.partJson.length){
-				  //   arr.push(item)
-				  // }
-      //         })
-      //         this.planRuleEquiList = arr
-      //         let newArr = JSON.parse(JSON.stringify(this.planRuleEquiList))
-      //         for (let i = 0; i < newArr.length; i++) {
-      //             for (let j = 0; j < newArr[i].partJson.length; j++) {
-      //                 newArr[i].partJson[j].equipmentCode = newArr[i].equiCode
-      //             }
-      //         }
-      //         this.planRuleEquiList = newArr
 	          this.addForm.executeId = this.addForm.executeIdList.join(',')
 	          this.addForm.executeId = this.addForm.executeIdList.join(',')
+			  this.addForm.ruleType = this.dialogTitle.includes('巡点检')
+			    ? 1
+			    : this.dialogTitle.includes('保养')
+			    ? 2
+			    : 3
               const res = await saveOrUpdate(this.addForm)
               const res = await saveOrUpdate(this.addForm)
               if (res) {
               if (res) {
                 const type = this.dialogTitle.includes('新增') ? '新增' : '编辑'
                 const type = this.dialogTitle.includes('新增') ? '新增' : '编辑'

+ 45 - 49
src/components/addSpareDialog/index.vue

@@ -18,18 +18,13 @@
     <el-row style="height: 80vh">
     <el-row style="height: 80vh">
       <el-col class="tree-col" :span="6">
       <el-col class="tree-col" :span="6">
         <div class="table-add" style="margin-left: 10px"></div>
         <div class="table-add" style="margin-left: 10px"></div>
-        <!-- <CommonTree
-          @handleNodeClick="handleNodeClick"
-          :type="[7]"
-          @setDefault="setDefaultList"
-          ref="commonTree"
-        /> -->
-       <AssetTree
-          @handleNodeClick="handleNodeClick"
-          :type="[5]"
-          :init="true"
-          ref="treeList"
-        />
+           <AssetTree
+               @handleNodeClick="handleNodeClick"
+               @setRootId="setRootId"
+               :type="'7'"
+               :paramsType="'type'"
+               ref="treeList"
+             />
       </el-col>
       </el-col>
       <el-col :span="18">
       <el-col :span="18">
         <el-table
         <el-table
@@ -50,15 +45,13 @@
             width="55"
             width="55"
             align="center"
             align="center"
           />
           />
-          <el-table-column prop="informationCode" label="备件编码" />
-          <el-table-column prop="informationName" label="备件名称" />
-          <!-- <el-table-column
-            prop="inventoryLibrary"
-            width="130px"
-            label="实时库存数量"
-          /> -->
-          <el-table-column prop="modelType" label="型号" />
-          <!-- <el-table-column prop="spec" label="规格" /> -->
+          <el-table-column prop="code" label="备件编码" />
+          <el-table-column prop="name" label="备件名称" />
+		  <el-table-column label="型号" prop="modelType">
+		    <template slot-scope="{ row }">
+		      <div>{{ row.category.modelType }}</div>
+		    </template>
+		  </el-table-column>
         </el-table>
         </el-table>
       </el-col>
       </el-col>
     </el-row>
     </el-row>
@@ -71,12 +64,8 @@
 </template>
 </template>
 
 
 <script>
 <script>
-// import accountList from '@/api/sparepart/accountList'
-// import CommonTree from '@/components/treeList'
 import AssetTree from '@/components/AssetTree'
 import AssetTree from '@/components/AssetTree'
-// import {
-//   getList
-// } from '@/api/stockManagement/itemInformation'
+import {  getAssetList } from '@/api/ledgerAssets';
 export default {
 export default {
   components: { 
   components: { 
 		// CommonTree,
 		// CommonTree,
@@ -99,19 +88,20 @@ export default {
       tableLoading: false,
       tableLoading: false,
       tableData: [],
       tableData: [],
       currentTreeData: {},
       currentTreeData: {},
-      pickSpareDataObject: []
+      pickSpareDataObject: [],
+	  rootId:null
     }
     }
   },
   },
   watch: {
   watch: {
-    // selectedSpare (val) {
-    //   val.map(item => {
-    //     this.tableData.forEach(c => {
-    //       if (item.id === c.id) {
-    //         this.$refs.dialogMultipleTable.toggleRowSelection(c, true)
-    //       }
-    //     })
-    //   })
-    // }
+    selectedSpare (val) {
+      val.map(item => {
+        this.tableData.forEach(c => {
+          if (item.id === c.id) {
+            this.$refs.dialogMultipleTable.toggleRowSelection(c, true)
+          }
+        })
+      })
+    }
   },
   },
   methods: {
   methods: {
     open () {
     open () {
@@ -127,25 +117,32 @@ export default {
         })
         })
       })
       })
     },
     },
+	
+	
     async doSearch () {
     async doSearch () {
       const params = {
       const params = {
-        id: this.currentTreeData.id,
+        categoryLevelId: this.currentTreeData.id,
+        rootCategoryLevelId: this.rootId,
         code: this.searchParams.code
         code: this.searchParams.code
       }
       }
       this._getClassificationSpareList(params)
       this._getClassificationSpareList(params)
     },
     },
+	
+	// 获取根节点id
+	setRootId(id){
+	  this.rootId = id
+	},
+	
     // 树结构点击事件
     // 树结构点击事件
     async handleNodeClick (data, node) {
     async handleNodeClick (data, node) {
-      // console.log(data)
-      // console.log(node)
       this.currentTreeData = data
       this.currentTreeData = data
       this._getClassificationSpareList(data)
       this._getClassificationSpareList(data)
     },
     },
 
 
-    setDefaultList(id){
-      let data = {id:id}
-       this._getClassificationSpareList(data)
-    },
+    // setDefaultList(id){
+    //   let data = {id:id}
+    //    this._getClassificationSpareList(data)
+    // },
 
 
     // 获取添加备件弹窗表格数据
     // 获取添加备件弹窗表格数据
     async _getClassificationSpareList (data) {
     async _getClassificationSpareList (data) {
@@ -153,14 +150,13 @@ export default {
       let params = {
       let params = {
         page: 1,
         page: 1,
         size: 99999,
         size: 99999,
-        classificationId: data.id,
-        // code: data.code
+        categoryLevelId: this.currentTreeData.id,
+        rootCategoryLevelId: this.rootId
       }
       }
-      const res = await getList(params)
+      const res = await getAssetList(params)
       this.tableLoading = false
       this.tableLoading = false
-      // console.log('台账列表:', res)
-      if (res.success && res.data) {
-        this.tableData = res.data.records
+      if (res.list.length) {
+        this.tableData = res.list
         // 切换树节点时回显添加了的备品备件
         // 切换树节点时回显添加了的备品备件
         this.$nextTick(() => {
         this.$nextTick(() => {
           this.selectedSpare.map(item => {
           this.selectedSpare.map(item => {

+ 38 - 10
src/views/rulesManagement/planRules/MaintainConfig/components/maintain-search.vue

@@ -12,7 +12,7 @@
           <el-input clearable v-model="where.code" placeholder="请输入" />
           <el-input clearable v-model="where.code" placeholder="请输入" />
         </el-form-item>
         </el-form-item>
 		<el-form-item label="规则名称:">
 		<el-form-item label="规则名称:">
-			<el-input clearable v-model="where.name" placeholder="请输入" />
+			<el-input clearable v-model="where.ruleName" placeholder="请输入" />
 		</el-form-item>
 		</el-form-item>
       </el-col>
       </el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
@@ -26,11 +26,19 @@
       </el-col>
       </el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="执行部门:">
         <el-form-item label="执行部门:">
-          <el-input clearable v-model="where.dep" placeholder="请输入" />
+           <ele-tree-select
+				clearable
+				:data="deptData"
+				v-model="where.groupId"
+				placeholder="请选择"
+				default-expand-all
+				labelKey="name"
+				valueKey="id"
+           	/> 
         </el-form-item>
         </el-form-item>
 		<el-form-item label="创建时间:">
 		<el-form-item label="创建时间:">
 			<el-date-picker
 			<el-date-picker
-				v-model="where.time"
+				v-model="time"
 				type="daterange"
 				type="daterange"
 				range-separator="至"
 				range-separator="至"
 				start-placeholder="开始日期"
 				start-placeholder="开始日期"
@@ -43,7 +51,7 @@
       </el-col>
       </el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="设备分类:">
         <el-form-item label="设备分类:">
-          <el-input clearable v-model="where.texture" placeholder="请输入" />
+          <el-input clearable v-model="where.type" placeholder="请输入" />
         </el-form-item>
         </el-form-item>
 		<div class="ele-form-actions">
 		<div class="ele-form-actions">
 			<el-button
 			<el-button
@@ -68,19 +76,22 @@
 
 
 <script>
 <script>
   import { login } from '@/api/login';
   import { login } from '@/api/login';
+  import {  listOrganizations } from '@/api/system/organization';
   export default {
   export default {
     data() {
     data() {
       // 默认表单数据
       // 默认表单数据
       const defaultWhere = {
       const defaultWhere = {
-        name: '',
+		name:'',
+        ruleName: '',
         code: '',
         code: '',
-        fixCode:'',
-        ownershipGroupId:''
+        groupId:'',
+        status:''
       };
       };
       return {
       return {
         // 表单数据
         // 表单数据
         where: { ...defaultWhere },
         where: { ...defaultWhere },
-        treeData:[]
+        deptData:[],   //部门树
+        time:[]
       };
       };
     },
     },
     computed: {
     computed: {
@@ -90,18 +101,35 @@
       }
       }
     },
     },
     created(){
     created(){
+		this.getDeptList()
     },
     },
     methods: {
     methods: {
       /* 搜索 */
       /* 搜索 */
       search() {
       search() {
-        console.log(this.where);
+        if(this.time.length){
+        	this.where.startTime = this.time[0]
+        	this.where.endTime = this.time[1]
+        }
         this.$emit('search', this.where);
         this.$emit('search', this.where);
       },
       },
       /*  重置 */
       /*  重置 */
       reset() {
       reset() {
+		this.time = []
         this.where = { ...this.defaultWhere };
         this.where = { ...this.defaultWhere };
         this.search();
         this.search();
-      }
+      },
+	  
+	  // 获取部门列表数据
+	  async getDeptList () {
+	    try {
+	      let list = await listOrganizations()
+	      this.deptData = this.$util.toTreeData({
+	  		  data: list,
+	  		  idField: 'id',
+	  		  parentIdField: 'parentId'
+	      });
+	    } catch (error) {}
+	  },
     }
     }
   };
   };
 </script>
 </script>

+ 41 - 48
src/views/rulesManagement/planRules/MaintainConfig/index.vue

@@ -21,26 +21,12 @@
 	       >
 	       >
 	         新建
 	         新建
 	       </el-button>
 	       </el-button>
-		   <el-button
-		     size="small"
-		     type="primary"
-		     class="ele-btn-icon"
-		     @click="goDetail()"
-		   >
-		     详情
-		   </el-button>
 	     </template>
 	     </template>
-<!-- 	     <template v-slot:enable="{ row }">
-	       <el-switch
-	         v-model="row.enable"
-	         active-color="#13ce66"
-	         inactive-color="#ff4949"
-	         :active-value="1"
-	         :inactive-value="0"
-	         @change="changeEnable(row)"
-	       >
-	       </el-switch>
-	     </template> -->
+		 <template v-slot:code="{ row }">
+		   <el-link type="primary" :underline="false" @click="goDetail(row)">
+		     {{ row.code }}
+		   </el-link>
+		 </template>
 	     <!-- 操作列 -->
 	     <!-- 操作列 -->
 	     <template v-slot:action="{ row }">
 	     <template v-slot:action="{ row }">
 	       <el-link
 	       <el-link
@@ -53,7 +39,7 @@
 	       </el-link>
 	       </el-link>
 	       <el-popconfirm
 	       <el-popconfirm
 	         class="ele-action"
 	         class="ele-action"
-	         title="确定要删除此角色吗?"
+	         title="确定要删除此保养配置吗?"
 	         @confirm="remove(row)"
 	         @confirm="remove(row)"
 	       >
 	       >
 	         <template v-slot:reference>
 	         <template v-slot:reference>
@@ -78,10 +64,12 @@
 <script>
 <script>
   import AddPatrolConfigDialog from '@/components/addPatrolConfigDialog'
   import AddPatrolConfigDialog from '@/components/addPatrolConfigDialog'
   import MaintainSearch from './components/maintain-search.vue';
   import MaintainSearch from './components/maintain-search.vue';
-  import { pageRoles } from '@/api/system/role'; 
+  import { planConfigPage , removeRule } from '@/api/ruleManagement/plan';
+  import dictMixins from '@/mixins/dictMixins'; 
   export default {
   export default {
+	mixins: [dictMixins],
     components: {
     components: {
-      MaintainSearch,
+        MaintainSearch,
 	    AddPatrolConfigDialog
 	    AddPatrolConfigDialog
     },
     },
     data () {
     data () {
@@ -102,53 +90,60 @@
 		    label: '计划配置单号',
 		    label: '计划配置单号',
 		    align: 'center',	
 		    align: 'center',	
 		    showOverflowTooltip: true,
 		    showOverflowTooltip: true,
-		    minWidth: 110
+		    minWidth: 110,
+		  			slot:'code'
 		  },
 		  },
 		  {
 		  {
-		    prop: 'groupId',
+		    prop: 'name',
 		    label: '计划配置名称',
 		    label: '计划配置名称',
 		    align: 'center',
 		    align: 'center',
 		    showOverflowTooltip: true,
 		    showOverflowTooltip: true,
 		    minWidth: 110
 		    minWidth: 110
 		  },
 		  },
 		  {
 		  {
-		    prop: 'enable',
+		    prop: 'groupName',
 		    label: '执行部门',
 		    label: '执行部门',
 		    align: 'center',	
 		    align: 'center',	
 		    showOverflowTooltip: true,
 		    showOverflowTooltip: true,
-		    slot: 'enable',
 		    minWidth: 110
 		    minWidth: 110
 		  },
 		  },
 		  {
 		  {
-		    prop: 'name',
+		    prop: 'categoryName',
 		    label: '设备分类',
 		    label: '设备分类',
 		    align: 'center',	
 		    align: 'center',	
 		    showOverflowTooltip: true,
 		    showOverflowTooltip: true,
 		    minWidth: 110
 		    minWidth: 110
 		  },
 		  },
 		  {
 		  {
-		    prop: 'cycle',
+		    prop: 'ruleName',
 		    label: '规则名称',
 		    label: '规则名称',
 		    align: 'center',	
 		    align: 'center',	
 		    showOverflowTooltip: true,
 		    showOverflowTooltip: true,
 		    minWidth: 110
 		    minWidth: 110
 		  },
 		  },
 			{
 			{
-			  prop: 'auto',
+			  prop: 'autoOrder',
 			  label: '自动派单',
 			  label: '自动派单',
 			  align: 'center',	
 			  align: 'center',	
 			  showOverflowTooltip: true,
 			  showOverflowTooltip: true,
-			  minWidth: 110
+			  minWidth: 110,
+			  formatter: (_row, _column, cellValue) => {
+				let autoOrder = _row.autoOrder==1?'是':(_row.autoOrder==0?'否':'-')
+			    return autoOrder
+			  }
 			},
 			},
 			{
 			{
 			  prop: 'status',
 			  prop: 'status',
 			  label: '状态',
 			  label: '状态',
 			  align: 'center',	
 			  align: 'center',	
 			  showOverflowTooltip: true,
 			  showOverflowTooltip: true,
-			  minWidth: 110
+			  minWidth: 110,
+			  formatter: (_row, _column, cellValue) => {
+			    return this.getDictValue('规则状态',  _row.status)
+			  }
 			},
 			},
 		  {
 		  {
-		    prop: 'creater',
+		    prop: 'createUserName',
 		    label: '创建人',
 		    label: '创建人',
 		    align: 'center',	
 		    align: 'center',	
 		    showOverflowTooltip: true,
 		    showOverflowTooltip: true,
@@ -184,32 +179,30 @@
     computed: {
     computed: {
 
 
     },
     },
+	created () {
+	  this.requestDict('规则状态');
+	},
     methods: {
     methods: {
       /* 表格数据源 */
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
       datasource({ page, limit, where, order }) {
-        return pageRoles({ pageNum: page, size: limit, ...where });
-      },
-      async changeEnable(row) {
-        const res = await putRoles(row);
-        if (res.code == 0) {
-          this.$message({
-            type: 'success',
-            message: '修改成功',
-            customClass: 'ele-message-border'
-          });
-          this.reload();
-        }
+        return planConfigPage({ pageNum: page, size: limit, ...where , ruleType:2});
       },
       },
+
       /* 刷新表格 */
       /* 刷新表格 */
       reload(where) {
       reload(where) {
-        this.$refs.table.reload({ page: 1, where });
+        this.$refs.table.reload({ page: 1, where , ruleType:2});
       },
       },
 	  
 	  
 	  openEdit(row){
 	  openEdit(row){
 		  this.isBindPlan = false
 		  this.isBindPlan = false
-		  this.$refs.addPatrolConfigDialogRef.addPatrolConfigDialog = true
-		  this.$refs.addPatrolConfigDialogRef.$refs.addFormRef && this.$refs.addPatrolConfigDialogRef.$refs.addFormRef.clearValidate()
-		  this.dialogTitle = '新增保养计划配置'
+		  // this.$refs.addPatrolConfigDialogRef.$refs.addFormRef && this.$refs.addPatrolConfigDialogRef.$refs.addFormRef.clearValidate()
+			this.$refs.addPatrolConfigDialogRef.addPatrolConfigDialog = true
+			if(row){
+				this.dialogTitle = '编辑保养计划配置'
+			}else{
+				this.dialogTitle = '新增保养计划配置'
+			}
+			this.$refs.addPatrolConfigDialogRef.init(row,'保养')
 	  },
 	  },
 	  
 	  
 	  goDetail(){
 	  goDetail(){

+ 4 - 4
src/views/rulesManagement/planRules/PatrolConfig/components/patrol-search.vue

@@ -11,9 +11,9 @@
         <el-form-item label="计划配置单号:">
         <el-form-item label="计划配置单号:">
           <el-input clearable v-model="where.code" placeholder="请输入" />
           <el-input clearable v-model="where.code" placeholder="请输入" />
         </el-form-item>
         </el-form-item>
-				<el-form-item label="规则名称:">
-					<el-input clearable v-model="where.ruleName" placeholder="请输入" />
-				</el-form-item>
+		<el-form-item label="规则名称:">
+			<el-input clearable v-model="where.ruleName" placeholder="请输入" />
+		</el-form-item>
       </el-col>
       </el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="计划配置名称:">
         <el-form-item label="计划配置名称:">
@@ -76,7 +76,7 @@
 
 
 <script>
 <script>
   import { login } from '@/api/login';
   import { login } from '@/api/login';
-  import {  listOrganizations , getUserPage } from '@/api/system/organization';
+  import {  listOrganizations } from '@/api/system/organization';
   export default {
   export default {
     data() {
     data() {
       // 默认表单数据
       // 默认表单数据

+ 2 - 3
src/views/rulesManagement/planRules/PatrolConfig/index.vue

@@ -71,7 +71,7 @@
 	mixins: [dictMixins],
 	mixins: [dictMixins],
     components: {
     components: {
       PatrolSearch,
       PatrolSearch,
-	  AddPatrolConfigDialog
+      AddPatrolConfigDialog
     },
     },
     data () {
     data () {
       return {
       return {
@@ -207,13 +207,12 @@
 	  openEdit(row){
 	  openEdit(row){
 		  this.isBindPlan = false
 		  this.isBindPlan = false
 		  this.$refs.addPatrolConfigDialogRef.addPatrolConfigDialog = true
 		  this.$refs.addPatrolConfigDialogRef.addPatrolConfigDialog = true
-		  this.$refs.addPatrolConfigDialogRef.init(row)
 			if(row){
 			if(row){
 				this.dialogTitle = '编辑巡点检计划配置'
 				this.dialogTitle = '编辑巡点检计划配置'
 			}else{
 			}else{
 				this.dialogTitle = '新增巡点检计划配置'
 				this.dialogTitle = '新增巡点检计划配置'
 			}
 			}
-			
+			this.$refs.addPatrolConfigDialogRef.init(row,'巡点检') 
 	  },
 	  },
 	  
 	  
 	  remove(row){
 	  remove(row){