|  | @ -2,8 +2,8 @@ | 
		
	
		
			
				|  |  |   <div> |  |  |   <div> | 
		
	
		
			
				|  |  |     <div class="head-container"> |  |  |     <div class="head-container"> | 
		
	
		
			
				|  |  |       <crudOperation /> |  |  |       <crudOperation /> | 
		
	
		
			
				|  |  |       <el-select v-model="stateVal" class="filter-item" style="width: 100px; height: 30px;margin:0 0 0 10px"> |  |  |  | 
		
	
		
			
				|  |  |         <el-option v-for="item in StateOptions" :key="item.value" :label="item.label" :value="item.value" /> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       <el-select v-model="storageType" class="filter-item" style="width: 100px; height: 30px;margin:0 0 0 10px" @change="crud.toQuery"> | 
		
	
		
			
				|  |  |  |  |  |         <el-option v-for="item in storageTypeOptions" :key="item.value" :label="item.label" :value="item.value" /> | 
		
	
		
			
				|  |  |       </el-select> |  |  |       </el-select> | 
		
	
		
			
				|  |  |       <el-input |  |  |       <el-input | 
		
	
		
			
				|  |  |         v-model="keyWord" |  |  |         v-model="keyWord" | 
		
	
	
		
			
				|  | @ -14,7 +14,7 @@ | 
		
	
		
			
				|  |  |         class="input-prepend filter-item" |  |  |         class="input-prepend filter-item" | 
		
	
		
			
				|  |  |         @keyup.enter.native="crud.toQuery" |  |  |         @keyup.enter.native="crud.toQuery" | 
		
	
		
			
				|  |  |       > |  |  |       > | 
		
	
		
			
				|  |  |         <el-select slot="prepend" v-model="optionVal" style="width: 100px"> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         <el-select slot="prepend" v-model="optionVal" style="width: 100px" @keyup.enter.native="crud.toQuery"> | 
		
	
		
			
				|  |  |           <el-option |  |  |           <el-option | 
		
	
		
			
				|  |  |             v-for="item in options" |  |  |             v-for="item in options" | 
		
	
		
			
				|  |  |             :key="item.value" |  |  |             :key="item.value" | 
		
	
	
		
			
				|  | @ -31,21 +31,33 @@ | 
		
	
		
			
				|  |  |       ref="table" |  |  |       ref="table" | 
		
	
		
			
				|  |  |       style="width: 100%" |  |  |       style="width: 100%" | 
		
	
		
			
				|  |  |       height="calc(100vh - 357px)" |  |  |       height="calc(100vh - 357px)" | 
		
	
		
			
				|  |  |       :data="tableData" |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       :data="crud.data" | 
		
	
		
			
				|  |  |  |  |  |       :loading="crud.downloadLoading" | 
		
	
		
			
				|  |  |  |  |  |       :cell-class-name="cell" | 
		
	
		
			
				|  |  |       @row-click="clickRowHandler" |  |  |       @row-click="clickRowHandler" | 
		
	
		
			
				|  |  |       @selection-change="selectionChangeHandler" |  |  |       @selection-change="selectionChangeHandler" | 
		
	
		
			
				|  |  |     > |  |  |     > | 
		
	
		
			
				|  |  |       <el-table-column type="selection" width="55" /> |  |  |       <el-table-column type="selection" width="55" /> | 
		
	
		
			
				|  |  |       <el-table-column type="index" label="序号" align="center" width="80" /> |  |  |       <el-table-column type="index" label="序号" align="center" width="80" /> | 
		
	
		
			
				|  |  |       <el-table-column type="childrenNum" label="子条目数" align="center" width="90" /> |  |  |  | 
		
	
		
			
				|  |  |       <el-table-column type="categoryGrade" label="门类级别" align="center" width="100" /> |  |  |  | 
		
	
		
			
				|  |  |       <el-table-column type="" label="档号" align="center" min-width="200" /> |  |  |  | 
		
	
		
			
				|  |  |       <el-table-column type="" label="题名" align="center" min-width="200" /> |  |  |  | 
		
	
		
			
				|  |  |       <el-table-column type="" label="保密程度" align="center" width="100" /> |  |  |  | 
		
	
		
			
				|  |  |       <el-table-column type="" label="部门" align="center" width="100" /> |  |  |  | 
		
	
		
			
				|  |  |       <el-table-column prop="fieldName" align="center" label="盒名称" width="150" /> |  |  |  | 
		
	
		
			
				|  |  |       <el-table-column prop="storagePath" align="center" label="所在位置" width="250" /> |  |  |  | 
		
	
		
			
				|  |  |       <el-table-column align="center" prop="operationTime" label="创建时间" width="200" /> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       <el-table-column prop="storageType" label="状态" align="center" width="90"> | 
		
	
		
			
				|  |  |  |  |  |         <template slot-scope="scope"> | 
		
	
		
			
				|  |  |  |  |  |           <!-- 未入 / 待入 --> | 
		
	
		
			
				|  |  |  |  |  |           <span v-if="scope.row.storageType===0" class="clear" style="width:56px">未入</span> | 
		
	
		
			
				|  |  |  |  |  |           <span v-if="scope.row.storageType===1" class="clear" style="width:56px">待入</span> | 
		
	
		
			
				|  |  |  |  |  |           <span v-if="scope.row.storageType===2" class="clear" style="width:56px">已入</span> | 
		
	
		
			
				|  |  |  |  |  |           <span v-if="scope.row.storageType===3" class="clear" style="width:56px">待出</span> | 
		
	
		
			
				|  |  |  |  |  |         </template> | 
		
	
		
			
				|  |  |  |  |  |       </el-table-column> | 
		
	
		
			
				|  |  |  |  |  |       <el-table-column prop="depositNum" label="已装" align="center" width="100" /> | 
		
	
		
			
				|  |  |  |  |  |       <el-table-column prop="caseName" label="盒名称" align="center" min-width="200" /> | 
		
	
		
			
				|  |  |  |  |  |       <el-table-column prop="tid" label="TID" align="center" min-width="200" /> | 
		
	
		
			
				|  |  |  |  |  |       <el-table-column prop="barcode" label="条形码" align="center" width="100" /> | 
		
	
		
			
				|  |  |  |  |  |       <el-table-column prop="folderLocationDetails" align="center" label="存放位置" width="250" /> | 
		
	
		
			
				|  |  |  |  |  |       <el-table-column align="center" prop="update_time" label="操作时间" width="200"> | 
		
	
		
			
				|  |  |  |  |  |         <template slot-scope="scope"> | 
		
	
		
			
				|  |  |  |  |  |           <div>{{ scope.row.update_time | parseTime }}</div> | 
		
	
		
			
				|  |  |  |  |  |         </template> | 
		
	
		
			
				|  |  |  |  |  |       </el-table-column> | 
		
	
		
			
				|  |  |     </el-table> |  |  |     </el-table> | 
		
	
		
			
				|  |  |     <!-- 分页 --> |  |  |     <!-- 分页 --> | 
		
	
		
			
				|  |  |     <pagination /> |  |  |     <pagination /> | 
		
	
	
		
			
				|  | @ -53,7 +65,6 @@ | 
		
	
		
			
				|  |  | </template> |  |  | </template> | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | <script> |  |  | <script> | 
		
	
		
			
				|  |  | import data1 from '../data1.json' |  |  |  | 
		
	
		
			
				|  |  | import rrOperation from '@crud/RR.operation' |  |  | import rrOperation from '@crud/RR.operation' | 
		
	
		
			
				|  |  | import CRUD, { presenter, crud } from '@crud/crud' |  |  | import CRUD, { presenter, crud } from '@crud/crud' | 
		
	
		
			
				|  |  | import pagination from '@crud/Pagination' |  |  | import pagination from '@crud/Pagination' | 
		
	
	
		
			
				|  | @ -65,9 +76,9 @@ export default { | 
		
	
		
			
				|  |  |   mixins: [presenter(), crud()], |  |  |   mixins: [presenter(), crud()], | 
		
	
		
			
				|  |  |   cruds() { |  |  |   cruds() { | 
		
	
		
			
				|  |  |     return CRUD({ |  |  |     return CRUD({ | 
		
	
		
			
				|  |  |       url: 'api/case/initCaseList', |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       url: 'api/storage/initStorageLogList', | 
		
	
		
			
				|  |  |  |  |  |       sort: ['update_time,desc'], | 
		
	
		
			
				|  |  |       // crudMethod: caseCrudMethod, |  |  |       // crudMethod: caseCrudMethod, | 
		
	
		
			
				|  |  |       title: '档案盒', |  |  |  | 
		
	
		
			
				|  |  |       optShow: { |  |  |       optShow: { | 
		
	
		
			
				|  |  |         add: false, |  |  |         add: false, | 
		
	
		
			
				|  |  |         edit: false, |  |  |         edit: false, | 
		
	
	
		
			
				|  | @ -79,22 +90,22 @@ export default { | 
		
	
		
			
				|  |  |   data() { |  |  |   data() { | 
		
	
		
			
				|  |  |     return { |  |  |     return { | 
		
	
		
			
				|  |  |       msgVisible: false, |  |  |       msgVisible: false, | 
		
	
		
			
				|  |  |       keyWord: '', |  |  |  | 
		
	
		
			
				|  |  |       selections: [], |  |  |       selections: [], | 
		
	
		
			
				|  |  |       optionVal: '档号', |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       keyWord: '', | 
		
	
		
			
				|  |  |  |  |  |       optionVal: 'caseName', | 
		
	
		
			
				|  |  |       options: [ |  |  |       options: [ | 
		
	
		
			
				|  |  |         { value: '选项5', label: '档号' }, |  |  |  | 
		
	
		
			
				|  |  |         { value: '选项6', label: '题名' }, |  |  |  | 
		
	
		
			
				|  |  |         { value: '选项7', label: '部门' }, |  |  |  | 
		
	
		
			
				|  |  |         { value: '选项8', label: '盒名称' }, |  |  |  | 
		
	
		
			
				|  |  |         { value: '选项1', label: '归档年度' }, |  |  |  | 
		
	
		
			
				|  |  |         { value: '选项2', label: '门类名称' } |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         { value: 'caseName', label: '盒名称' }, | 
		
	
		
			
				|  |  |  |  |  |         { value: 'tid', label: 'TID' }, | 
		
	
		
			
				|  |  |  |  |  |         { value: 'barcode', label: '条形码' } | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  |       ], |  |  |       ], | 
		
	
		
			
				|  |  |       stateVal: '全部', |  |  |  | 
		
	
		
			
				|  |  |       StateOptions: [ |  |  |  | 
		
	
		
			
				|  |  |         { value: '选项5', label: '全部' }, |  |  |  | 
		
	
		
			
				|  |  |         { value: '选项6', label: '出库' }, |  |  |  | 
		
	
		
			
				|  |  |         { value: '选项7', label: '入库' } |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       storageType: '全部', | 
		
	
		
			
				|  |  |  |  |  |       storageTypeOptions: [ | 
		
	
		
			
				|  |  |  |  |  |         { value: '全部', label: '全部' }, | 
		
	
		
			
				|  |  |  |  |  |         { value: '0', label: '未入' }, | 
		
	
		
			
				|  |  |  |  |  |         { value: '1', label: '待入' }, | 
		
	
		
			
				|  |  |  |  |  |         { value: '2', label: '已入' }, | 
		
	
		
			
				|  |  |  |  |  |         { value: '3', label: '待出' } | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |       ] |  |  |       ] | 
		
	
		
			
				|  |  |     } |  |  |     } | 
		
	
	
		
			
				|  | @ -103,8 +114,21 @@ export default { | 
		
	
		
			
				|  |  |     this.getData() |  |  |     this.getData() | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   methods: { |  |  |   methods: { | 
		
	
		
			
				|  |  |  |  |  |     // 获取数据前的处理 | 
		
	
		
			
				|  |  |  |  |  |     [CRUD.HOOK.beforeRefresh]() { | 
		
	
		
			
				|  |  |  |  |  |       this.crud.query.storageType = null | 
		
	
		
			
				|  |  |  |  |  |       this.crud.query.caseName = null | 
		
	
		
			
				|  |  |  |  |  |       this.crud.query.tid = null | 
		
	
		
			
				|  |  |  |  |  |       this.crud.query.barcode = null | 
		
	
		
			
				|  |  |  |  |  |       if (this.storageType === '全部') { | 
		
	
		
			
				|  |  |  |  |  |         this.crud.query.storageType = null | 
		
	
		
			
				|  |  |  |  |  |       } else { | 
		
	
		
			
				|  |  |  |  |  |         this.crud.query.storageType = this.storageType | 
		
	
		
			
				|  |  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |  |       this.crud.query[this.optionVal] = this.keyWord | 
		
	
		
			
				|  |  |  |  |  |     }, | 
		
	
		
			
				|  |  |     getData() { |  |  |     getData() { | 
		
	
		
			
				|  |  |       this.tableData = data1.rows |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       console.log(this.crud, 'crud') | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     clickRowHandler(row) { |  |  |     clickRowHandler(row) { | 
		
	
		
			
				|  |  |       this.$refs.table.toggleRowSelection(row) // 单击选中 |  |  |       this.$refs.table.toggleRowSelection(row) // 单击选中 | 
		
	
	
		
			
				|  | @ -112,6 +136,18 @@ export default { | 
		
	
		
			
				|  |  |     selectionChangeHandler(val) { |  |  |     selectionChangeHandler(val) { | 
		
	
		
			
				|  |  |       this.selections = val |  |  |       this.selections = val | 
		
	
		
			
				|  |  |       // console.log(val, '-----') |  |  |       // console.log(val, '-----') | 
		
	
		
			
				|  |  |  |  |  |     }, | 
		
	
		
			
				|  |  |  |  |  |     // 单元格样式 | 
		
	
		
			
				|  |  |  |  |  |     cell({ row, columnIndex }) { | 
		
	
		
			
				|  |  |  |  |  |       if (row.storageType === 0 && columnIndex === 2) { // 未入 | 
		
	
		
			
				|  |  |  |  |  |         return 'fail-clear' | 
		
	
		
			
				|  |  |  |  |  |       } else if (row.storageType === 1 && columnIndex === 2) { // 待入 | 
		
	
		
			
				|  |  |  |  |  |         return 'no-clear' | 
		
	
		
			
				|  |  |  |  |  |       } else if (row.storageType === 2 && columnIndex === 2) { // 已入 | 
		
	
		
			
				|  |  |  |  |  |         return 'have-clear' | 
		
	
		
			
				|  |  |  |  |  |       } else if (row.storageType === 3 && columnIndex === 2) { // 待出 | 
		
	
		
			
				|  |  |  |  |  |         return 'other-clear' | 
		
	
		
			
				|  |  |  |  |  |       } | 
		
	
		
			
				|  |  |     } |  |  |     } | 
		
	
		
			
				|  |  |   } |  |  |   } | 
		
	
		
			
				|  |  | } |  |  | } | 
		
	
	
		
			
				|  | 
 |