| 
					
				 | 
			
			
				@@ -1,7 +1,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <!-- 数控程序管理 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <template v-if="!addOrUpdateVisible && !detailVisible"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <template v-if="!addOrUpdateVisible && !detailVisible && !assignVisible && !noteChangeVisible"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-form :inline="true" :model="dataForm" label-width="80px" @keyup.enter.native="queryData()"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-form-item label="项目名称"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-input v-model="dataForm.projectName" placeholder="请输入项目名称" clearable /> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -23,10 +23,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-button @click="queryData()">查询</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-button v-if="isAuth('pro:program:save')" type="primary" @click="addOrUpdateHandle(0)">新建</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-button v-if="isAuth('pro:program:noteChangeConfig')" type="primary" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            @click="noteChange()">变更通知人设置</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-table-column label="序号" type="index" width="50" align="center"></el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-table-column prop="programCode" header-align="center" align="center" min-width="140" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :show-tooltip-when-overflow="true" label="编码"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-table-column prop="projectName" header-align="center" align="center" min-width="140" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           :show-tooltip-when-overflow="true" label="项目名称"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-table-column> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -68,9 +73,11 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-table-column prop="responsibilityPerson" header-align="center" align="center" min-width="100" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           :show-tooltip-when-overflow="true" label="责任人"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-table-column fixed="right" header-align="center" align="center" width="90" label="操作"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-table-column fixed="right" header-align="center" align="center" width="135" label="操作"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <template slot-scope="scope"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-button type="text" size="small" @click="showDetail(scope.row.programId)">查看</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-button v-if="isAuth('pro:program:assign') && Number(scope.row.state) === 1" type="text" size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              @click="showAssign(scope.row)">分派</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-button v-if="isAuth('pro:program:updateProcessing') && Number(scope.row.state) === 1" type="text" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               size="small" @click="addOrUpdateHandle(scope.row.programId, 1)">处理</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-button v-if="isAuth('pro:program:update') && Number(scope.row.state) === 2" type="text" size="small" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -87,6 +94,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <program-add-or-update ref="addOrUpdate" v-if="addOrUpdateVisible" @onChose="onChose" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       @refreshDataList="getDataList"></program-add-or-update> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <program-detail ref="detail" v-if="detailVisible" @onChose="onChose"></program-detail> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <program-assign ref="assign" v-if="assignVisible" :programId="assignId" @close="onAssignClose"></program-assign> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <note-change ref="noteChange" v-if="noteChangeVisible" @onChose="onChose"></note-change> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -96,20 +105,25 @@ import { getList } from '@/api/program' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import AttachDetailDialog from '../common/attach-detail-dialog' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import ProgramAddOrUpdate from './program-add-or-update' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import ProgramDetail from './program-detail' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import ProgramAssign from './program-assign' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { isAuth } from '@/utils' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import UserComponent from '@/views/modules/common/user-component.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import NoteChange from './program-note-change' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   name: 'program', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   components: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     UserComponent, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     AttachDetailDialog, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     ProgramAddOrUpdate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    ProgramDetail 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    ProgramDetail, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    ProgramAssign, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    NoteChange 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   data() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       addOrUpdateVisible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       detailVisible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      noteChangeVisible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       dataForm: {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       dataList: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       pageIndex: 1, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -120,7 +134,9 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       optionsState: [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { value: '1', label: '待处理' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { value: '2', label: '已处理' } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      ] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      ], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      assignVisible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      assignId: null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   created() { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -132,6 +148,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     onChose() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.addOrUpdateVisible = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.detailVisible = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.assignVisible = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.noteChangeVisible = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getProductList() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       let params = { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -176,6 +194,23 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     attachDetails(attachList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs.attachDetail.init(attachList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    showAssign(row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.assignVisible = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$refs.assign.init(row) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    onAssignClose() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.assignVisible = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.assignId = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.getDataList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    noteChange() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.noteChangeVisible = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$refs.noteChange.init() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 每页数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     sizeChangeHandle(val) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.pageSize = val 
			 |