YangJian0701 vor 2 Jahren
Ursprung
Commit
45939a7a11

+ 2 - 0
package.json

@@ -10,10 +10,12 @@
   "dependencies": {
     "axios": "^1.2.1",
     "core-js": "^3.8.3",
+    "downloadjs": "^1.4.7",
     "element-ui": "^2.15.12",
     "js-file-download": "^0.4.12",
     "js-md5": "^0.7.3",
     "node-sass": "^8.0.0",
+    "qiniu-js": "^3.4.0",
     "qs": "^6.11.0",
     "sass-loader": "^13.2.0",
     "style-loader": "^3.3.1",

+ 10 - 2
src/api/CompanyAccount.js

@@ -5,8 +5,16 @@ import {
 
 const UserTask = {
 	TaskList: '/UserTask/List',//报告任务列表
-	ExtData: '/TaskData/List',//提取数据
-	
+	ExtData: '/UserTaskData/List',//提取数据
+	Dowload: '/TaskData/Export_Data_PDF',//下载
+}
+//下载
+export function Dowloads(data) {
+	return axios({
+		url: UserTask.Dowload,
+		method: 'post',
+		data:data
+	})
 }
 //报告任务列表
 export function ExtData(data) {

+ 55 - 0
src/api/ManagingUsers.js

@@ -0,0 +1,55 @@
+// 登录接口
+import {
+	axios
+} from '../utils/http.js'
+
+const AdminTask = {
+	AdminList: '/Admin/List',//管理员-列表
+	AdminAdd: '/Admin/Add',//管理员-列表
+	AdminUp: '/Admin/Up',//管理员-列表
+	AdminDel: '/Admin/Del',//管理员-列表
+	UserPowerAll: '/UserPower/List_All',//权限select
+	
+	
+}
+//管理员-列表
+export function AdminDel(data) {
+	return axios({
+		url: AdminTask.AdminDel,
+		method: 'post',
+		data:data
+	})
+}
+
+//管理员-列表
+export function AdminUp(data) {
+	return axios({
+		url: AdminTask.AdminUp,
+		method: 'post',
+		data:data
+	})
+}
+//管理员-列表
+export function UserPowerAll(data) {
+	return axios({
+		url: AdminTask.UserPowerAll,
+		method: 'post',
+		data:data
+	})
+}
+//管理员-列表
+export function AdminAdd(data) {
+	return axios({
+		url: AdminTask.AdminAdd,
+		method: 'post',
+		data:data
+	})
+}
+//管理员-列表
+export function AdminList(data) {
+	return axios({
+		url: AdminTask.AdminList,
+		method: 'post',
+		data:data
+	})
+}

+ 78 - 0
src/api/ReportViewing.js

@@ -0,0 +1,78 @@
+// 登录接口
+import {
+	axios
+} from '../utils/http.js'
+
+const VT = {
+	TempGet: '/VerifyTemplate/List',
+	TempAdd: '/VerifyTemplate/Add',
+	TempUp: '/VerifyTemplate/Up',
+	TempDel: '/VerifyTemplate/Del',
+	
+	
+	Map_List: '/VerifyTemplate/Map_List',
+	Map_Add: '/VerifyTemplate/Map_Add',
+	Map_Up: '/VerifyTemplate/Map_Up',
+	Map_Del: '/VerifyTemplate/Map_Del',
+	
+}
+export function Map_Del(data) {
+	return axios({
+		url: VT.Map_Del,
+		method: 'post',
+		data:data
+	})
+}
+export function Map_Up(data) {
+	return axios({
+		url: VT.Map_Up,
+		method: 'post',
+		data:data
+	})
+}
+export function Map_Add(data) {
+	return axios({
+		url: VT.Map_Add,
+		method: 'post',
+		data:data
+	})
+}
+
+export function Map_List(data) {
+	return axios({
+		url: VT.Map_List,
+		method: 'post',
+		data:data
+	})
+}
+
+
+export function TempDel(data) {
+	return axios({
+		url: VT.TempDel,
+		method: 'post',
+		data:data
+	})
+}
+
+export function TempUp(data) {
+	return axios({
+		url: VT.TempUp,
+		method: 'post',
+		data:data
+	})
+}
+export function TempAdd(data) {
+	return axios({
+		url: VT.TempAdd,
+		method: 'post',
+		data:data
+	})
+}
+export function TempGet(data) {
+	return axios({
+		url: VT.TempGet,
+		method: 'post',
+		data:data
+	})
+}

+ 15 - 0
src/api/ValidationTemplate.js

@@ -0,0 +1,15 @@
+// 登录接口
+import {
+	axios
+} from '../utils/http.js'
+
+const Tasklist = {
+	TaskGet: '/Task/Get',
+}
+export function TaskGet(data) {
+	return axios({
+		url: Tasklist.TaskGet,
+		method: 'post',
+		data:data
+	})
+}

+ 64 - 0
src/api/calibrationCertificate.js

@@ -0,0 +1,64 @@
+// 登录接口
+import {
+	axios
+} from '../utils/http.js'
+
+const Certificate = {
+	CertiList: 'Certificate/List',
+	CertiAdd: 'Certificate/Add',
+	CertiDel: 'Certificate/Del',
+	Certi_pdf: 'Certificate/Pdf_List',
+	Certi_pdfAdd: 'Certificate/Pdf_Add',//添加证书
+	Certi_pdfUp: 'Certificate/Pdf_Up',//添加证书
+	Certi_pdfDel: 'Certificate/Pdf_Del',//添加证书
+	
+}
+export function Certi_pdfDel(data) {
+	return axios({
+		url: Certificate.Certi_pdfDel,
+		method: 'post',
+		data:data
+	})
+}
+export function Certi_pdfUp(data) {
+	return axios({
+		url: Certificate.Certi_pdfUp,
+		method: 'post',
+		data:data
+	})
+}
+export function Certi_pdfAdd(data) {
+	return axios({
+		url: Certificate.Certi_pdfAdd,
+		method: 'post',
+		data:data
+	})
+}
+export function Certi_pdf(data) {
+	return axios({
+		url: Certificate.Certi_pdf,
+		method: 'post',
+		data:data
+	})
+}
+export function CertiDel(data) {
+	return axios({
+		url: Certificate.CertiDel,
+		method: 'post',
+		data:data
+	})
+}
+export function CertiAdd(data) {
+	return axios({
+		url: Certificate.CertiAdd,
+		method: 'post',
+		data:data
+	})
+}
+export function CertiList(data) {
+	return axios({
+		url: Certificate.CertiList,
+		method: 'post',
+		data:data
+	})
+}

+ 13 - 0
src/api/pdfToken.js

@@ -0,0 +1,13 @@
+// 图片资源
+import {
+	axios
+} from '../utils/http.js'
+
+//获取七牛云token
+export function PDFToken(data) {
+	return axios({
+		url: '/UpFileToken',
+		method: 'POST',
+		data: data
+	})
+}

BIN
src/assets/img/flies.png


+ 121 - 0
src/components/files.vue

@@ -0,0 +1,121 @@
+<template>
+	<div class="files">
+		<div class="files-mai">
+			<div class="files-mai1">
+				<img src="@/assets/img/flies.png" alt="" srcset="">
+				<div>点击虚线框内,<span style="color: #409EFF;">上传文件</span></div>
+			</div>
+			<input type="file" accept="application/pdf" @change="files"
+				style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;opacity:0;cursor: pointer;">
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		PDFToken
+	} from "@/api/pdfToken.js";
+	import * as qiniu from 'qiniu-js';
+	export default {
+		data() {
+			return {
+				file: null, //点击上传的pdf资源包
+				qiniuToken: null,
+			}
+		},
+		methods: {
+			files(e) { //上传图片到七牛云拿url
+				console.log(e)
+				var _this = this
+				this.file = e.target.files[0];
+				var strtype = this.file.name.substring(this.file.name.lastIndexOf('.') + 1); //获取后缀 png jpg
+				PDFToken({
+					T_suffix: strtype
+				}).then(res => {
+					if (res.data.Code == 200) {
+						_this.qiniuToken = res.data.Data
+						_this.QiniuYun()
+					} else {
+						_this.$message.error(res.data.Msg);
+					}
+				})
+			},
+			QiniuYun() {
+				var _this = this
+				var key = _this.file.name || null;
+				var config = {
+					useCdnDomain: false, //表示是否使用 cdn 加速域名,为布尔值,true 表示使用,默认为 false。
+					region: qiniu.region.z2,
+					domain: "https://qiniu.region.z2", //配置好的七牛云域名  如   https://cdn.qniyun.com/
+					chunkSize: 1000, //每个分片的大小,单位mb,默认值3
+					forceDirect: false //直传还是断点续传方式,true为直传
+				};
+				var putExtra = {
+					fname: _this.file.name, //文件原始文件名
+					params: {},
+					mimeType: [] || null
+				};
+				var observable = qiniu.upload(_this.file, key, _this.qiniuToken, putExtra, config);
+				//   设置实例的监听对象
+				var observer = {
+					next(res) {
+						//上传进度
+						_this.filePercent = parseInt(res.total.percent)
+						if (_this.filePercent === 100) {
+							console.log('实例监听对象', res)
+						}
+						//
+					},
+					// 接收上传错误信息
+					error(err) {
+						switch (err.code) {
+							case 413:
+								_this.$message.error('错了哦,图片可能太大了哦');
+								break
+							case 408:
+								_this.$message.error('错了哦,请求超时');
+								break
+							default:
+								_this.$message.error('错了哦,上传错误');
+						}
+					},
+					// 接收上传完成后的信息
+					complete(com) {
+						console.log('七牛云返回',com)
+						_this.$emit('pdfvalue', com.key);
+					}
+				};
+				observable.subscribe(observer);
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.files-mai {
+		border: 1px dashed #d9d9d9;
+		border-radius: 6px;
+		position: relative;
+		height: 150px;
+
+		.files-mai1 {
+			height: 100%;
+			color: #606266;
+			font-size: 14px;
+			text-align: center;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+
+			img {
+				width: 60px;
+				height: 60px;
+			}
+		}
+	}
+
+	.files-mai:hover {
+		border: 1px dashed #409EFF;
+	}
+</style>

+ 7 - 0
src/router/index.js

@@ -26,6 +26,7 @@ const routes = [
 			component: () => import('@/views/home/home.vue'),
 			meta: {
 				title: '工作首页',
+				authority:0//0全显示,1管理,2用户
 			},
 		},{
 			path: '/CompanyAccount',
@@ -34,6 +35,7 @@ const routes = [
 			component: () => import('@/views/CompanyAccount/index.vue'),
 			meta: {
 				title: '公司账户',
+				authority:2//0全显示,1管理,2用户
 			},
 		},{
 			path: '/ManagingUsers',
@@ -42,6 +44,7 @@ const routes = [
 			component: () => import('@/views/ManagingUsers/index.vue'),
 			meta: {
 				title: '管理用户',
+				authority:1//0全显示,1管理,2用户
 			},
 		},{
 			path: '/companyManagement',
@@ -50,6 +53,7 @@ const routes = [
 			component: () => import('@/views/companyManagement/index.vue'),
 			meta: {
 				title: '公司管理',
+				authority:1//0全显示,1管理,2用户
 			},
 		},{
 			path: '/ReportViewing',
@@ -58,6 +62,7 @@ const routes = [
 			component: () => import('@/views/ReportViewing/index.vue'),
 			meta: {
 				title: '报告查看',
+				authority:1//0全显示,1管理,2用户
 			},
 		},{
 			path: '/ValidationTemplate',
@@ -66,6 +71,7 @@ const routes = [
 			component: () => import('@/views/ValidationTemplate/index.vue'),
 			meta: {
 				title: '验证模板管理',
+				authority:1//0全显示,1管理,2用户
 			},
 		},{
 			path: '/calibrationCertificate',
@@ -74,6 +80,7 @@ const routes = [
 			component: () => import('@/views/calibrationCertificate/index.vue'),
 			meta: {
 				title: '校准证书管理',
+				authority:1//0全显示,1管理,2用户
 			},
 		}]
 	},{

+ 3 - 0
src/utils/filePDF.js

@@ -0,0 +1,3 @@
+export function files(files){
+	console.log('上传的文件',files)
+}

+ 149 - 83
src/views/CompanyAccount/index.vue

@@ -3,8 +3,9 @@
 		<div class="CompanyAccount-mai">
 			<div class="CompanyAccount1">
 				<div class="CompanyAccount1-R">
-					<el-input v-model="pages.T_name" placeholder="请输入账户" @keyup.enter.native="search" clearable></el-input>
-					<el-button class="s1 sBtn" type="primary" icon="el-icon-search">搜索</el-button>
+					<el-input v-model="pages.T_name" placeholder="请输入账户" @keyup.enter.native="search(0)" clearable>
+					</el-input>
+					<el-button class="s1 sBtn" type="primary" icon="el-icon-search" @click="search(0)">搜索</el-button>
 				</div>
 			</div>
 			<div class="CompanyAccount2">
@@ -16,17 +17,20 @@
 					</el-table-column>
 					<el-table-column label="操作">
 						<template slot-scope="scope">
-							<el-button size="mini" :disabled="scope.row.T_pdf1===''?true:false" @click="handleEdit1(scope.row)">验证方案</el-button>
-							<el-button size="mini" :disabled="scope.row.T_pdf2===''?true:false" @click="handleEdit2(scope.row)">验证报告</el-button>
-							<el-button size="mini" :disabled="scope.row.T_pdf3===''?true:false" @click="handleEdit3(scope.row)">校准证书</el-button>
+							<el-button size="mini" :disabled="scope.row.T_pdf1===''?true:false"
+								@click="handleEdit1(scope.row)">验证方案</el-button>
+							<el-button size="mini" :disabled="scope.row.T_pdf2===''?true:false"
+								@click="handleEdit2(scope.row)">验证报告</el-button>
+							<el-button size="mini" :disabled="scope.row.T_pdf3===''?true:false"
+								@click="handleEdit3(scope.row)">校准证书</el-button>
 							<el-button size="mini" @click="handleEdit4(scope.row)">验证数据</el-button>
 						</template>
 					</el-table-column>
 				</el-table>
 			</div>
 			<div class="CompanyAccount3">
-				<el-pagination @current-change="handleCurrentChange" :current-page="pages.page" :page-size="pages.page_z"
-					layout="total, prev, pager, next, jumper" :total="total">
+				<el-pagination @current-change="handleCurrentChange" :current-page="pages.page"
+					:page-size="pages.page_z" layout="total, prev, pager, next, jumper" :total="total">
 				</el-pagination>
 			</div>
 		</div>
@@ -34,85 +38,107 @@
 			<div class="demo-drawers">
 				<div class="demoDra1">
 					<div class="demoDra1-R">
-						<el-input class="s1" v-model="pages.name" placeholder="请输入SN" clearable></el-input>
-						<el-input class="s1" v-model="pages.name" placeholder="请输入编号" clearable></el-input>
-						<el-date-picker class="s1" v-model="pages.name" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
-							range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="searchTimeData">
+						<el-input class="s1" v-model="pages1.T_sn" @keyup.enter.native="search(1)" placeholder="请输入SN"
+							clearable></el-input>
+						<el-input class="s1" v-model="pages1.T_id" @keyup.enter.native="search(1)" placeholder="请输入编号"
+							clearable></el-input>
+						<el-date-picker class="s1" v-model="pages.name" value-format="yyyy-MM-dd HH:mm:ss"
+							type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
+							@change="searchTimeData">
 						</el-date-picker>
-						<el-button class="s1 sBtn" type="primary" icon="el-icon-search"></el-button>
+						<el-button class="s1 sBtn" type="primary" icon="el-icon-search" @click="search(1)"></el-button>
 					</div>
 					<div class="demoDra1-L s1">
 						<el-button type="primary" icon="el-icon-download" @click="Dowload">下载</el-button>
 					</div>
 				</div>
 				<div class="demoDra2">
-					<el-table :data="tableData" border size="small">
+					<el-table :data="tableData1" border size="small">
 						<el-table-column label="ID">
 							<template slot-scope="scope">
-								<span>{{ scope.row.date }}</span>
+								<span>{{ scope.row.ID}}</span>
 							</template>
 						</el-table-column>
 						<el-table-column label="设备编号">
 							<template slot-scope="scope">
-								{{ scope.row.name }}
+								{{ scope.row.T_id}}
 							</template>
 						</el-table-column>
 						<el-table-column label="SN">
 							<template slot-scope="scope">
-								<span>{{ scope.row.date }}</span>
+								<span>{{ scope.row.T_sn}}</span>
 							</template>
 						</el-table-column>
 						<el-table-column label="温度℃">
 							<template slot-scope="scope">
-								{{ scope.row.name }}
+								{{ scope.row.T_t}}
+							</template>
+						</el-table-column>
+						<el-table-column label="湿度%">
+							<template slot-scope="scope">
+								{{ scope.row.T_rh}}
 							</template>
 						</el-table-column>
 					</el-table>
 				</div>
 				<div class="demoDra3">
-					<el-pagination @current-change="handleCurrentChange" :current-page="pages.page" :page-size="pages.page_z"
-						layout="total, prev, pager, next, jumper" :total="total">
+					<el-pagination @current-change="handleCurrentChange1" :current-page="pages1.page"
+						:page-size="pages1.page_z" layout="total, prev, pager, next, jumper" :total="total1">
 					</el-pagination>
 				</div>
 			</div>
 		</el-drawer>
+		<el-drawer title="校准证书" :visible.sync="Drawer1" direction="rtl" ref="drawer">
+			<div class="demo-drawers">
+				<div style="margin-bottom: 20px;font-size: 14px;color: #C0C4CC;">请选择对应的校准证书查看:</div>
+				<div style="display: grid;grid-template-columns: 1fr 1fr;grid-gap: 10px;">
+					<el-radio v-model="radio1" @input="radioInput" :label="item" style="margin: 0;" border
+						v-for="item,index in radioXuan" :key="index">{{item.split(",")[0]}}</el-radio>
+				</div>
+			</div>
+		</el-drawer>
 		<pdf ref="pdf"></pdf>
-		<el-empty description="暂无其他内容"></el-empty>
+		<!-- <el-empty description="暂无其他内容"></el-empty> -->
 	</div>
 </template>
 
 <script>
 	import pdf from "./pdf.vue"
-	import Axios from 'axios'
-	import fileDownload from 'js-file-download'
+	import download from "downloadjs"
 	import {
-		TaskList,ExtData
+		TaskList,
+		ExtData,
+		Dowloads
 	} from '@/api/CompanyAccount'
 	export default {
-		name:'CompanyAccount',
+		name: 'CompanyAccount',
 		components: { //组件
 			pdf
 		},
 		data() {
-			return{
-				Drawer:false,
+			return {
+				Drawer: false,
+				Drawer1: false,
 				src: '',
 				dia: null,
-				total: 30,
+				total: 0,
+				total1: 0,
 				pages: {
 					page: 1,
 					page_z: 10,
 					T_name: ''
 				},
-				pages1:{
-					T_task_id:'',
-					// T_sn:'',
-					// T_id:'',
-					// Time_start:'',
-					// Time_end:'',
-					// page: 1,
-					// page_z: 10,
+				pages1: {
+					T_task_id: '',
+					T_sn: '',
+					T_id: '',
+					Time_start: '',
+					Time_end: '',
+					page: 1,
+					page_z: 10,
 				},
+				radioXuan: [],
+				radio1: '',
 				tableData: [],
 				tableData1: [],
 			}
@@ -121,62 +147,92 @@
 			this.GetTkListApi()
 		},
 		methods: {
-			GetTkListApi(){
-				TaskList(this.pages).then(res=>{
-					console.log('劣币送',res)
-					if(res.data.Code===200){
+			radioInput() {
+				var values = this.radio1.split(",")[1]
+				this.$refs.pdf.SetPdf(values)
+			},
+			GetTkListApi() {
+				TaskList(this.pages).then(res => {
+					if (res.data.Code === 200) {
 						this.tableData = res.data.Data.List
 						this.total = res.data.Data.Num
 					}
 				})
 			},
-			handleEdit1(e){
-				this.$refs.pdf.SetPdf()
+			handleEdit1(e) {
+				this.$refs.pdf.SetPdf(e.T_pdf2)
 			},
-			handleEdit2(e){
-				this.$refs.pdf.SetPdf()
+			handleEdit2(e) {
+				this.$refs.pdf.SetPdf(e.T_pdf1)
 			},
-			handleEdit3(e){
-				this.$refs.pdf.SetPdf()
+			handleEdit3(e) {
+				this.Drawer1 = true
+				this.radioXuan = e.T_pdf3.split("|")
 			},
-			handleEdit4(e){
-				console.log('搜索',e)
-				this.pages1.T_task_id = 'ixEfo5zk2Oeb'
+			handleEdit4(e) {
+				this.pages1.T_task_id = e.T_task_id
 				// this.pages1.T_id = e.Id	
 				// this.pages1.T_sn = e.T_sn
 				this.GetExtDataApi()
 			},
-			GetExtDataApi(){
-				console.log('搜索',this.pages1)
-				ExtData(this.pages1).then(res=>{
-					console.log('劣币送',res)
+			GetExtDataApi() {
+				ExtData(this.pages1).then(res => {
+					console.log('劣币送', res)
 					this.Drawer = true
-					if(res.data.Code===200){
+					if (res.data.Code === 200) {
 						this.tableData1 = res.data.Data.List
-						this.total = res.data.Data.Num
+						this.total1 = res.data.Data.Num
 					}
 				})
 			},
-			Dowload(){//下载数据
-				fileDownload('res.data', '111.docx');
-				// Axios({
-				// 	method: 'get',
-				// 	url: 'this.downUrl',
-				// 	responseType: 'blob'
-				// }).then(res => {
-				// 	console.log(res)
-				// 	fileDownload(res.data, '111.docx');
-				// });
+			Dowload() { //下载数据
+				var pams = {
+					T_task_id: this.pages1.T_task_id,
+					T_sn_list: '',
+					Time_start: this.pages1.Time_start,
+					Time_end: this.pages1.Time_end
+				}
+				const loading = this.$loading({
+					lock: true,
+					text: '正在整理数据,请稍后...',
+					spinner: 'el-icon-loading',
+					background: 'rgba(0, 0, 0, 0.7)'
+				});
+				Dowloads(pams).then(res => {
+					console.log(res)
+					if (res.data.Code === 200) {
+						loading.close()
+						download(res.data.Data);
+					}
+				})
 			},
 			searchTimeData(e) {
-				console.log('时间选择', e)
+				if (e != null) {
+					this.pages1.Time_start = e[0]
+					this.pages1.Time_end = e[1]
+				} else {
+					this.pages1.Time_start = ''
+					this.pages1.Time_end = ''
+				}
+				this.pages1.page = 1
+				this.GetExtDataApi()
 			},
-			search() { //回车搜索
-				console.log('搜索', this.pages.T_name);
+			search(e) { //回车搜索
+				if (e == 0) {
+					this.pages.page = 1
+					this.GetTkListApi()
+				} else {
+					this.pages1.page = 1
+					this.GetExtDataApi()
+				}
 			},
 			handleCurrentChange(val) {
-				 this.pages.page = val
-				console.log('当前页', this.pages);
+				this.pages.page = val
+				this.GetTkListApi()
+			},
+			handleCurrentChange1(val) {
+				this.pages1.page = val
+				this.GetExtDataApi()
 			},
 		},
 	}
@@ -187,63 +243,73 @@
 		margin-right: 10px;
 		width: 200px;
 	}
-	.CompanyAccount{
+
+	.CompanyAccount {
 		height: 100%;
 		overflow: hidden;
-		.CompanyAccount-mai{
+
+		.CompanyAccount-mai {
 			.CompanyAccount1 {
 				display: flex;
 				align-items: center;
+
 				.CompanyAccount1-L {}
+
 				.CompanyAccount1-R {
 					display: flex;
 					align-items: center;
-					.s1{
+
+					.s1 {
 						margin-left: 10px;
 					}
-					
+
 				}
 			}
+
 			.CompanyAccount2 {
 				margin-top: 20px;
 			}
-			
+
 			.CompanyAccount3 {
 				margin-top: 40px;
 			}
 		}
-		.demo-drawers{
-			padding:0 20px;
+
+		.demo-drawers {
+			padding: 0 20px;
+
 			.demoDra1 {
 				display: flex;
 				flex-wrap: wrap;
 				justify-content: space-between;
+
 				.demoDra1-L {
-					.s1{
+					.s1 {
 						margin-bottom: 10px;
 						margin-right: 10px;
 					}
 				}
+
 				.demoDra1-R {
 					display: flex;
 					flex-wrap: wrap;
 					align-items: center;
-					.s1{
+
+					.s1 {
 						margin-bottom: 10px;
 						margin-right: 10px;
 					}
-					
+
 				}
 			}
-			
+
 			.demoDra2 {
 				margin-top: 10px;
 			}
-			
+
 			.demoDra3 {
 				margin-top: 40px;
 			}
 		}
 	}
-	
-</style>
+</style>

+ 2 - 3
src/views/CompanyAccount/pdf.vue

@@ -27,10 +27,9 @@
 			}
 		},
 		methods:{
-			SetPdf(){
+			SetPdf(e){
 				this.dialogVisible4 = true
-				this.serPdf = 'https://bzdcoldverifyoss.baozhida.cn/UpImage/166798048063268c71-e558-406d-81d4-5d30d2c3d974.pdf'
-				console.log('234')
+				this.serPdf = e
 			}
 		}
 		

+ 155 - 78
src/views/ManagingUsers/index.vue

@@ -3,33 +3,32 @@
 		<div class="ManagingUsers1">
 			<!-- <el-button type="primary" icon="el-icon-search">搜索</el-button> -->
 			<div class="ManagingUsers1-L">
-				<el-button type="primary" icon="el-icon-plus" @click="dialog=true">新增用户</el-button>
+				<el-button type="primary" icon="el-icon-plus" @click="AddUser('news')">新增用户</el-button>
 			</div>
 			<div class="ManagingUsers1-R">
 				<div class="ManagingUsers1-Rtx">
 					搜索:
 				</div>
-				<el-input v-model="page.name" placeholder="请输入内容" @keyup.enter.native="search" clearable></el-input>
+				<el-input v-model="pages.T_name" placeholder="请输入内容" @keyup.enter.native="search" clearable></el-input>
 			</div>
 		</div>
 		<div class="ManagingUsers2">
 			<el-table :data="tableData" border size="small">
 				<el-table-column label="名称" width="180">
 					<template slot-scope="scope">
-						<span>{{ scope.row.date }}</span>
+						<span>{{ scope.row.T_name}}</span>
 					</template>
 				</el-table-column>
 				<el-table-column label="权限" width="180">
 					<template slot-scope="scope">
-						{{ scope.row.name }}
+						{{ scope.row.T_power_name}}
 					</template>
 				</el-table-column>
 				<el-table-column label="操作">
 					<template slot-scope="scope">
 						<div style="display: flex;">
 							<el-button size="mini" @click="handleEdit(scope.row)">编辑</el-button>
-							<el-button slot="reference" size="mini" type="danger"
-								@click="handleDelete(scope.row)">删除
+							<el-button slot="reference" size="mini" type="danger" @click="handleDelete(scope.row)">删除
 							</el-button>
 						</div>
 					</template>
@@ -37,31 +36,29 @@
 			</el-table>
 		</div>
 		<div class="ManagingUsers3">
-			<el-pagination @current-change="handleCurrentChange"
-				:current-page="page.pagez" :page-size="page.page_size" layout="total, prev, pager, next, jumper"
-				:total="total">
+			<el-pagination @current-change="handleCurrentChange" :current-page="pages.page" :page-size="pages.page_z"
+				layout="total, prev, pager, next, jumper" :total="total">
 			</el-pagination>
 		</div>
-		<el-drawer :title="title" :visible.sync="dialog" direction="rtl" :wrapperClosable="false" ref="drawer">
+		<el-drawer :title="title" :visible.sync="dialog" direction="rtl" ref="drawer">
 			<div class="demo-drawers">
-				<el-form :model="form">
-					<el-form-item label="名称" :label-width="LabelWidth">
-						<el-input v-model="form.name" autocomplete="off"></el-input>
+				<el-form :model="form" :rules="rules" ref="ruleForm">
+					<el-form-item label="名称" :label-width="LabelWidth" prop="T_name">
+						<el-input v-model="form.T_name" autocomplete="off"></el-input>
 					</el-form-item>
-					<el-form-item label="权限" :label-width="LabelWidth">
-						<el-select v-model="form.region" placeholder="请选择活动区域">
-							<el-option label="区域一" value="shanghai"></el-option>
-							<el-option label="区域二" value="beijing"></el-option>
+					<el-form-item label="权限" :label-width="LabelWidth" prop="T_power">
+						<el-select v-model="form.T_power" placeholder="请选择活动区域">
+							<el-option :label="item.T_name" :value="item.Id" v-for="(item,index) in openers" :key="index"></el-option>
 						</el-select>
 					</el-form-item>
-					<el-form-item label="用户" :label-width="LabelWidth">
-						<el-input v-model="form.name" autocomplete="off"></el-input>
+					<el-form-item label="用户" :label-width="LabelWidth" prop="T_user">
+						<el-input v-model="form.T_user" autocomplete="off"></el-input>
 					</el-form-item>
-					<el-form-item label="密码" :label-width="LabelWidth">
-						<el-input v-model="form.paw" autocomplete="off"></el-input>
+					<el-form-item label="密码" :label-width="LabelWidth" prop="T_pass">
+						<el-input v-model="form.T_pass" autocomplete="off" show-password></el-input>
 					</el-form-item>
 					<el-form-item :label-width="LabelWidth">
-						<el-button type="primary" @click="$refs.drawer.closeDrawer()">
+						<el-button type="primary"  @click="submitForm('ruleForm')">
 							确 定
 						</el-button>
 						<el-button @click="dialog=false">取 消</el-button>
@@ -73,88 +70,168 @@
 </template>
 
 <script>
+	import {
+		AdminList,
+		AdminAdd,
+		UserPowerAll,AdminUp,AdminDel
+	} from '@/api/ManagingUsers'
 	export default {
 		name: 'ManagingUsers',
 		data() {
 			return {
 				title: '新增',
-				LabelWidth: "40px",
+				LabelWidth: "50px",
 				loading: false,
 				dialog: false,
 				total: 30,
-				page: {
-					pagez: 1,
-					page_size: 10,
-					name: ''
+				pages: {
+					T_name:'',
+					page: 1,
+					page_z: 10,
 				},
-				tableData: [{
-					date: '张三1',
-					name: '数据采集工程师',
-				}, {
-					date: '张三2',
-					name: '冷链负责人',
-				}, {
-					date: '张三3',
-					name: '冷链负责人',
-				}, {
-					date: '张三4',
-					name: '冷链负责人',
-				}, {
-					date: '张三2',
-					name: '冷链负责人',
-				}, {
-					date: '张三3',
-					name: '冷链负责人',
-				}, {
-					date: '张三4',
-					name: '冷链负责人',
-				}, {
-					date: '张三2',
-					name: '冷链负责人',
-				}, {
-					date: '张三3',
-					name: '冷链负责人',
-				}, {
-					date: '张三4',
-					name: '冷链负责人',
-				}],
+				tableData: [],
 				form: {
-					name: '',
-					region: '',
-					paw: '',
+					T_name: '',
+					T_power: '',
+					T_user: '',
+					T_pass: '',
 				},
+				rules: {
+					T_name: [{
+							required: true,
+							message: '请输入名称',
+							trigger: 'blur'
+						},
+					],
+					T_power: [{
+						required: true,
+						message: '请选择权限',
+						trigger: 'blur'
+					}],
+					T_user: [{
+						required: true,
+						message: '请输入用户名',
+						trigger: 'blur'
+					}],
+					T_pass: [{
+						required: true,
+						message: '请输入密码',
+						trigger: 'blur'
+					}],
+				},
+				bl:0,//提交按钮,1是新增提交,2是编辑提交
+				openers: []
 			}
 		},
+		mounted() {
+			this.GetAdminApi()
+		},
 		methods: {
-			search() { //回车搜索
-				console.log('搜索', this.page.name);
+			submitForm(formName) {
+				this.$refs[formName].validate((valid) => {
+			 	if (valid) {
+						var obj = {...this.form}
+						obj.T_pass = this.$md5(obj.T_pass)
+						if(this.bl==1){//新增提交
+							this.GetAdminAddApi(obj)
+						}else{//编辑提交
+							this.GetAdminUpApi(obj)
+						}
+					} else {
+						return false;
+					}
+				});
 			},
-			handleCurrentChange(val) {
-				this.page.pagez = val
-				console.log('当前页', this.page);
+			AddUser(e) {
+				if(this.$refs.ruleForm!=undefined){
+					this.$refs.ruleForm.clearValidate()
+				}
+				this.form = this.$options.data().form
+				this.GetUserPowerAllApi()
+				this.bl = 1
+				this.dialog = true
 			},
 			handleEdit(e) {
-				console.log('编辑', e);
+				console.log(e)
+				if(this.$refs.ruleForm!=undefined){
+					this.$refs.ruleForm.clearValidate()
+				}
+				this.form = this.$options.data().form
+				this.GetUserPowerAllApi()
+				this.bl = 2
 				this.dialog = true
 				this.title = '编辑'
+				
+				
+				this.form.T_name = e.T_name
+				this.form.T_power = e.T_power
+				this.form.T_user = e.T_user
+				this.form.T_pass = '*********'
+				this.form.T_uuid = e.T_uuid
+			},
+			GetUserPowerAllApi() { //权限select
+				UserPowerAll({}).then(res => {
+					console.log(res)
+					if (res.data.Code === 200) {
+						this.openers = res.data.Data.List
+					}
+				})
+			},
+			GetAdminAddApi(e) {
+				AdminAdd(e).then(res => {
+					console.log(res)
+					if(res.data.Code===200){
+						this.$message.success('添加成功')
+						this.dialog = false
+						this.pages.page = 1
+						this.GetAdminApi()
+					}
+				})
+			},
+			GetAdminUpApi(e) {
+				AdminUp(e).then(res => {
+					console.log(res)
+					if(res.data.Code===200){
+						this.$message.success('编辑成功')
+						this.dialog = false
+						this.pages.page = 1
+						this.GetAdminApi()
+					}
+				})
+			},
+			GetAdminApi() {
+				AdminList(this.pages).then(res => {
+					if (res.data.Code === 200) {
+						this.tableData = res.data.Data.List
+						this.total = res.data.Data.Num
+					}
+				})
+			},
+			search() { //回车搜索
+				this.pages.page = 1
+				this.GetAdminApi()
+			},
+			handleCurrentChange(val) {
+				this.pages.page = val
+				this.GetAdminApi()
+				console.log('当前页', this.page);
 			},
 			handleDelete(e) {
-				console.log('删除', e);
-				this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
-					confirmButtonText: '确定',
+				this.$confirm('此操作将删除该用户, 是否继续?', '提示', {
+					confirmButtonText: '立即删除',
 					cancelButtonText: '取消',
 					type: 'warning',
 					center: true
 				}).then(() => {
-					this.$message({
-						type: 'success',
-						message: '删除成功!'
-					});
+					AdminDel({T_uuid:e.T_uuid}).then(res=>{
+						if(res.data.Code===200){
+							this.$message.success('删除成功')
+							this.pages.page = 1
+							this.GetAdminApi()
+						}
+					})
 				}).catch(() => {
-					this.$message({
-						type: 'info',
-				  message: '已取消删除'
-					});
+					this.$message.info('取消删除');
 				});
 			}
 		}

+ 12 - 1
src/views/ReportViewing/index.vue

@@ -66,7 +66,10 @@
 <script>
 	import pdf from "./pdf.vue"
 	import Axios from 'axios'
-	import fileDownload from 'js-file-download'
+	import fileDownload from 'js-file-download' 
+	import {
+		TaskGet
+	} from '@/api/ReportViewing'
 	export default {
 		name: 'ReportViewing',
 		components: {
@@ -103,7 +106,15 @@
 				}],
 			}
 		},
+		mounted() {
+			this.GetTaskGetApi()
+		},
 		methods: {
+			GetTaskGetApi(){
+				TaskGet({}).then(res=>{
+					console.log(res)
+				})
+			},
 			commands(e) {
 				switch (e) {
 					case 'a':

+ 121 - 0
src/views/ValidationTemplate/files.vue

@@ -0,0 +1,121 @@
+<template>
+	<div class="files">
+		<div class="files-mai">
+			<div class="files-mai1">
+				<img src="@/assets/img/flies.png" alt="" srcset="">
+				<div>点击虚线框内,<span style="color: #409EFF;">上传文件</span></div>
+			</div>
+			<input type="file" accept="application/pdf" @change="files"
+				style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;opacity:0;cursor: pointer;">
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		PDFToken
+	} from "@/api/pdfToken.js";
+	import * as qiniu from 'qiniu-js';
+	export default {
+		data() {
+			return {
+				file: null, //点击上传的pdf资源包
+				qiniuToken: null,
+			}
+		},
+		methods: {
+			files(e) { //上传图片到七牛云拿url
+				console.log(e)
+				var _this = this
+				this.file = e.target.files[0];
+				var strtype = this.file.name.substring(this.file.name.lastIndexOf('.') + 1); //获取后缀 png jpg
+				PDFToken({
+					T_suffix: strtype
+				}).then(res => {
+					if (res.data.Code == 200) {
+						_this.qiniuToken = res.data.Data
+						_this.QiniuYun()
+					} else {
+						_this.$message.error(res.data.Msg);
+					}
+				})
+			},
+			QiniuYun() {
+				var _this = this
+				var key = _this.file.name || null;
+				var config = {
+					useCdnDomain: false, //表示是否使用 cdn 加速域名,为布尔值,true 表示使用,默认为 false。
+					region: qiniu.region.z2,
+					domain: "https://qiniu.region.z2", //配置好的七牛云域名  如   https://cdn.qniyun.com/
+					chunkSize: 1000, //每个分片的大小,单位mb,默认值3
+					forceDirect: false //直传还是断点续传方式,true为直传
+				};
+				var putExtra = {
+					fname: _this.file.name, //文件原始文件名
+					params: {},
+					mimeType: [] || null
+				};
+				var observable = qiniu.upload(_this.file, key, _this.qiniuToken, putExtra, config);
+				//   设置实例的监听对象
+				var observer = {
+					next(res) {
+						//上传进度
+						_this.filePercent = parseInt(res.total.percent)
+						if (_this.filePercent === 100) {
+							console.log('实例监听对象', res)
+						}
+						//
+					},
+					// 接收上传错误信息
+					error(err) {
+						switch (err.code) {
+							case 413:
+								_this.$message.error('错了哦,图片可能太大了哦');
+								break
+							case 408:
+								_this.$message.error('错了哦,请求超时');
+								break
+							default:
+								_this.$message.error('错了哦,上传错误');
+						}
+					},
+					// 接收上传完成后的信息
+					complete(com) {
+						console.log('七牛云返回',com)
+						_this.$emit('pdfvalue', com.key);
+					}
+				};
+				observable.subscribe(observer);
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.files-mai {
+		border: 1px dashed #d9d9d9;
+		border-radius: 6px;
+		position: relative;
+		height: 150px;
+
+		.files-mai1 {
+			height: 100%;
+			color: #606266;
+			font-size: 14px;
+			text-align: center;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+
+			img {
+				width: 60px;
+				height: 60px;
+			}
+		}
+	}
+
+	.files-mai:hover {
+		border: 1px dashed #409EFF;
+	}
+</style>

+ 313 - 127
src/views/ValidationTemplate/index.vue

@@ -2,25 +2,26 @@
 	<div class="ValidationTemplate">
 		<div class="ValidationTemplate1">
 			<div class="ValidationTemplate1-L">
-				<el-button type="primary" icon="el-icon-plus" @click="dialog1=true">新增模板</el-button>
+				<el-button type="primary" icon="el-icon-plus" @click="Newtemp">新增模板</el-button>
 			</div>
 			<div class="ValidationTemplate1-R">
 				<div class="ValidationTemplate1-Rtx">
 					搜索:
 				</div>
-				<el-input v-model="page.name" placeholder="请输入模板名称" @keyup.enter.native="search" clearable></el-input>
+				<el-input v-model="pages.T_name" placeholder="请输入模板名称" @keyup.enter.native="search" clearable>
+				</el-input>
 			</div>
 		</div>
 		<div class="ValidationTemplate2">
 			<el-table :data="tableData" border size="small">
 				<el-table-column label="模板名称" width="180">
 					<template slot-scope="scope">
-						<span>{{ scope.row.date }}</span>
+						<span>{{ scope.row.T_name }}</span>
 					</template>
 				</el-table-column>
 				<el-table-column label="模板排序" width="180">
 					<template slot-scope="scope">
-						{{ scope.row.name }}
+						{{ scope.row.T_sort }}
 					</template>
 				</el-table-column>
 				<el-table-column label="操作">
@@ -37,73 +38,58 @@
 			</el-table>
 		</div>
 		<div class="ValidationTemplate3">
-			<el-pagination @current-change="handleCurrentChange" :current-page="page.pagez" :page-size="page.page_size"
+			<el-pagination @current-change="handleCurrentChange" :current-page="pages.page" :page-size="pages.page_z"
 				layout="total, prev, pager, next, jumper" :total="total">
 			</el-pagination>
 		</div>
-		<el-drawer title="新增模板" :visible.sync="dialog1" direction="rtl" :wrapperClosable="false" ref="drawer">
+		<el-drawer :title="tit" :visible.sync="dialog1" direction="rtl" ref="drawer">
 			<div class="demo-drawers">
-				<el-form :model="form">
-					<el-form-item label="模板名称" :label-width="LabelWidth">
-						<el-input v-model="form.name" autocomplete="off"></el-input>
+				<el-form :model="form" :rules="rules" ref="ruleForm">
+					<el-form-item label="模板名称" :label-width="LabelWidth" prop="T_name">
+						<el-input v-model="form.T_name" autocomplete="off"></el-input>
 					</el-form-item>
-					<el-form-item :label-width="LabelWidth">
-						<el-button type="primary" @click="$refs.drawer.closeDrawer()">
-							确 定
-						</el-button>
-						<el-button @click="dialog1=false">取 消</el-button>
-					</el-form-item>
-				</el-form>
-			</div>
-		</el-drawer>
-		<el-drawer title="编辑模板" :visible.sync="dialog2" direction="rtl" :wrapperClosable="false" ref="drawer">
-			<div class="demo-drawers">
-				<el-form :model="form">
-					<el-form-item label="模板名称" :label-width="LabelWidth">
-						<el-input v-model="form.name" autocomplete="off"></el-input>
-					</el-form-item>
-					<el-form-item label="模板序号" :label-width="LabelWidth">
-						<el-input v-model="form.name" autocomplete="off"></el-input>
+					<el-form-item label="模板序号" :label-width="LabelWidth" prop="T_sort">
+						<el-input v-model="form.T_sort" autocomplete="off"></el-input>
 					</el-form-item>
 					<el-form-item :label-width="LabelWidth">
-						<el-button type="primary" @click="$refs.drawer.closeDrawer()">
+						<el-button type="primary" @click="submitForm('ruleForm')">
 							确 定
 						</el-button>
-						<el-button @click="dialog2=false">取 消</el-button>
+						<el-button @click="dialog1=false">取 消</el-button>
 					</el-form-item>
 				</el-form>
 			</div>
 		</el-drawer>
-		<el-drawer title="标签列表" :visible.sync="Drawer" direction="rtl" :wrapperClosable="false" ref="drawer" size="90%">
+		<el-drawer title="标签列表" :visible.sync="Drawer" direction="rtl" ref="drawer" size="90%">
 			<div class="demo-drawers">
 				<el-button type="primary" icon="el-icon-plus" @click="NewinnerDrawer">添加标签</el-button>
 				<div style="margin-top: 10px;">
-					<el-table :data="tableData" border size="small">
-						<el-table-column label="标签名称" width="180">
+					<el-table :data="tableData1" border size="mini">
+						<el-table-column label="标签名称" width="300" :show-overflow-tooltip="true">
 							<template slot-scope="scope">
-								<span>{{ scope.row.date }}</span>
+								<span>{{ scope.row.T_name }}</span>
 							</template>
 						</el-table-column>
-						<el-table-column label="数据类型" width="180">
+						<el-table-column label="数据类型" width="80" :show-overflow-tooltip="true">
 							<template slot-scope="scope">
-								<span>{{ scope.row.date }}</span>
+								<span>{{ scope.row.T_source }}</span>
 							</template>
 						</el-table-column>
-						<el-table-column label="标签" width="180">
+						<el-table-column label="标签" width="150" :show-overflow-tooltip="true">
 							<template slot-scope="scope">
-								<span>{{ scope.row.date }}</span>
+								<span>{{ scope.row.T_field }}</span>
 							</template>
 						</el-table-column>
-						<el-table-column label="排序" width="180">
+						<el-table-column label="排序" width="80" :show-overflow-tooltip="true">
 							<template slot-scope="scope">
-								<span>{{ scope.row.date }}</span>
+								<span>{{ scope.row.T_sort }}</span>
 							</template>
 						</el-table-column>
 						<el-table-column label="操作">
 							<template slot-scope="scope">
-								<el-dropdown @command="commands">
+								<el-dropdown @command="commands($event,scope.row)">
 									<div class="el-dropdown-link dropdown-links" style="">
-										<el-button type="primary" plain size="small">更多操作</el-button>
+										<el-button type="primary" plain size="mini">更多操作</el-button>
 									</div>
 									<el-dropdown-menu slot="dropdown">
 										<el-dropdown-item command="a">编辑</el-dropdown-item>
@@ -116,8 +102,8 @@
 					</el-table>
 				</div>
 				<div style="margin-top: 10px;">
-					<el-pagination @current-change="handleCurrentChange111" :current-page="page1.pagez"
-						:page-size="page1.page_size" layout="total, prev, pager, next, jumper" :total="total">
+					<el-pagination @current-change="handleCurrentChange111" :current-page="pages2.page"
+						:page-size="pages2.page_z" layout="total, prev, pager, next, jumper" :total="total1">
 					</el-pagination>
 				</div>
 				<el-drawer title="时间流程" :append-to-body="true" :visible.sync="innerDrawer1" size="70%">
@@ -204,41 +190,48 @@
 				<el-drawer :title="titles" :append-to-body="true" :visible.sync="innerDrawer2">
 					<!-- 时间流程按钮后的编辑 -->
 					<div style="padding: 20px;">
-						<el-form :model="form">
-							<el-form-item label="数据类型" label-width="70px">
-								<el-select v-model="form.region" placeholder="请选择活动区域">
-									<el-option label="区域一" value="shanghai"></el-option>
-									<el-option label="区域二" value="beijing"></el-option>
+						<el-form :model="form1" :rules="rules1" ref="ruleForm1">
+							<el-form-item label="数据类型" label-width="80px" prop="T_label">
+								<el-select v-model="form1.T_label" placeholder="请选择数据类型">
+									<el-option label="文本" value="1"></el-option>
+									<el-option label="数值" value="2"></el-option>
+									<el-option label="设备多选" value="3"></el-option>
+									<el-option label="设备单选" value="4"></el-option>
+									<el-option label="当期时间(2022年01月19日)" value="7"></el-option>
+									<el-option label="当期时间(开始与结束时间)" value="9"></el-option>
+									<el-option label="图片" value="10"></el-option>
+									<el-option label="CAD" value="11"></el-option>
 								</el-select>
 							</el-form-item>
-							<el-form-item label="来源" label-width="70px">
-								<el-select v-model="form.region" placeholder="请选择活动区域">
-									<el-option label="区域一" value="shanghai"></el-option>
-									<el-option label="区域二" value="beijing"></el-option>
+							<el-form-item label="来源" label-width="80px" prop="T_source">
+								<el-select v-model="form1.T_source" placeholder="请选择来源">
+									<el-option label="所有" value="0"></el-option>
+									<el-option label="方案" value="1"></el-option>
+									<el-option label="报告" value="2"></el-option>
 								</el-select>
 							</el-form-item>
-							<el-form-item label="标签名称" label-width="70px">
-								<el-input v-model="form.name" autocomplete="off"></el-input>
+							<el-form-item label="标签名称" label-width="80px" prop="T_name">
+								<el-input v-model="form1.T_name" autocomplete="off"></el-input>
 							</el-form-item>
-							<el-form-item label="标签" label-width="70px">
-								<el-input v-model="form.name" autocomplete="off"></el-input>
+							<el-form-item label="标签" label-width="80px" prop="T_field">
+								<el-input v-model="form1.T_field" autocomplete="off"></el-input>
 							</el-form-item>
-							<el-form-item label="排序" label-width="70px">
-								<el-input v-model="form.name" autocomplete="off"></el-input>
+							<el-form-item label="排序" label-width="80px" prop="T_sort">
+								<el-input v-model="form1.T_sort" autocomplete="off"></el-input>
 							</el-form-item>
-							<el-form-item label="描述" label-width="70px">
-								<el-input type="textarea" v-model="form.name"></el-input>
-							</el-form-item>
-							<el-form-item label="上传" label-width="70px">
-								<el-upload class="upload-demo" drag action="https://jsonplaceholder.typicode.com/posts/"
-									multiple>
-									<i class="el-icon-upload"></i>
-									<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-									<div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div>
-								</el-upload>
+							<el-form-item label="上传" label-width="80px" prop="T_text">
+								<flies @pdfvalue="fliValue"></flies>
+								<div style="margin-top: 5px;">
+									<div v-if="form1.T_text!=''" style="height: 20px;color: #409EFF;display: flex;align-items: center;">
+										<i class="el-icon-circle-check"></i><span style="font-size: 12px;padding-left: 1px;">已经上传文件,点击虚线框内可更换</span>
+									</div>
+									<div v-else style="height: 20px;color: #C0C4CC;display: flex;align-items: center;">
+										<i class="el-icon-circle-close"></i><span style="font-size: 12px;padding-left: 1px;">还未上传文件,点击虚线框内可上传</span>
+									</div>
+								</div>
 							</el-form-item>
-							<el-form-item label-width="70px">
-								<el-button type="primary" @click="innerDrawer2=false">
+							<el-form-item label-width="80px">
+								<el-button type="primary"  @click="submitForm1('ruleForm1')">
 									确 定
 								</el-button>
 								<el-button @click="innerDrawer2=false">取 消</el-button>
@@ -252,54 +245,229 @@
 </template>
 
 <script>
+	import {
+		TempGet,
+		TempAdd,
+		TempUp,TempDel,Map_List,Map_Add,Map_Up,Map_Del
+	} from '@/api/ReportViewing'
+	import flies from "@/components/files.vue"
 	export default {
 		name: 'ValidationTemplate',
+		components: {
+			flies
+		},
 		data() {
 			return {
-				LabelWidth: "70px",
-				form: {
-					name: '',
-					region: '',
-					paw: '',
+				LabelWidth: "80px",
+				form: { //新增编辑的提交参数
+					T_name: '',
+					T_sort: null
+				},
+				rules: {
+					T_name: [{
+						required: true,
+						message: '请输入模板名称',
+						trigger: 'blur'
+					}, ],
+					T_sort: [{
+						required: true,
+						message: '请输入模板序号',
+						trigger: 'blur'
+					}],
+				},
+				form1: { //新增编辑的提交参数
+					T_source: '',//来源 0-所有 1-方案 2-报告
+					T_label: '',//数据类型
+					T_name: '',//标签名称
+					T_field: '',//标签
+					T_text: '',//描述图片路径
+					T_sort: '',//排序
+				},
+				rules1: {
+					T_source: [{
+						required: true,
+						message: '请选择来源',
+						trigger: 'blur'
+					}, ],
+					T_label: [{
+						required: true,
+						message: '请选择数据类型',
+						trigger: 'blur'
+					}],
+					T_name: [{
+						required: true,
+						message: '请输入标签名称',
+						trigger: 'blur'
+					}, ],
+					T_field: [{
+						required: true,
+						message: '请输入标签',
+						trigger: 'blur'
+					}],
+					T_text: [{
+						required: true,
+						message: '请上传资源文件',
+						trigger: 'blur'
+					}, ],
+					T_sort: [{
+						required: true,
+						message: '请输入排序',
+						trigger: 'blur'
+					}],
 				},
+				
+				TempNum:0,//验证是点击新增还是点击的编辑
 				titles: '',
 				titles1: '',
 				Drawer: false, //标签
-				dialog1: false, //新增
-				dialog2: false, //编辑
+				dialog1: false, //新增/编辑
+				tit: '新增模板',
 				innerDrawer1: false, //时间流程
 				innerDrawer2: false, //时间流程界面的编辑新增
 				innerDrawer3: false, //时间流程新增
-				total: 30,
-				page: {
-					pagez: 1,
-					page_size: 10,
-					name: ''
+
+				total: 0,
+				total1: 0,
+				pages: {
+					page: 1,
+					page_z: 10,
+					T_name: ''
+				},
+				pages2: {
+					page: 1,
+					page_z: 10,
+					T_VerifyTemplate_id: ''
 				},
+				
+				
+				
 				page1: {
 					pagez: 1,
 					page_size: 10,
 					name: ''
 				},
-				tableData: [{
-					date: '冷库',
-					name: '1',
-				}, {
-					date: '车载',
-					name: '2',
-				}, {
-					date: 'A箱',
-					name: '3',
-				}, {
-					date: 'A箱',
-					name: '4',
-				}, {
-					date: 'B箱',
-					name: '5',
-				}],
+				tableData: [],
+				tableData1: [],
 			}
 		},
+		mounted() {
+			this.GetTempGetApi()
+		},
 		methods: {
+			submitForm1(formName) {
+				this.$refs[formName].validate((valid) => {
+			 	if (valid) {
+						if(this.TempNum==1){//1是新增
+							console.log('新增',this.form1)
+							Map_Add(this.form1).then(res=>{
+								if(res.data.Code===200){
+									this.$message.success('新增成功')
+									this.innerDrawer2 = false
+									this.pages2.page = 1
+									this.GetMaplistApi()
+								}
+							})
+						}else{//2是编辑
+							Map_Up(this.form1).then(res=>{
+								if(res.data.Code===200){
+									this.$message.success('编辑成功')
+									this.innerDrawer2 = false
+									this.pages2.page = 1
+									this.GetMaplistApi()
+								}
+							})
+							console.log('编辑',this.form1)	
+						}
+					} else {
+						return false;
+					}
+				});
+			},
+			fliValue(e){//上传
+				console.log('上传',e)
+				this.form1.T_text = e
+			},
+			handleCurrentChange111(val) {
+				this.pages2.page = val
+				this.GetMaplistApi()
+			},
+			handlelabel(val) {
+				this.Drawer = true
+				this.pages2.T_VerifyTemplate_id = val.T_VerifyTemplate_id
+				this.GetMaplistApi()
+			},
+			GetMaplistApi(){
+				Map_List(this.pages2).then(res=>{
+					console.log('列那边',res)
+					if(res.data.Code==200){
+						this.tableData1 = res.data.Data.List
+						this.total1 = res.data.Data.Num
+					}
+				})
+			},
+			
+			GetTempGetApi() {
+				TempGet(this.pages).then(res => {
+					console.log('列表', res)
+					if (res.data.Code === 200) {
+						this.tableData = res.data.Data.List
+						this.total = res.data.Data.Num
+					}
+				})
+			},
+			Newtemp() { //新增模板
+				if(this.$refs.ruleForm!=undefined){
+					this.$refs.ruleForm.clearValidate()
+				}
+				this.tit = '新增模板'
+				this.dialog1 = true
+				this.TempNum=1
+				
+				this.form.T_name = ""
+				this.form.T_sort = ""
+			},
+			handleEdit(val) { //编辑模板
+				if(this.$refs.ruleForm!=undefined){
+					this.$refs.ruleForm.clearValidate()
+				}
+				this.form.T_name = val.T_name
+				this.form.T_sort = val.T_sort
+				this.form.T_VerifyTemplate_id = val.T_VerifyTemplate_id
+				
+				this.tit = '编辑模板'
+				this.dialog1 = true
+				this.TempNum=2
+				console.log('编辑sss', val)
+			},
+			submitForm(formName) {
+				this.$refs[formName].validate((valid) => {
+					if (valid) {
+						if(this.TempNum==1){//1是新增
+							TempAdd(this.form).then(res=>{
+								if(res.data.Code==200){
+									this.dialog1 = false
+									this.pages.page = 1
+									this.GetTempGetApi()
+								}
+							})
+						}else{//2是编辑
+							TempUp(this.form).then(res=>{
+								if(res.data.Code==200){
+									this.dialog1 = false
+									this.pages.page = 1
+									this.GetTempGetApi()
+								}
+							})
+						}
+					} else {
+						return false;
+					}
+				});
+			},
+			search() { //回车搜索
+				this.pages.page = 1
+				this.GetTempGetApi()
+			},
 			TimeEdit(e) {
 				console.log(e)
 				this.innerDrawer3 = true
@@ -329,30 +497,57 @@
 				});
 			},
 			NewinnerDrawer() {
+				if(this.$refs.ruleForm1!=undefined){
+					this.$refs.ruleForm1.clearValidate()
+				}
+				this.form1.T_source = ""
+				this.form1.T_label = ""
+				this.form1.T_name = ""
+				this.form1.T_field = ""
+				this.form1.T_text = ""
+				this.form1.T_sort = ""
+				
+				this.form1.T_VerifyTemplate_id = this.pages2.T_VerifyTemplate_id
 				this.titles = '添加'
+				this.TempNum = 1
 				this.innerDrawer2 = true
 			},
-			commands(e) {
-				console.log(e)
+			commands(e,obj) {
+				console.log('嘻嘻嘻',e,obj)
+				var that = this
 				switch (e) {
 					case 'a':
-						this.titles = '编辑'
-						this.innerDrawer2 = true
+						that.titles = '编辑'
+						that.innerDrawer2 = true
+						that.TempNum = 2
+						if(that.$refs.ruleForm1!=undefined){
+							that.$refs.ruleForm1.clearValidate()
+						}
+						that.form1.T_source = JSON.stringify(obj.T_source)
+						that.form1.T_label = JSON.stringify(obj.T_label)
+						that.form1.T_name = obj.T_name
+						that.form1.T_field = obj.T_field
+						that.form1.T_text = obj.T_text
+						that.form1.T_sort = obj.T_sort
+						that.form1.T_id =  obj.T_id
 						break
 					case 'b':
 						this.innerDrawer1 = true
 						break
 					default:
-						this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
-							confirmButtonText: '确定',
+						this.$confirm('此操作将永久删除该模板, 是否继续?', '提示', {
+							confirmButtonText: '立即删除',
 							cancelButtonText: '取消',
 							type: 'warning',
 							center: true
 						}).then(() => {
-							this.$message({
-								type: 'success',
-								message: '删除成功!'
-							});
+							Map_Del({T_id: obj.T_id}).then(res=>{
+								if(res.data.Code==200){
+									this.$message.success('删除成功!')
+									this.pages2.page = 1
+									this.GetMaplistApi()
+								}
+							})
 						}).catch(() => {
 							this.$message({
 								type: 'info',
@@ -361,30 +556,21 @@
 						});
 				}
 			},
-			handleCurrentChange111(val) {
-				this.page1.pagez = val
-				console.log('当前页', this.page);
-			},
-			handlelabel(val) {
-				console.log('标签', val);
-				this.Drawer = true
-			},
-			handleEdit(val) {
-				this.dialog2 = true
-				console.log('编辑', val);
-			},
+			
 			handleDelete(val) {
-				console.log('删除', val);
-				this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+				this.$confirm('此操作将永久删除该模板, 是否继续?', '提示', {
 					confirmButtonText: '确定',
 					cancelButtonText: '取消',
 					type: 'warning',
 					center: true
 				}).then(() => {
-					this.$message({
-						type: 'success',
-						message: '删除成功!'
-					});
+					TempDel({T_VerifyTemplate_id:val.T_VerifyTemplate_id}).then(res=>{
+						if(res.data.Code==200){
+							this.$message.success('删除成功!')
+							this.pages.page = 1
+							this.GetTempGetApi()
+						}
+					})
 				}).catch(() => {
 					this.$message({
 						type: 'info',
@@ -393,8 +579,8 @@
 				});
 			},
 			handleCurrentChange(val) {
-				this.page.pagez = val
-				console.log('当前页', this.page);
+				this.pages.page = val
+				this.GetTempGetApi()
 			},
 		}
 	}

+ 48 - 0
src/views/ValidationTemplate/pdf.vue

@@ -0,0 +1,48 @@
+<template>
+	<div>
+		<el-dialog :visible.sync="dialogVisible4" width="80%" height="100%">
+			<iframe :src="serPdf" frameborder="0" style="width: 100%; height: 80vh"></iframe>
+		</el-dialog>
+		<!-- 
+		<div style="display: grid;grid-template-columns: 1fr 1fr 1fr; grid-gap: 10px;">
+			
+			<pdf v-for="item in 3" :key="item" :page="item"  ref="pdf" src="">
+			</pdf>
+		</div> -->
+		
+	</div>
+</template>
+
+<script>
+	import pdf from "vue-pdf";
+	export default {
+		name:'CompanyAccount',
+		components: { //组件
+			pdf
+		},
+		data() {
+			return{
+				dialogVisible4:false,
+				serPdf:''
+			}
+		},
+		methods:{
+			SetPdf(e){
+				this.dialogVisible4 = true
+				this.serPdf = e
+			}
+		}
+		
+	}
+</script>
+
+<style lang="scss" scoped>
+	.el-dialog__wrapper{
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		/deep/.el-dialog {
+			margin: 0 !important;
+		}
+	}
+</style>

+ 183 - 68
src/views/calibrationCertificate/index.vue

@@ -8,30 +8,30 @@
 				<div class="calibrationCertificate1-Rtx">
 					搜索:
 				</div>
-				<el-input v-model="page.name" placeholder="请输入证书编号" @keyup.enter.native="search" clearable></el-input>
+				<el-input v-model="pages.T_sn" placeholder="请输入证书编号" @keyup.enter.native="search" clearable></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.date }}</span>
+						<span>{{ scope.row.T_sn }}</span>
 					</template>
 				</el-table-column>
 				<el-table-column label="发布时间" width="180">
 					<template slot-scope="scope">
-						{{ scope.row.name }}
+						{{ scope.row.T_release_time}}
 					</template>
 				</el-table-column>
 				<el-table-column label="失效时间" width="180">
 					<template slot-scope="scope">
-						{{ scope.row.name }}
+						{{ scope.row.T_failure_time}}
 					</template>
 				</el-table-column>
 				<el-table-column label="操作">
 					<template slot-scope="scope">
 						<div style="display: flex;">
-							<el-button size="mini" @click="handlePdf(scope.row)">查看PDF</el-button>
+							<el-button size="mini" :disabled="scope.row.T_pdf==''?true:false" @click="handlePdf(scope.row)">查看PDF</el-button> <!--  -->
 							<el-button slot="reference" size="mini" @click="handleEdit(scope.row)">管理证书
 							</el-button>
 							<el-button slot="reference" size="mini" type="danger" @click="handleDelete(scope.row)">删除
@@ -42,19 +42,19 @@
 			</el-table>
 		</div>
 		<div class="calibrationCertificate3">
-			<el-pagination @current-change="handleCurrentChange" :current-page="page.pagez" :page-size="page.page_size"
+			<el-pagination @current-change="handleCurrentChange" :current-page="pages.page" :page-size="pages.page_z"
 				layout="total, prev, pager, next, jumper" :total="total">
 			</el-pagination>
 		</div>
 		<el-drawer title="新增证书" :append-to-body="true" :visible.sync="innerDrawer2">
 			<!-- 时间流程按钮后的编辑 -->
 			<div style="padding: 20px;">
-				<el-form :model="form">
-					<el-form-item label="证书编号" label-width="70px">
-						<el-input v-model="form.name" autocomplete="off"></el-input>
+				<el-form :model="form" :rules="rules" ref="ruleForm">
+					<el-form-item label="证书编号" label-width="80px" prop="T_sn">
+						<el-input v-model="form.T_sn" autocomplete="off"></el-input>
 					</el-form-item>
-					<el-form-item label-width="70px">
-						<el-button type="primary" @click="innerDrawer2=false">
+					<el-form-item label-width="80px">
+						<el-button type="primary" @click="submitForm('ruleForm')">
 							确 定
 						</el-button>
 						<el-button @click="innerDrawer2=false">取 消</el-button>
@@ -68,20 +68,20 @@
 			<div class="demo-drawers">
 				<el-button type="primary" icon="el-icon-plus" @click="TimeNew">添加证书</el-button>
 				<div style="padding-top: 20px;">
-					<el-table :data="tableData" border size="small">
+					<el-table :data="tableData1" border size="small">
 						<el-table-column label="证书编号" width="180">
 							<template slot-scope="scope">
-								<span>{{ scope.row.date }}</span>
+								<span>{{ scope.row.T_Certificate_sn}}</span>
 							</template>
 						</el-table-column>
 						<el-table-column label="发布时间" width="180">
 							<template slot-scope="scope">
-								{{ scope.row.name }}
+								{{ scope.row.T_release_time}}
 							</template>
 						</el-table-column>
 						<el-table-column label="失效时间" width="180">
 							<template slot-scope="scope">
-								{{ scope.row.name }}
+								{{ scope.row.T_failure_time}}
 							</template>
 						</el-table-column>
 						<el-table-column label="操作">
@@ -99,32 +99,35 @@
 					</el-table>
 				</div>
 				<div style="margin-top: 10px;">
-					<el-pagination @current-change="handleCurrentChange" :current-page="page.pagez"
-						:page-size="page.page_size" layout="total, prev, pager, next, jumper" :total="total">
+					<el-pagination @current-change="handleCurrentChange1" :current-page="pages2.page"
+						:page-size="pages2.page_z" layout="total, prev, pager, next, jumper" :total="total1">
 					</el-pagination>
 				</div>
 			</div>
 			<el-drawer title="添加证书" :append-to-body="true" :visible.sync="innerDrawer41">
 				<div style="padding: 20px;">
-					<el-form :model="form">
+					<el-form :model="pages3">
 						<el-form-item label="发布时间" label-width="70px">
-							<el-date-picker v-model="form.name" type="datetime" placeholder="选择日期时间">
+							<el-date-picker v-model="pages3.T_release_time" value-format="yyyy-MM-dd" type="date" placeholder="选择日期时间">
 							</el-date-picker>
 						</el-form-item>
 						<el-form-item label="失效时间" label-width="70px">
-							<el-date-picker v-model="form.name" type="datetime" placeholder="选择日期时间">
+							<el-date-picker v-model="pages3.T_failure_time" value-format="yyyy-MM-dd" type="date" placeholder="选择日期时间">
 							</el-date-picker>
 						</el-form-item>
 						<el-form-item label="上传文件" label-width="70px">
-							<el-upload class="upload-demo" drag action="https://jsonplaceholder.typicode.com/posts/"
-								multiple>
-								<i class="el-icon-upload"></i>
-								<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-								<div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div>
-							</el-upload>
+							<flies @pdfvalue="fliValue"></flies>
+							<div style="margin-top: 5px;">
+								<div v-if="pages3.T_pdf!=''" style="height: 20px;color: #409EFF;display: flex;align-items: center;">
+									<i class="el-icon-circle-check"></i><span style="font-size: 12px;padding-left: 1px;">已经上传文件,点击虚线框内可更换</span>
+								</div>
+								<div v-else style="height: 20px;color: #C0C4CC;display: flex;align-items: center;">
+									<i class="el-icon-circle-close"></i><span style="font-size: 12px;padding-left: 1px;">还未上传文件,点击虚线框内可上传</span>
+								</div>
+							</div>
 						</el-form-item>
 						<el-form-item label-width="70px">
-							<el-button type="primary" @click="innerDrawer41=false">
+							<el-button type="primary" @click="GetAddApi">
 								确 定
 							</el-button>
 							<el-button @click="innerDrawer41=false">取 消</el-button>
@@ -137,86 +140,198 @@
 </template>
 
 <script>
+	import flies from "@/components/files.vue"
 	import pdf from "./pdf.vue"
+	import {
+		CertiList,CertiAdd,CertiDel,Certi_pdf,Certi_pdfAdd,Certi_pdfUp,Certi_pdfDel
+	} from '@/api/calibrationCertificate'
 	export default {
 		name: 'calibrationCertificate',
 		components: {
-			pdf
+			pdf,flies
 		},
 		data() {
 			return {
-				total: 30,
+				rules: {
+					T_sn: [{
+						required: true,
+						message: '请输入证书编号',
+						trigger: 'blur'
+					}],
+				},
+				form: {
+					T_sn: '',
+				},
 				innerDrawer2: false,
 				innerDrawer4: false,
 				innerDrawer41: false, //添加证书
-				page: {
-					pagez: 1,
-					page_size: 10,
-					name: ''
+				pages: {
+					page: 1,
+					page_z: 10,
+					T_sn: ''
 				},
-				form: {
-					name: '',
-					region: '',
-					paw: '',
+				// pages1: {
+				// 	page: 1,
+				// 	page_z: 10,
+				// 	T_name: ''
+				// },
+				pages2: {//管理证书
+					page: 1,
+					page_z: 10,
+					T_Certificate_sn: ''
+				},
+				pages3: {//添加证书
+					T_failure_time: '',
+					T_release_time: '',
+					T_Certificate_sn: '',
+					T_pdf: ''
 				},
-				tableData: [{
-					date: '冷库',
-					name: '1',
-				}, {
-					date: '车载',
-					name: '2',
-				}, {
-					date: 'A箱',
-					name: '3',
-				}, {
-					date: 'A箱',
-					name: '4',
-				}, {
-					date: 'B箱',
-					name: '5',
-				}],
+				tableData: [],
+				total: 0,
+				tableData1: [],
+				total1:0
 			}
 		},
+		mounted() {
+			this.GetCertiListApi()
+		},
 		methods: {
-			handleEdit1() {
+			fliValue(e){
+				this.pages3.T_pdf = e
+			},
+			GetAddApi(){
+				this.pages3.T_Certificate_sn = this.pages2.T_Certificate_sn
+				if(this.pages3.T_release_time==""){
+					this.$message.error('请选择发布时间')
+				}else if(this.pages3.T_failure_time==""){
+					this.$message.error('请选择失效时间')
+				}else if(this.pages3.T_pdf==""){
+					this.$message.error('请上传证书')
+				}else{
+					console.log('提交',this.pages3)
+					if(this.CerNum==1){
+						this.SetCerti_pdfUp()
+					}else{
+						this.SetCerti_pdfAdd()
+					}
+				}
+			},
+			SetCerti_pdfUp(){//1编辑
+				Certi_pdfUp(this.pages3).then(res=>{
+					if(res.data.Code===200){
+						this.$message.success('操作成功')
+						this.innerDrawer41 = false
+						this.pages2.page = 1
+						this.GetCerti_pdfApi()
+					}
+				})
+			},
+			SetCerti_pdfAdd(){//2添加
+				Certi_pdfAdd(this.pages3).then(res=>{
+					if(res.data.Code===200){
+						this.$message.success('操作成功')
+						this.innerDrawer41 = false
+						this.pages2.page = 1
+						this.GetCerti_pdfApi()
+					}
+				})
+			},
+			submitForm(formName) {
+				this.$refs[formName].validate((valid) => {
+			 	if (valid) {
+						this.GetCertiAddApi()
+					} else {
+						return false;
+					}
+				});
+			},
+			GetCertiAddApi(){
+				CertiAdd(this.form).then(res=>{
+					if(res.data.Code===200){
+						this.$message.success('添加成功')
+						this.innerDrawer2 = false
+						this.pages.page = 1
+						this.GetCertiListApi()
+					}
+				})
+			},
+			GetCertiListApi(){
+				CertiList(this.pages).then(res=>{
+					console.log('列表',res)
+					if(res.data.Code===200){
+						this.tableData = res.data.Data.List
+						this.total = res.data.Data.Num
+					}
+				})
+			},
+			handleEdit1(e) {
+				this.pages3.T_release_time = e.T_release_time
+				this.pages3.T_failure_time = e.T_failure_time
+				this.pages3.T_pdf = e.T_pdf
+				
+				this.pages3.Id = e.Id
+				this.CerNum = 1
 				this.innerDrawer41 = true
 			},
 			TimeNew() {
+				this.pages3.T_release_time = ''
+				this.pages3.T_failure_time = ''
+				this.pages3.T_pdf = ''
+				this.CerNum = 2
 				this.innerDrawer41 = true
 			},
 			handlePdf(e) {
+				
 				console.log('查看pdf', e)
-				this.$refs.pdf.SetPdf()
+				this.$refs.pdf.SetPdf(e.T_pdf)
 			},
 			handleEdit(e) {
+				this.pages2.T_Certificate_sn = e.T_sn
 				this.innerDrawer4 = true
+				this.GetCerti_pdfApi()
+			},
+			GetCerti_pdfApi(){//管理证书列表
+				Certi_pdf(this.pages2).then(res=>{
+					console.log('管理证书列表',res)
+					if(res.data.Code===200){
+						this.tableData1 = res.data.Data.List
+						this.total1 = res.data.Data.Num
+					}
+				})
 			},
 			NewinnerDrawer() {
 				this.titles = '添加'
 				this.innerDrawer2 = true
 			},
+			search() { //回车搜索
+				this.pages.page = 1
+				this.GetCertiListApi()
+			},
 			handleDelete(val) {
-				console.log('删除', val);
-				this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
-					confirmButtonText: '确定',
+				this.$confirm('此操作将删除该, 是否继续?', '提示', {
+					confirmButtonText: '立即删除',
 					cancelButtonText: '取消',
 					type: 'warning',
 					center: true
 				}).then(() => {
-					this.$message({
-						type: 'success',
-						message: '删除成功!'
-					});
+					Certi_pdfDel({Id:val.Id}).then(res=>{
+						if(res.data.Code===200){
+							this.$message.success('删除成功')
+							this.pages2.page = 1
+							this.GetCerti_pdfApi()
+						}
+					})
 				}).catch(() => {
-					this.$message({
-						type: 'info',
-						message: '已取消删除'
-					});
+					this.$message.info('取消删除');
 				});
 			},
 			handleCurrentChange(val) {
-				this.page.pagez = val
-				console.log('当前页', this.page);
+				this.pages.page = val
+				this.GetCertiListApi()
+			},
+			handleCurrentChange1(val) {//管理证书
+				this.pages2.page = val
+				this.GetCerti_pdfApi()
 			},
 		},
 	}

+ 2 - 3
src/views/calibrationCertificate/pdf.vue

@@ -27,10 +27,9 @@
 			}
 		},
 		methods:{
-			SetPdf(){
+			SetPdf(e){
 				this.dialogVisible4 = true
-				this.serPdf = 'https://bzdcoldverifyoss.baozhida.cn/UpImage/166798048063268c71-e558-406d-81d4-5d30d2c3d974.pdf'
-				console.log('234')
+				this.serPdf = e
 			}
 		}
 		

+ 7 - 7
src/views/layout/Menus.vue

@@ -3,13 +3,13 @@
 		<!-- <div class="menu-logo1">
 			<img src="@/assets/img/logo2-1.png" alt="logo">
 		</div> -->
-		<el-menu :default-active="$route.path" router background-color="#182027"
-			text-color="#fff" :collapse="true">
-			<el-menu-item :index="item.path" v-for="(item,index) in $router.options.routes[1].children"
-				:key="index">
-				<i :class="item.icons" style="font-size:32px;"></i>
-				<span slot="title">{{item.meta.title}}</span>
-			</el-menu-item>
+		<el-menu :default-active="$route.path" router background-color="#182027" text-color="#fff" :collapse="true">
+			<div v-for="(item,index) in $router.options.routes[1].children" :key="index">
+				<el-menu-item :index="item.path" v-if="item.meta.authority==$store.state.userInfo.value || item.meta.authority===0">
+					<i :class="item.icons" style="font-size:32px;"></i>
+					<span slot="title">{{item.meta.title}}</span>
+				</el-menu-item>
+			</div>
 		</el-menu>
 	</div>
 </template>