YangJian0701 1 年間 前
コミット
4e07333e62
1 ファイル変更67 行追加7 行削除
  1. 67 7
      src/views/calibrationCertificate/index.vue

+ 67 - 7
src/views/calibrationCertificate/index.vue

@@ -9,23 +9,41 @@
 					搜索:
 				</div>
 				<el-input v-model="pages.T_sn" placeholder="请输入证书编号" @keyup.enter.native="search" clearable></el-input>
+				<el-input v-model="pages.T_layout_no" placeholder="请输入布局编号" @keyup.enter.native="search" clearable style="margin-left: 10px;"></el-input>
 			</div>
 		</div>
 		<div class="calibrationCertificate2">
 			<el-table :data="tableData" border size="small">
+				<el-table-column label="布局编号" width="180">
+					<template slot-scope="scope">
+						<span>{{ scope.row.T_layout_no }}</span>
+					</template>
+				</el-table-column>
 				<el-table-column label="证书编号" width="180">
 					<template slot-scope="scope">
 						<span>{{ scope.row.T_sn }}</span>
 					</template>
 				</el-table-column>
-				<el-table-column label="发布时间" width="180">
-					<template slot-scope="scope">
-						{{ scope.row.T_release_time}}
+				<el-table-column  prop="T_release_time" width="180">
+					<template #header>
+						<div style="display: flex;align-items: center;cursor: pointer;" @click="filtFun('release')">
+							发布时间
+							<div style="font-size: 14px;display: flex;flex-direction: column;">			
+								<i class="el-icon-caret-top" style="width: 1em; height: 1em;margin-bottom: -4px;" :style="{color:pages.T_release_time_sort==1?'#409eff':'#a8abb2'}"></i>
+								<i class="el-icon-caret-bottom" style="width: 1em; height: 1em;margin-top: -4px;" :style="{color:pages.T_release_time_sort==2?'#409eff':'#a8abb2'}"></i>
+							</div>
+						</div>
 					</template>
 				</el-table-column>
-				<el-table-column label="失效时间" width="180">
-					<template slot-scope="scope">
-						{{ scope.row.T_failure_time}}
+				<el-table-column  prop="T_failure_time" width="180">
+					<template #header>
+						<div style="display: flex;align-items: center;cursor: pointer;" @click="filtFun('failure')">
+							失效时间
+							<div style="font-size: 14px;display: flex;flex-direction: column;">			
+								<i class="el-icon-caret-top" style="width: 1em; height: 1em;margin-bottom: -4px;" :style="{color:pages.T_failure_time_sort==1?'#409eff':'#a8abb2'}"></i>
+								<i class="el-icon-caret-bottom" style="width: 1em; height: 1em;margin-top: -4px;" :style="{color:pages.T_failure_time_sort==2?'#409eff':'#a8abb2'}"></i>
+							</div>
+						</div>
 					</template>
 				</el-table-column>
 				<el-table-column label="操作">
@@ -34,6 +52,8 @@
 							<el-button size="small" :disabled="scope.row.T_pdf==''?true:false" @click="handlePdf(scope.row)">查看PDF</el-button> <!--  -->
 							<el-button slot="reference" size="small" @click="handleEdit(scope.row)">管理证书
 							</el-button>
+							<el-button slot="reference" size="small" @click="handleFun(scope.row)">编辑
+							</el-button>
 							<el-button slot="reference" size="small" @click="handleDelete(scope.row)">删除
 							</el-button>
 						</div>
@@ -50,6 +70,9 @@
 			<!-- 时间流程按钮后的编辑 -->
 			<div style="padding: 20px;">
 				<el-form :model="form" :rules="rules" ref="ruleForm">
+					<el-form-item label="布局编号" label-width="80px" prop="T_layout_no">
+						<el-input v-model="form.T_layout_no" autocomplete="off"></el-input>
+					</el-form-item>
 					<el-form-item label="证书编号" label-width="80px" prop="T_sn">
 						<el-input v-model="form.T_sn" autocomplete="off"></el-input>
 					</el-form-item>
@@ -164,9 +187,16 @@
 						message: '请输入证书编号',
 						trigger: 'blur'
 					}],
+					T_layout_no:[{
+						required: true,
+						message: '请输入布局编号',
+						trigger: 'blur'
+					}],
 				},
 				form: {
 					T_sn: '',
+					T_layout_no:'',
+					
 				},
 				innerDrawer2: false,
 				innerDrawer4: false,
@@ -174,7 +204,10 @@
 				pages: {
 					page: 1,
 					page_z: 10,
-					T_sn: ''
+					T_sn: '',
+					T_layout_no:'',
+					T_release_time_sort:0,
+					T_failure_time_sort:0
 				},
 				// pages1: {
 				// 	page: 1,
@@ -202,6 +235,28 @@
 			this.GetCertiListApi()
 		},
 		methods: {
+			//筛选
+			filtFun(e){
+				let _this = this
+				if(e=='release'){//发布时间
+					_this.pages.T_failure_time_sort = 0
+					if(_this.pages.T_release_time_sort<2){
+						_this.pages.T_release_time_sort+=1
+					}else{
+						_this.pages.T_release_time_sort=0
+					}
+				}else{
+					_this.pages.T_release_time_sort = 0
+					if(_this.pages.T_failure_time_sort<2){
+						_this.pages.T_failure_time_sort+=1
+					}else{
+						_this.pages.T_failure_time_sort=0
+					}
+				}
+				this.pages.page = 1
+				this.GetCertiListApi()
+				console.log(_this.pages)
+			},
 			fliValue(e){
 				this.pages3.T_pdf = e
 			},
@@ -294,6 +349,11 @@
 				console.log('查看pdf', e)
 				this.$refs.pdf.SetPdf(e.T_pdf)
 			},
+			handleFun(e){
+				console.log('111',e)
+				this.titles = '编辑'
+				this.innerDrawer2 = true
+			},
 			handleEdit(e) {
 				this.pages2.T_Certificate_sn = e.T_sn
 				this.innerDrawer4 = true