wd пре 4 година
родитељ
комит
01f50b87a4

+ 14 - 8
src/dashoo.cn/backend/api/controllers/oilsupplier/hsescore.go

@@ -14,7 +14,6 @@ import (
 	"time"
 
 	. "dashoo.cn/backend/api/controllers"
-	"dashoo.cn/business2/permission"
 	"dashoo.cn/utils"
 )
 
@@ -90,11 +89,11 @@ func (this *HSEScoreController) GetList() {
 		where = where + " and a.SupplierName = '" + this.User.Realname + "'"
 	} else {
 		//超级管理员和有查看所有数据权限的用户不加条件
-		svcPerm := permission.GetPermissionService(utils.DBE)
-		isauth := svcPerm.IsAuthorized(this.User.Id, "oil_supplier.marketAccess.AllRecord")
-		if !svcPerm.IsAdmin(this.User.Id) && !isauth {
-			where = where + " and a.SupplierName = '" + this.User.Realname + "'"
-		}
+		//svcPerm := permission.GetPermissionService(utils.DBE)
+		//isauth := svcPerm.IsAuthorized(this.User.Id, "oil_supplier.marketAccess.AllRecord")
+		//if !svcPerm.IsAdmin(this.User.Id) && !isauth {
+		//	where = where + " and a.SupplierName = '" + this.User.Realname + "'"
+		//}
 	}
 
 	svc := hsescore.GetHSEScoreService(utils.DBE) //获得数据库引擎
@@ -265,6 +264,9 @@ func (this *HSEScoreController) ImportExcel() {
 		var hse hsescore.HSEScore
 		var hseUpdate hsescore.HSEScore
 		var supplier supplier.OilSupplier
+		if len(sheet.Rows[i].Cells) == 0 {
+			continue
+		}
 		supplierName1 := sheet.Rows[i].Cells[1].String()
 		if supplierName1 != "" {
 			supplierName = sheet.Rows[i].Cells[1].String()
@@ -319,7 +321,11 @@ func (this *HSEScoreController) ImportExcel() {
 	log.Println(elapsed)
 
 	errinfo.Code = 0
-	errinfo.Message = "导入成功,其中" + supplierNameStr + "这些公司找不到对应,请手动新增!"
+	if supplierNameStr != "" {
+		errinfo.Message = "导入成功,其中" + supplierNameStr + "这些公司找不到对应,请手动新增!"
+	} else {
+		errinfo.Message = "导入成功!"
+	}
 	this.Data["json"] = &errinfo
 	this.ServeJSON()
 }
@@ -561,7 +567,7 @@ func (this *HSEScoreController) DeleteHSEScore() {
 		return
 	}
 
-	err := svc.DeleteById("HSEScore", Id)
+	err := svc.DeleteEntityBytbl("HSEScore", "Id in (" + Id + ")")
 	if err == nil {
 		errinfo.Message = "删除成功"
 		errinfo.Code = 0

+ 50 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/basisedit.vue

@@ -52,6 +52,36 @@
                         @selectcompany="changeFormData" @inputcompany="inputCompany">
             </basis-info>
           </el-card>
+          <el-card class="box-card">
+            <div slot="header" class="clearfix">
+              <span>HSE培训成绩</span>
+            </div>
+            <div>
+              <el-table size="mini" :data="HSEList" border>
+                <el-table-column label="序号" width="80" align="center" type="index"></el-table-column>
+                <el-table-column label="企业名称" min-width="300px" prop="SupplierName" sortable align="center"></el-table-column>
+                <el-table-column label="姓名" width="100px" prop="Name" sortable align="center"></el-table-column>
+                <el-table-column label="考号" width="100px" prop="TestNumber" sortable align="center"></el-table-column>
+                <el-table-column label="身份证号" min-width="160px" prop="IdNumber" sortable align="center"></el-table-column>
+                <el-table-column label="有效期" width="120px" prop="ApplyTime" sortable align="center">
+                  <template slot-scope="scope">
+                    {{ jstimehandle(scope.row.ApplyTime+'') }}
+                  </template>
+                </el-table-column>
+                <el-table-column label="考试成绩" width="120px" prop="Score" sortable align="center"></el-table-column>
+                <el-table-column label="培训开始日期" width="120px" prop="StartTime" sortable align="center">
+                  <template slot-scope="scope">
+                    {{ jstimehandle(scope.row.StartTime+'') }}
+                  </template>
+                </el-table-column>
+                <el-table-column label="培训结束日期" width="120px" prop="EndTime" sortable align="center">
+                  <template slot-scope="scope">
+                    {{ jstimehandle(scope.row.EndTime+'') }}
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+          </el-card>
         </el-tab-pane>
 
         <el-tab-pane label="企业情况" name="2">
@@ -301,6 +331,7 @@
   import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
   import CheckFile from '@/components/oilsupplier/checkFile'
   import catalogapi from '@/api/oilsupplier/oilcatalog'
+  import hseApi from '@/api/hsescore/hsescore'
 
   export default {
 
@@ -346,6 +377,7 @@
         appendStatus: true,
         dictData: null,
         applyLoading: false,
+        HSEList: [],
         equipmentList: [], // 企业主要设备
         performanceList: [], // 近三年主要业绩
         patentList: [], // 专利及专有技术
@@ -525,10 +557,25 @@
       } else {
         this.initDatas()
       }
+      this.hseList()
       // this.Jurisdiction()
       // this.isAccess()
     },
     methods: {
+      // hse成绩
+      hseList() {
+        if (this.formData.Id) {
+          let params = {
+            SupplierId: this.formData.Id,
+            IsThree: ''
+          }
+          hseApi.getSupplierHSEList(params, this.$axios).then(res => {
+            this.HSEList = res.data.items
+          }).catch(err => {
+            console.error(err)
+          })
+        }
+      },
       checkFileList () {
         this.$refs.checkFile.checkFileListShow = true
         this.$refs.checkFile.type = 4
@@ -754,7 +801,8 @@
         this.formData.CompanyTel = fdata.CompanyTel
         this.formData.QQ = fdata.QQ
         this.formData.CompanyUrl = fdata.CompanyUrl
-        this.formData.HseTraining = fdata.HseTraining
+        // this.formData.HseTraining = fdata.HseTraining
+        this.formData.HseTraining = '1' // 基建类HSE培训只能选是
         this.formData.SpecTypeCode = fdata.SpecTypeCode
 
         this.$refs['BasisInfo'].CityAry = []
@@ -796,6 +844,7 @@
         if (this.formData.Id) {
           api.getEntityAndCert(this.certId, this.$axios).then(res => {
             this.formData = res.data
+            this.formData.HseTraining = '1' // 基建类HSE培训只能选是
             this.formDataCert.WorkerTotal = this.formData.WorkerTotal
             this.formDataCert.ContractNum = this.formData.ContractNum
             this.formDataCert.UniversityNum = this.formData.UniversityNum

+ 64 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/techedit.vue

@@ -49,6 +49,36 @@
                        @selectcompany="changeFormData" @inputcompany="inputCompany">
             </tech-info>
           </el-card>
+          <el-card class="box-card" v-if="formData.HseTraining === '1'">
+            <div slot="header" class="clearfix">
+              <span>HSE培训成绩</span>
+            </div>
+            <div>
+              <el-table size="mini" :data="HSEList" border>
+                <el-table-column label="序号" width="80" align="center" type="index"></el-table-column>
+                <el-table-column label="企业名称" min-width="300px" prop="SupplierName" sortable align="center"></el-table-column>
+                <el-table-column label="姓名" width="100px" prop="Name" sortable align="center"></el-table-column>
+                <el-table-column label="考号" width="100px" prop="TestNumber" sortable align="center"></el-table-column>
+                <el-table-column label="身份证号" min-width="160px" prop="IdNumber" sortable align="center"></el-table-column>
+                <el-table-column label="有效期" width="120px" prop="ApplyTime" sortable align="center">
+                  <template slot-scope="scope">
+                    {{ jstimehandle(scope.row.ApplyTime+'') }}
+                  </template>
+                </el-table-column>
+                <el-table-column label="考试成绩" width="120px" prop="Score" sortable align="center"></el-table-column>
+                <el-table-column label="培训开始日期" width="120px" prop="StartTime" sortable align="center">
+                  <template slot-scope="scope">
+                    {{ jstimehandle(scope.row.StartTime+'') }}
+                  </template>
+                </el-table-column>
+                <el-table-column label="培训结束日期" width="120px" prop="EndTime" sortable align="center">
+                  <template slot-scope="scope">
+                    {{ jstimehandle(scope.row.EndTime+'') }}
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+          </el-card>
         </el-tab-pane>
 
         <el-tab-pane name="2" label="企业情况">
@@ -181,7 +211,7 @@
 
         <el-tab-pane name="4" label="准入范围">
           <tech-list ref="techList" :data.sync="techList" @close="getbuslist" :canadd="true" :newcanadd="newadd_flat" height="360px"
-            style="margin-top: 20px" :candelete="delete_flat"></tech-list>
+            style="margin-top: 20px" :candelete="delete_flat" :selectNeedSecure="selectNeedSecure"></tech-list>
         </el-tab-pane>
 
 
@@ -305,6 +335,7 @@
   import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
   import CheckFile from '@/components/oilsupplier/checkFile'
   import catalogapi from '@/api/oilsupplier/oilcatalog'
+  import hseApi from '@/api/hsescore/hsescore'
 
   export default {
 
@@ -336,6 +367,7 @@
       return {
         showBtn: true,
         innerVisible: false,
+        hseTrainingStatus: false,
         dialogApplyTime: false,
         dialogInFlag: false,
         updateLoading: false,
@@ -349,6 +381,7 @@
         appendStatus: true,
         dictData: null,
         applyLoading: false,
+        HSEList: [],
         equipmentList: [], // 企业主要设备
         performanceList: [], // 近三年主要业绩
         patentList: [], // 专利及专有技术
@@ -533,6 +566,35 @@
       // this.isAccess()
     },
     methods: {
+      selectNeedSecure() {
+        if (this.formData.Id) {
+          hseApi.selectNeedSecure(this.formData.Id, this.$axios).then(res => {
+            if (res.data === 1) {
+              this.formData.HseTraining = '1'
+              this.hseTrainingStatus = true
+            } else {
+              this.hseTrainingStatus = false
+            }
+            this.hseList()
+          }).catch(err => {
+            console.error(err)
+          })
+        }
+      },
+      // hse成绩
+      hseList() {
+        if (this.formData.Id) {
+          let params = {
+            SupplierId: this.formData.Id,
+            IsThree: ''
+          }
+          hseApi.getSupplierHSEList(params, this.$axios).then(res => {
+            this.HSEList = res.data.items
+          }).catch(err => {
+            console.error(err)
+          })
+        }
+      },
       checkFileList () {
         this.$refs.checkFile.checkFileListShow = true
         this.$refs.checkFile.type = 4
@@ -790,6 +852,7 @@
         if (this.formData.Id) {
           api.getEntityAndCert(this.certId, this.$axios).then(res => {
             this.formData = res.data
+            // this.selectNeedSecure()
             this.formDataCert.WorkerTotal = this.formData.WorkerTotal
             this.formDataCert.ContractNum = this.formData.ContractNum
             this.formDataCert.UniversityNum = this.formData.UniversityNum

+ 38 - 31
src/dashoo.cn/frontend_web/src/pages/select/hsescore/index.vue

@@ -55,6 +55,7 @@
           <el-form-item>
             <el-button v-if="!disabled" type="primary" size="mini" @click="add">新增</el-button>
             <el-button v-if="!disabled" type="primary" size="mini" @click="importExcel" :loading="importLoading">导入</el-button>
+            <el-button v-if="!disabled" :disabled="dataListSelections.length <= 0" type="primary" size="mini" @click="deleteRow()">批量删除</el-button>
           </el-form-item>
         </el-form>
       </div>
@@ -69,10 +70,11 @@
         height="calc(100vh - 243px)"
         style="width: 100%"
         @sort-change="orderby"
-        @selection-change="onSelect"
+        @selection-change="selectionChangeHandle"
         highlight-current-row
         stripe
       >
+        <el-table-column type="selection" header-align="center" align="center" width="50"/>
         <el-table-column label="操作" width="250px" align="center" fixed="right" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-button type="primary" plain title="打印证书" size="mini" @click="download(scope.row)">打印证书</el-button>
@@ -235,15 +237,6 @@ export default {
       authUser: 'authUser'
     })
   },
-  created () {
-    this.getSupplierList()
-    this.initDatas()
-    if (this.authUser.Profile.IsCompanyUser === 1) {
-      this.disabled = true
-    }
-  },
-  activated () {
-  },
   data () {
     const checkIdNumber = (rule, value, callback) => {
       if (value === '') {
@@ -283,6 +276,7 @@ export default {
       status: false,
       importLoading: false,
       entityList: [],
+      dataListSelections: [],
       supplierSelectList: [], // 企业名称列表
       rules: {
         SupplierId: [
@@ -341,6 +335,13 @@ export default {
       }
     }
   },
+  created () {
+    this.getSupplierList()
+    this.initDatas()
+    if (this.authUser.Profile.IsCompanyUser === 1) {
+      this.disabled = true
+    }
+  },
   methods: {
     jstimehandle (val) {
       if (val === '' || val === '0001-01-01T08:00:00+08:00' || val === '0001-01-01T00:00:00Z') {
@@ -352,6 +353,14 @@ export default {
         return val.substring(0, 10)
       }
     },
+    // 多选
+    selectionChangeHandle(val) {
+      let list = []
+      val.map((item, index) => {
+        list.push(item.Id)
+      })
+      this.dataListSelections = list
+    },
     // 确定
     addOrUpdate() {
       this.$refs['EntityForm'].validate((valid) => {
@@ -480,13 +489,13 @@ export default {
       hseApi.importExcel(params, this.$axios).then(res => {
         if (res.data.code === 0) {
           this.$message({
-            duration: 10000,
+            duration: 60000,
             type: 'success',
             message: res.data.message
           })
         } else {
           this.$message({
-            duration: 10000,
+            duration: 60000,
             type: 'warning',
             message: res.data.message
           })
@@ -536,6 +545,7 @@ export default {
       this.updateData.StartTime = row.StartTime
       this.updateData.EndTime = row.EndTime
       this.updateData.SupplierId = row.SupplierId
+      this.updateData.SupplierName = row.SupplierName
       this.updateData.Score = row.Score
       this.updateData.IdNumber = row.IdNumber
       this.updateData.Name = row.Name
@@ -550,12 +560,27 @@ export default {
       this.id = row.Id
     },
     deleteRow(id) {
+      let ids = []
+      if (id != null && id != '') {
+        ids.push(id)
+      } else {
+        ids = this.dataListSelections
+      }
+      console.log(ids, 'ids')
+      if (ids.length === 0) {
+        this.$message({
+          duration: 10000,
+          type: 'warning',
+          message: '请先选择删除条目'
+        })
+        return
+      }
       this.$confirm('确定删除?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-          hseApi.deleteHSE(id, this.$axios).then(res => {
+          hseApi.deleteHSE(ids.join(), this.$axios).then(res => {
               if (res.data.code === 0) {
                 // 刷新列表
                 this.initDatas()
@@ -595,13 +620,6 @@ export default {
         this.$router.push('/oilsupplier/supplier/' + row.Id + '/techedit?certid=' + row.CertId + '&showcy=true')
       }
     },
-    onSelect (e) {
-      var list = []
-      e.map((item, index) => {
-        list.push(item.CertId)
-      })
-      this.selectedCertIdList = String(list)
-    },
     // 列表排序功能
     orderby (column) {
       if (column.order === 'ascending') {
@@ -720,17 +738,6 @@ export default {
             })
           })
       }
-    },
-    formatDateTime (date) {
-      var y = date.getFullYear()
-      var m = date.getMonth() + 1
-      m = m < 10 ? ('0' + m) : m
-      var d = date.getDate()
-      d = d < 10 ? ('0' + d) : d
-      var h = date.getHours()
-      var minute = date.getMinutes()
-      minute = minute < 10 ? ('0' + minute) : minute
-      return y + '-' + m + '-' + d + ' ' + h + ':' + minute
     }
   }
 }

+ 362 - 0
src/dashoo.cn/frontend_web/src/pages/select/hsescore/indexSelect.vue

@@ -0,0 +1,362 @@
+<template>
+  <div>
+    <!--顶部显示-->
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item>HSE成绩</el-breadcrumb-item>
+    </el-breadcrumb>
+    <!--内框顶部显示-->
+    <el-card class="box-card" style="height: calc(100vh - 115px);position:relative">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i>
+        </span>
+
+        <el-form :model="searchForm" ref="searchformRef" :inline="true" style="float: right;position:absolute;right:15px;top:10.5px">
+          <el-form-item label="准入证号">
+            <el-input size="mini"  style="width:110px" v-model="searchForm.AccessCardNo" clearable placeholder="准入证号"></el-input>
+          </el-form-item>
+          <el-form-item label="工商注册号">
+            <el-input size="mini"  style="width:122px" v-model="searchForm.CommercialNo" clearable placeholder="工商注册号"></el-input>
+          </el-form-item>
+          <el-form-item label="企业名称">
+            <el-input size="mini"  style="width:110px" v-model="searchForm.SupplierName" clearable placeholder="企业名称"></el-input>
+          </el-form-item>
+          <el-form-item label="有效期">
+            <el-date-picker
+              v-model="searchForm.ApplyTime"
+              size="mini"
+              type="date"
+              format="yyyy 年 MM 月 dd 日"
+              value-format="yyyy-MM-dd"
+              placeholder="选择有效期"
+              style="width: 100%"
+            ></el-date-picker>
+          </el-form-item>
+          <el-form-item label="姓名">
+            <el-input size="mini" style="width:100px" v-model="searchForm.Name" clearable placeholder="姓名"></el-input>
+          </el-form-item>
+
+          <el-form-item>
+            <el-dropdown
+              split-button
+              type="primary"
+              size="mini"
+              @click="initDatas($event)"
+              @command="searchCommand"
+            >
+              查询
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </el-form-item>
+        </el-form>
+      </div>
+
+      <!--内框表格显示-->
+      <el-table
+        id="rebateSetTable"
+        :data="entityList"
+        size="mini"
+        v-loading="tableLoading"
+        border
+        height="calc(100vh - 243px)"
+        style="width: 100%"
+        @sort-change="orderby"
+        @selection-change="onSelect"
+        highlight-current-row
+        stripe
+      >
+        <el-table-column label="操作" width="120px" align="center" fixed="right" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-button type="primary" plain title="打印证书" size="mini" @click="download(scope.row)">打印证书</el-button>
+          </template>
+        </el-table-column>
+        <!--内框表格剩余栏显示-->
+        <el-table-column align="center" width="70" label="序号">
+          <template slot-scope="scope">
+            <span>{{scope.$index+(currentPage - 1) * size + 1}} </span>
+          </template>
+        </el-table-column>
+        <el-table-column label="企业名称" min-width="300px" prop="SupplierName" sortable align="center"></el-table-column>
+        <el-table-column label="姓名" width="120px" prop="Name" sortable align="center"></el-table-column>
+        <el-table-column label="考号" width="120px" prop="TestNumber" sortable align="center"></el-table-column>
+        <el-table-column label="身份证号" width="200px" prop="IdNumber" sortable align="center"></el-table-column>
+        <el-table-column label="有效期" width="120px" prop="ApplyTime" sortable align="center">
+          <template slot-scope="scope">
+            {{ jstimehandle(scope.row.ApplyTime+'') }}
+          </template>
+        </el-table-column>
+        <el-table-column label="考试成绩" width="120px" prop="Score" sortable align="center"></el-table-column>
+        <el-table-column label="培训开始日期" width="120px" prop="StartTime" sortable align="center">
+          <template slot-scope="scope">
+            {{ jstimehandle(scope.row.StartTime+'') }}
+          </template>
+        </el-table-column>
+        <el-table-column label="培训结束日期" width="120px" prop="EndTime" sortable align="center">
+          <template slot-scope="scope">
+            {{ jstimehandle(scope.row.EndTime+'') }}
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <!-- 分页 -->
+      <el-pagination
+        style="float: right; margin-top: 10px; margin-bottom: 5px"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-sizes="[10, 50, 100, 200, 500]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="currentItemCount"
+      ></el-pagination>
+    </el-card>
+  </div>
+</template>
+
+<script>
+import hseApi from '@/api/hsescore/hsescore'
+import uploadajax from '@/assets/js/uploadajax.js'
+import {mapGetters} from "vuex"
+import axios from "axios";
+
+export default {
+  computed: {
+    ...mapGetters({
+      authUser: 'authUser'
+    })
+  },
+  data () {
+    const checkIdNumber = (rule, value, callback) => {
+      if (value === '') {
+        callback(new Error('请填写身份证号'))
+      } else {
+        let re1 = /(^\d{18}$)|(^\d{17}(\d|X|x)$)/
+        if (!re1.test(this.updateData.IdNumber)) {
+          callback(new Error('请输入正确格式的身份证号'))
+        } else {
+          callback()
+        }
+      }
+    }
+    const validDate = (rule, value, callback) => {
+      if (!value || !value[0] || !value[1]) {
+        callback(new Error('请选择培训开始日期'))
+      } else {
+        callback()
+      }
+    }
+    const validStartDate = (rule, value, callback) => {
+      if (!value || !value[0] || !value[1]) {
+        callback(new Error('请选择培训结束日期'))
+      } else {
+        callback()
+      }
+    }
+    return {
+      title: '',
+      disabled: false,
+      uploadShow: false,
+      id: 0,
+      addDialog: false,
+      addDialog1: false,
+      tableLoading: false,
+      addLoading: false,
+      status: false,
+      importLoading: false,
+      entityList: [],
+      supplierSelectList: [], // 企业名称列表
+      rules: {
+        SupplierId: [
+          {required: true, message: '请选择企业名称', trigger: 'blur'}
+        ],
+        Score: [
+          {required: true, message: '请填写考试成绩', trigger: 'blur'}
+        ],
+        Name: [
+          {required: true, message: '请填写姓名', trigger: 'blur'}
+        ],
+        SupplierName: [
+          {required: true, message: '请填写企业名称', trigger: 'blur'}
+        ],
+        StartTime: [
+          {required: true, validator: validDate, trigger: 'blur'}
+        ],
+        EndTime: [
+          {required: true, validator: validStartDate, trigger: 'blur'}
+        ],
+        TestNumber: [
+          {required: true, message: '请填写考号', trigger: 'blur'}
+        ]
+      },
+      rules1: {
+        IdNumber: [
+          {required: true, validator: checkIdNumber, trigger: 'change'}
+        ]
+      },
+      size: 10,
+      currentPage: 1,
+      currentItemCount: 0,
+      searchForm: {
+        AccessCardNo: '',
+        SupplierName: '',
+        CommercialNo: '',
+        ApplyTime: '',
+        IdNumber: '',
+        Name: '',
+      },
+      updateData: {
+        SupplierId: '',
+        SupplierName: '',
+        Name: '',
+        IdNumber: '',
+        TestNumber: '',
+        Score: 0,
+        StartTime: '',
+        EndTime: '',
+        ApplyTime: ''
+      },
+      // 列表排序
+      Column: {
+        Order: '',
+        Prop: ''
+      }
+    }
+  },
+  created () {
+    this.getSupplierList()
+    this.initDatas()
+    if (this.authUser.Profile.IsCompanyUser === 1) {
+      this.disabled = true
+    }
+  },
+  methods: {
+    jstimehandle (val) {
+      if (val === '' || val === '0001-01-01T08:00:00+08:00' || val === '0001-01-01T00:00:00Z') {
+        return '----'
+      }else if (val === '5000-01-01T23:59:59+08:00') {
+        return '永久'
+      } else {
+        val = val.replace('T', ' ')
+        return val.substring(0, 10)
+      }
+    },
+    // 打印证书word
+    download(row) {
+      this.tableLoading = true
+      let params = {
+        SupplierId: row.SupplierId,
+        Ip: window.location.host
+      }
+      hseApi.exportWord(row.Id, params, this.$axios).then(res => {
+          // 内网服务器专用
+          if (process.client && res.data.indexOf('upfile') === 0) {
+            const myDomain = window.location.host
+            window.open('http://' + myDomain + '/' + res.data)
+          } else {
+            window.open('http://' + res.data)
+          }
+          this.tableLoading = false
+        }).catch(err => {
+          this.tableLoading = false
+          console.error(err)
+      })
+    },
+    onSelect (e) {
+      var list = []
+      e.map((item, index) => {
+        list.push(item.CertId)
+      })
+      this.selectedCertIdList = String(list)
+    },
+    // 列表排序功能
+    orderby (column) {
+      if (column.order === 'ascending') {
+        this.Column.Order = 'asc'
+      } else if (column.order === 'descending') {
+        this.Column.Order = 'desc'
+      }
+      this.Column.Prop = column.prop
+      this.initDatas()
+    },
+    // 初始化列表方法
+    initDatas (event) {
+      if (event != null) {
+        this.currentPage = 1
+      }
+      let params = {
+        _size: this.size,
+        _currentPage: this.currentPage,
+        Order: this.Column.Order,
+        Prop: this.Column.Prop
+      }
+      // 查询条件
+      Object.assign(params, this.searchForm)
+      this.tableLoading = true
+      console.log(params, 'params----')
+      hseApi.getHSEList(params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+          this.tableLoading = false
+        }).catch(err => {
+          console.error(err)
+          this.tableLoading = false
+        })
+    },
+    getSupplierList() {
+      hseApi.getSupplierList(this.$axios).then(res => {
+          this.supplierSelectList = res.data.items
+        }).catch(err => {
+          console.error(err)
+        })
+    },
+    // 分页方法
+    handleCurrentChange (value) {
+      this.currentPage = value
+      this.initDatas()
+    },
+    handleSizeChange (value) {
+      this.size = value
+      this.currentPage = 1
+      this.initDatas()
+    },
+    searchCommand (command) {
+      if (command === 'search') {
+        this.dialogVisible = true
+      } else if (command === 'clear') {
+        this.clearSearch()
+      }
+    },
+    clearSearch () {
+      Object.assign(this.searchForm, this.searchFormReset)
+      if (process.client) {
+        window.localStorage.setItem('companySearchParams', '')
+      }
+      this.CityAry = []
+      this.SetupTime = ''
+      this.auditorg = ''
+      this.selectDept = ''
+      this.OperType = ''
+      this.hidden = true
+      this.Grade = ''
+      this.LinkCityAry = []
+      this.currentPage = 1
+      this.initDatas()
+    }
+  }
+}
+</script>
+
+<style>
+.eldialog .el-input__inner {
+  border: none;
+}
+.eldialog .el-textarea__inner {
+  border: none;
+  resize: none;
+  height: 70px;
+}
+</style>
+