lining 6 年 前
コミット
5bdafa2b9b

+ 1 - 0
src/dashoo.cn/backend/api/business/limsdataentry/limsdataentry.go

@@ -301,6 +301,7 @@ type LimsDateEntryModel struct {
 	EntrustStatus      int       `xorm:"INT(10)"`
 	CustomerId         int       `xorm:"INT(10)"`
 	CustomerName       string    `xorm:VARCHAR(50)`
+	ActCreateOn        int64
 }
 type LimsDocTemplateModel struct {
 	Id             int       `xorm:"<- not null pk autoincr INT(50)"`

+ 18 - 19
src/dashoo.cn/backend/api/business/limsindex/limsindexService.go

@@ -1,12 +1,10 @@
 package limsindex
 
 import (
-	"fmt"
-	"strconv"
-
 	"dashoo.cn/backend/api/business/limsdataentry"
 	. "dashoo.cn/backend/api/mydb"
 	"dashoo.cn/utils"
+	"fmt"
 
 	. "dashoo.cn/utils/db"
 	"github.com/go-xorm/xorm"
@@ -23,9 +21,9 @@ func GetLimsIndexService(xormEngine *xorm.Engine) *LimsIndexService {
 }
 
 //待办事项
-func (s *LimsIndexService) GetDataEntryWait(tblentry, tblbalance, tblentrustmain string, pageIndex, itemsPerPage int64, order, where string) (int64, []limsdataentry.LimsDateEntryModel) {
+func (s *LimsIndexService) GetDataEntryWait(tblentry, tblbalance, tblentrustmain string, order, where string) (limsdataentry.LimsDateEntryModel) {
 	var err error
-	var total int64
+	//var total int64
 	if order != "" {
 		order = " order by " + order
 	}
@@ -33,26 +31,27 @@ func (s *LimsIndexService) GetDataEntryWait(tblentry, tblbalance, tblentrustmain
 	if where == "" {
 		where = "1=1"
 	}
-	sqlCount := " select count(*) from " + tblentry + " a  left join " + tblbalance + " b on b.Id = a.TaskId left join " + tblentrustmain + " c on c.Id=b.EId where " + where
+	//sqlCount := " select count(*) from " + tblentry + " a  left join " + tblbalance + " b on b.Id = a.TaskId left join " + tblentrustmain + " c on c.Id=b.EId where " + where
 	var sql string
 	sql = ` select b.EId,b.EntrustNo,b.SampleTestId,b.BalanceTime,b.BalanceStatus,b.EntrustType,b.EntrustTypeId,b.ProjectType,b.ProjectTypeId,b.DataEntryStatus,b.TestDetail,b.TestDetailId,b.DetectSample,b.DetectSampleId,b.DataDoc,b.DataDocId,b.EquipmentTypeId,b.EquipmentType,b.EquipmentId,b.Equipment,b.BalanceId,a.*,c.* from ` + tblentry + ` a 
 	left join ` + tblbalance + ` b on b.Id = a.TaskId 
 	left join ` + tblentrustmain + ` c on c.Id=b.EId 
-	where ` + where + order + ` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage) + ""
+	where ` + where + order
 	fmt.Println(sql)
-	List := make([]limsdataentry.LimsDateEntryModel, 0)
-	utils.DBE.Sql(sql).Find(&List)
-	resultsSlice, err := s.DBE.Query(sqlCount)
+	//List := make([]limsdataentry.LimsDateEntryModel, 0)
+	var List limsdataentry.LimsDateEntryModel
+	utils.DBE.Sql(sql).Get(&List)
+	//resultsSlice, err := s.DBE.Query(sqlCount)
 	LogError(err)
-	if len(resultsSlice) > 0 {
-		results := resultsSlice[0]
-		for _, value := range results {
-			total, err = strconv.ParseInt(string(value), 10, 64)
-			LogError(err)
-			break
-		}
-	}
-	return total, List
+	//if len(resultsSlice) > 0 {
+	//	results := resultsSlice[0]
+	//	for _, value := range results {
+	//		total, err = strconv.ParseInt(string(value), 10, 64)
+	//		LogError(err)
+	//		break
+	//	}
+	//}
+	return List
 }
 
 // 按月份统计检测任务

+ 13 - 12
src/dashoo.cn/backend/api/business/workflow/workflow.go

@@ -98,18 +98,19 @@ type MultiOrgAuditVM struct {
 }
 
 const (
-	////特检站数据录入
-	//TJZ_DATA_KEY string = "tjz_data_apply"
-	////特检站报告
-	//TJZ_PROCESS_KEY string = "tjz_report_assign"
-	////宇信数据录入
-	//YX_DATA_KEY string = "yx_data_apply"
-	////宇信报告
-	//YX_PROCESS_KEY string = "yx_report_assign"
-	////计量数据录入
-	//JL_DATA_KEY string = "jl_data_apply"
-	//// 节能
-	//JN_DATA_KEY string = "jn_data_apply"
+	//特检站数据录入
+	TJZ_DATA_KEY string = "tjz_data_apply"
+	//宇信数据录入
+	YX_DATA_KEY string = "yx_data_apply"
+	//特检站报告
+	TJZ_PROCESS_KEY string = "tjz_report_assign"
+	//宇信报告
+	YX_PROCESS_KEY string = "yx_report_assign"
+
+	//计量数据录入
+	JL_DATA_KEY string = "jl_data_apply"
+	// 节能
+	JN_DATA_KEY string = "jn_data_apply"
 	// 数据录入校核
 	DATAJIAOHE string = "DATAJIAOHE"
 	// 数据录入预审批

+ 73 - 62
src/dashoo.cn/backend/api/controllers/lims/limsindex.go

@@ -2,11 +2,11 @@ package lims
 
 import (
 	"encoding/json"
+	"fmt"
+	"sort"
 	"strconv"
 	"strings"
 
-	"dashoo.cn/backend/api/business/auditsetting"
-
 	//"time"
 	//"fmt"
 
@@ -42,43 +42,60 @@ type WaittingModel struct {
 // @Success	200	{object} controllers.Request
 // @router /getwaiting [get]
 func (this *LimsIndexController) GetWaiting() {
-	//启动数据录入工作流
-	svcActiviti := workflow.GetActivitiService(utils.DBE)
-	var processInstanceId string
-	var RoleSet auditsetting.Base_OilAuditSetting
-	rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
-	rsvc.GetAuditStepRoleEntity(OilAuditSettingName, this.User.DepartmentId, workflow.DATAAUDIT, &RoleSet)
-	processInstanceId = svcActiviti.GetMyTasks(RoleSet.WorkFlowCord, this.User.Id)
-	//switch this.User.DepartmentId {
-	//case "100000150":
-	//	processInstanceId = svcActiviti.GetMyTasks(workflow.TJZ_DATA_KEY, this.User.Id)
-	//case "100000151":
-	//	processInstanceId = svcActiviti.GetMyTasks(workflow.YX_DATA_KEY, this.User.Id)
-	//}
-	where := " b.BalanceStatus <> 0 "
-	where += " and a.Id in (" + processInstanceId + ")"
 
 	page := this.GetPageInfoForm()
-	orderby := "a.Id desc"
+
+	wfNames := workflow.TJZ_DATA_KEY  + "," + workflow.YX_DATA_KEY + "," + workflow.TJZ_PROCESS_KEY + "," + workflow.YX_PROCESS_KEY
+
+	var pagingResult workflow.ActiMyPagingResultVM
+	var myTasksRetWithTimes []workflow.ActiMyTasksRetWithTimeVM
+	actisvc := workflow.GetActivitiService(utils.DBE)
+
+	pagingResult = actisvc.GetMyAllTypePagingTasksWithTime(this.User.Id, page.CurrentPage, page.Size, wfNames, "", "")
+	myTasksRetWithTimes = pagingResult.TaskList
+
+	var todoList []limsdataentry.LimsDateEntryModel
 	svc := limsindex.GetLimsIndexService(utils.DBE)
 	//数据录入
-	where_entry := where + " and a.CheckStatus = 0 "
-	entrytotal, entrylist := svc.GetDataEntryWait(this.User.AccCode+LimsDateEntryName, this.User.AccCode+LimsTaskBalanceName, this.User.AccCode+LimsEntrustMainName, page.CurrentPage, page.Size, orderby, where_entry)
-
+	var entrytotal int
 	//数据校核
-	where_check := where + " and a.CheckStatus = 1 "
-	checktotal, checklist := svc.GetDataEntryWait(this.User.AccCode+LimsDateEntryName, this.User.AccCode+LimsTaskBalanceName, this.User.AccCode+LimsEntrustMainName, page.CurrentPage, page.Size, orderby, where_check)
-
+	var checktotal int
+	//数据预审
+	var Preaudittotal int
 	//数据审核
-	where_audit := where + " and a.CheckStatus = 2 "
-	audittotal, auditlist := svc.GetDataEntryWait(this.User.AccCode+LimsDateEntryName, this.User.AccCode+LimsTaskBalanceName, this.User.AccCode+LimsEntrustMainName, page.CurrentPage, page.Size, orderby, where_audit)
-
+	var audittotal int
 	//报告签发
-	where_sign := where + " and a.CheckStatus = 4 "
-	signtotal, signlist := svc.GetDataEntryWait(this.User.AccCode+LimsDateEntryName, this.User.AccCode+LimsTaskBalanceName, this.User.AccCode+LimsEntrustMainName, page.CurrentPage, page.Size, orderby, where_sign)
+	var signtotal int
+	for _,item := range myTasksRetWithTimes {
+		var entry limsdataentry.LimsDateEntryModel
+		where := " b.BalanceStatus <> 0 and a.id = " + item.BusinessKey
+		entry = svc.GetDataEntryWait(this.User.AccCode+LimsDateEntryName, this.User.AccCode+LimsTaskBalanceName, this.User.AccCode+LimsEntrustMainName, "a.Id desc", where)
+		entry.ActCreateOn = item.CreateTime
+		todoList = append(todoList, entry)
+		if entry.CheckStatus == 0 {
+			entrytotal++
+		} else if entry.CheckStatus == 1 {
+			checktotal++
+		} else if entry.CheckStatus == 2 {
+			Preaudittotal++
+		} else if entry.CheckStatus == 3 {
+			audittotal++
+		} else if entry.CheckStatus == 4 {
+			signtotal++
+		}
+	}
 
-	this.Data["json"] = WaittingModel{entrytotal, entrylist, checktotal, checklist, audittotal, auditlist, signtotal, signlist}
+	sort.Slice(todoList, func(i, j int) bool {
+		return todoList[i].ActCreateOn > todoList[j].ActCreateOn
+	})
+	var datainfo DataInfo
+	datainfo.Items = todoList
+	datainfo.CurrentItemCount = pagingResult.Total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
 	this.ServeJSON()
+
 }
 
 // @Title 获取已办信息
@@ -86,43 +103,37 @@ func (this *LimsIndexController) GetWaiting() {
 // @Success	200	{object} controllers.Request
 // @router /getdone [get]
 func (this *LimsIndexController) GetDone() {
-	whtintime := this.GetString("whtintime")
-	//启动数据录入工作流
-	svcActiviti := workflow.GetActivitiService(utils.DBE)
-	var processInstanceId string
-	var RoleSet auditsetting.Base_OilAuditSetting
-	rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
-	rsvc.GetAuditStepRoleEntity(OilAuditSettingName, this.User.DepartmentId, workflow.DATAAUDIT, &RoleSet)
-	processInstanceId = svcActiviti.GetHistoryMyTasks(RoleSet.WorkFlowCord, this.User.Id)
-	//switch this.User.DepartmentId {
-	//case "100000150":
-	//	processInstanceId = svcActiviti.GetHistoryMyTasks(workflow.TJZ_DATA_KEY, this.User.Id)
-	//case "100000151":
-	//	processInstanceId = svcActiviti.GetMyTasks(workflow.YX_DATA_KEY, this.User.Id)
-	//}
-	where := " a.ModifiedOn > '" + whtintime + "'"
-	where += " and a.Id in (" + processInstanceId + ")"
-
 	page := this.GetPageInfoForm()
-	orderby := "a.ModifiedOn desc"
-	svc := limsindex.GetLimsIndexService(utils.DBE)
-	//数据录入
-	where_entry := where + " and a.CreateUserId = '" + this.User.Id + "'"
-	entrytotal, entrylist := svc.GetDataEntryWait(this.User.AccCode+LimsDateEntryName, this.User.AccCode+LimsTaskBalanceName, this.User.AccCode+LimsEntrustMainName, page.CurrentPage, page.Size, orderby, where_entry)
 
-	//数据校核
-	where_check := where + " and a.JHUserId = '" + this.User.Id + "'"
-	checktotal, checklist := svc.GetDataEntryWait(this.User.AccCode+LimsDateEntryName, this.User.AccCode+LimsTaskBalanceName, this.User.AccCode+LimsEntrustMainName, page.CurrentPage, page.Size, orderby, where_check)
+	wfNames := workflow.TJZ_DATA_KEY  + "," + workflow.YX_DATA_KEY + "," + workflow.TJZ_PROCESS_KEY + "," + workflow.YX_PROCESS_KEY
 
-	//数据审核
-	where_audit := where + " and a.CheckUserId = '" + this.User.Id + "'"
-	audittotal, auditlist := svc.GetDataEntryWait(this.User.AccCode+LimsDateEntryName, this.User.AccCode+LimsTaskBalanceName, this.User.AccCode+LimsEntrustMainName, page.CurrentPage, page.Size, orderby, where_audit)
+	var pagingResult workflow.ActiMyPagingResultVM
+	var myTasksRetWithTimes []workflow.ActiMyTasksRetWithTimeVM
+	actisvc := workflow.GetActivitiService(utils.DBE)
 
-	//报告签发
-	where_sign := where + " and a.CheckStatus = 4 and a.CreateReportStatus = 1 "
-	signtotal, signlist := svc.GetDataEntryWait(this.User.AccCode+LimsDateEntryName, this.User.AccCode+LimsTaskBalanceName, this.User.AccCode+LimsEntrustMainName, page.CurrentPage, page.Size, orderby, where_sign)
+	pagingResult = actisvc.GetMyAllTypePagingFinishedTasksWithTime(this.User.Id, page.CurrentPage, page.Size, wfNames, "", "")
+	myTasksRetWithTimes = pagingResult.TaskList
+
+	var todoList []limsdataentry.LimsDateEntryModel
+	svc := limsindex.GetLimsIndexService(utils.DBE)
+	for _,item := range myTasksRetWithTimes {
+		var entry limsdataentry.LimsDateEntryModel
+		where := "a.id = " + item.BusinessKey
+		entry = svc.GetDataEntryWait(this.User.AccCode+LimsDateEntryName, this.User.AccCode+LimsTaskBalanceName, this.User.AccCode+LimsEntrustMainName, "a.Id desc", where)
+		entry.ActCreateOn = item.CreateTime
+		todoList = append(todoList, entry)
+	}
 
-	this.Data["json"] = WaittingModel{entrytotal, entrylist, checktotal, checklist, audittotal, auditlist, signtotal, signlist}
+	sort.Slice(todoList, func(i, j int) bool {
+		return todoList[i].ActCreateOn > todoList[j].ActCreateOn
+	})
+	fmt.Println(todoList)
+	var datainfo DataInfo
+	datainfo.Items = todoList
+	datainfo.CurrentItemCount = pagingResult.Total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
 	this.ServeJSON()
 }
 

+ 3 - 3
src/dashoo.cn/frontend_web/nuxt.config.ignore.js

@@ -162,9 +162,9 @@ module.exports = {
 	  baseURL: '//localhost:10091/api/'
   },
   ignore: [
-      'pages/lims/report*/**/*.*',
-     'pages/lims/createreport/**/*.*',
-     'pages/lims/dataentry/**/*.*',
+      // 'pages/lims/report*/**/*.*',
+     // 'pages/lims/createreport/**/*.*',
+     // 'pages/lims/dataentry/**/*.*',
      'pages/lims/deliver/**/*.*',
      'pages/lims/drillingdaily/**/*.*',
      'pages/lims/oiltestingdaily/**/*.*',

+ 220 - 150
src/dashoo.cn/frontend_web/src/pages/index.vue

@@ -9,18 +9,18 @@
           {{user.Realname}} ]
         </span>
           <span style="float: right; margin-right:10px;">
-          <el-form ref="form" :inline="true" style="float: right;">
-            <el-form-item label="查询日期">
-              <el-date-picker v-model="Getime" size="mini" type="daterange" range-separator="至" start-placeholder="开始日期"
-                              end-placeholder="结束日期" style="width:200px" @change="getNewData"></el-date-picker>
-            </el-form-item>
-            <el-form-item>
-              <el-select v-if="allshow" v-model="Department" clearable filterable placeholder="请选择公司" size="mini" style="width: 110px"
-                         @change="getNewData">
-                <el-option v-for="item in departmentList" :key="item.value" :label="item.Name" :value="item.Id"></el-option>
-              </el-select>
-            </el-form-item>
-          </el-form>
+          <!--<el-form ref="form" :inline="true" style="float: right;">-->
+            <!--<el-form-item label="查询日期">-->
+              <!--<el-date-picker v-model="Getime" size="mini" type="daterange" range-separator="至" start-placeholder="开始日期"-->
+                              <!--end-placeholder="结束日期" style="width:200px" @change="getNewData"></el-date-picker>-->
+            <!--</el-form-item>-->
+            <!--<el-form-item>-->
+              <!--<el-select v-if="allshow" v-model="Department" clearable filterable placeholder="请选择公司" size="mini" style="width: 110px"-->
+                         <!--@change="getNewData">-->
+                <!--<el-option v-for="item in departmentList" :key="item.value" :label="item.Name" :value="item.Id"></el-option>-->
+              <!--</el-select>-->
+            <!--</el-form-item>-->
+          <!--</el-form>-->
         </span>
           <el-form ref="form" :inline="true" style="float: left; margin-left:20px;">
             <el-form-item>
@@ -39,6 +39,14 @@
                 </el-button>
               </router-link>
             </el-form-item>
+            <el-form-item>
+              <router-link :to="'/lims/dataentry/tacktodo'">
+                <el-button type="primary" plain style="margin-left:5px;" size="mini" v-if="!tjz && !allshow && permissions[permissionscode.audit]">
+                  数据预审
+                  <span style="color:#0000FF">【{{usertotal.AuditTotal}}】</span>
+                </el-button>
+              </router-link>
+            </el-form-item>
             <el-form-item>
               <router-link :to="'/lims/dataentry/tacktodo'">
                 <el-button type="primary" plain style="margin-left:5px;" size="mini" v-if="!allshow && permissions[permissionscode.audit]">
@@ -58,107 +66,117 @@
           </el-form>
         </el-card>
 
-        <el-row :gutter="5">
-          <el-col :span="12">
-            <el-card class="box-card" style="height: calc(100vh - 350px);" v-if="!allshow">
-              <div slot="header">
-                <legend style="color:#436EEE"></legend>
-                <i class="icon icon-database"> 待办工作</i>
-              </div>
-              <el-table :data="WaitData" size="small" border height="calc(100vh - 470px)">
-                <el-table-column label="待办工作跳转" width="100" align="center" fixed>
-                  <template slot-scope="scope">
-                    <el-button type="primary" plain size="mini" @click="gopage(scope.row)">详情</el-button>
-                  </template>
-                </el-table-column>
-                <el-table-column prop="EntrustNo" sortable min-width="100" label="委托单号" align="center"></el-table-column>
-                <el-table-column prop="CustomerName" sortable min-width="90" label="委托方名称" align="center"></el-table-column>
-                <el-table-column prop="TestDetail" sortable min-width="100" label="检测项目" align="center"></el-table-column>
-                <el-table-column prop="CheckStatus" sortable min-width="90" label="代办工作" align="center">
-                  <template slot-scope="scope">
-                    <el-tag size="small" v-show="scope.row.CheckStatus=='0'" type="danger">数据录入</el-tag>
-                    <el-tag size="small" v-show="scope.row.CheckStatus=='1'" type="success">数据校核</el-tag>
-                    <el-tag size="small" v-show="scope.row.CheckStatus=='2'" type="info">数据审批</el-tag>
-                    <el-tag size="small" v-show="scope.row.ReportStatus=='4'" type="warning">报告签发</el-tag>
-                  </template>
-                </el-table-column>
-              </el-table>
-            </el-card>
-          </el-col>
+        <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
+          <el-tab-pane label="待办任务" name="first">
+            <el-table :data="WaitData" size="mini" border :stripe="true" style="width: 100%">
+              <el-table-column label="待办工作跳转" width="100" align="center" fixed>
+                <template slot-scope="scope">
+                  <el-button type="primary" plain size="mini" @click="gopage(scope.row)">详情</el-button>
+                </template>
+              </el-table-column>
+              <el-table-column prop="EntrustNo" sortable min-width="100" label="委托单号" align="center"></el-table-column>
+              <el-table-column prop="CustomerName" sortable min-width="90" label="委托方名称" align="center"></el-table-column>
+              <el-table-column prop="TestDetail" sortable min-width="100" label="检测项目" align="center"></el-table-column>
+              <el-table-column prop="CheckStatus" sortable min-width="90" label="代办工作" align="center">
+                <template slot-scope="scope">
+                  <el-tag size="small" v-show="scope.row.CheckStatus=='0'" type="danger">数据录入</el-tag>
+                  <el-tag size="small" v-show="scope.row.CheckStatus=='1'" type="success">数据校核</el-tag>
+                  <el-tag size="small" v-show="scope.row.CheckStatus=='2'" type="info">数据审批</el-tag>
+                  <el-tag size="small" v-show="scope.row.ReportStatus=='4'" type="warning">报告签发</el-tag>
+                </template>
+              </el-table-column>
+            </el-table>
+            <el-pagination @size-change="handleSizeChange"
+                           @current-change="handleCurrentChange"
+                           :current-page="currentPage"
+                           :page-sizes="[10, 15, 20, 25]"
+                           :page-size="size"
+                           layout="total, sizes, prev, pager, next, jumper"
+                           :total="currentItemCount">
+            </el-pagination>
+          </el-tab-pane>
+          <el-tab-pane label="已办任务" name="second">
+            <el-table :data="DoneData" size="mini" border :stripe="true" style="width: 100%">
+              <el-table-column prop="EntrustNo" sortable min-width="100" label="委托单号" align="center"></el-table-column>
+              <el-table-column prop="CustomerName" sortable min-width="100" label="委托方名称" align="center"></el-table-column>
+              <el-table-column prop="TestDetail" sortable min-width="100" label="检测项目" align="center"></el-table-column>
+              <el-table-column prop="CheckStatus" sortable min-width="100" label="已办工作" align="center">
+                <template slot-scope="scope">
+                  <el-tag size="small" v-show="scope.row.CreateUserId == user.id&&scope.row.CheckStatus=='1'" type="danger">数据录入</el-tag>
+                  <el-tag size="small" v-show="scope.row.JHUserId == user.id&&(scope.row.CheckStatus=='2'||scope.row.CheckStatus=='3')"
+                          type="success">数据校核</el-tag>
+                  <el-tag size="small" v-show="scope.row.CheckUserId == user.id&&(scope.row.CheckStatus=='4'||scope.row.CheckStatus=='5')"
+                          type="info">数据审批</el-tag>
+                  <el-tag size="small" v-show="scope.row.ReportStatus != '0'" type="warning">报告签发</el-tag>
+                </template>
+              </el-table-column>
+            </el-table>
+            <el-pagination @size-change="handleSizeChangeFinished"
+                           @current-change="handleCurrentChangeFinished"
+                           :current-page="currentPageFinished"
+                           :page-sizes="[10, 15, 20, 25]"
+                           :page-size="sizeFinished"
+                           layout="total, sizes, prev, pager, next, jumper"
+                           :total="currentItemCountFinished">
+            </el-pagination>
+          </el-tab-pane>
+        </el-tabs>
+
 
-          <el-col :span="12">
-            <el-card class="box-card" style="height: calc(100vh - 350px);" v-if="!allshow">
-              <div slot="header">
-                <legend style="color:#436EEE"></legend>
-                <i class="icon icon-database"> 已办工作</i>
-              </div>
-              <el-table :data="DoneData" size="small" border height="calc(100vh - 470px)">
-                <el-table-column prop="EntrustNo" sortable min-width="100" label="委托单号" align="center"></el-table-column>
-                <el-table-column prop="CustomerName" sortable min-width="100" label="委托方名称" align="center"></el-table-column>
-                <el-table-column prop="TestDetail" sortable min-width="100" label="检测项目" align="center"></el-table-column>
-                <el-table-column prop="CheckStatus" sortable min-width="100" label="已办工作" align="center">
-                  <template slot-scope="scope">
-                    <el-tag size="small" v-show="scope.row.CreateUserId == user.id&&scope.row.CheckStatus=='1'" type="danger">数据录入</el-tag>
-                    <el-tag size="small" v-show="scope.row.JHUserId == user.id&&(scope.row.CheckStatus=='2'||scope.row.CheckStatus=='3')"
-                            type="success">数据校核</el-tag>
-                    <el-tag size="small" v-show="scope.row.CheckUserId == user.id&&(scope.row.CheckStatus=='4'||scope.row.CheckStatus=='5')"
-                            type="info">数据审批</el-tag>
-                    <el-tag size="small" v-show="scope.row.ReportStatus != '0'" type="warning">报告签发</el-tag>
-                  </template>
-                </el-table-column>
-              </el-table>
-            </el-card>
-          </el-col>
-        </el-row>
 
-        <el-row>
-          <el-card style="margin-top: 5px; height:460.5px; width: 100%">
-            <div class="salesCard">
-              <el-col :span="16" style="margin-top: -10px">
-                <el-tabs size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">
-                  <el-tab-pane label="检测任务">
-                    <div v-if="EntrustX.length === 0">无显示数据,可在
-                      <router-link :to="'/lims/tasksentrust/addentrust/operation'">检测任务</router-link> 中录入</div>
-                    <div id="Entrustid" style="height:380px; margin-left:-25px; margin-top:-10px; min-width:400px; width: 900px"></div>
-                  </el-tab-pane>
-                  <el-tab-pane label="数据录入">
-                    <div v-if="DataEntryX.length === 0">无显示数据,可在
-                      <router-link :to="'/lims/dataentry/tacktodo'">数据录入</router-link> 中录入</div>
-                    <div id="Dataentryid" style="height:380px; margin-left:-25px; margin-top:-10px; min-width:400px; width: 900px"></div>
-                  </el-tab-pane>
-                </el-tabs>
-              </el-col>
-              <el-col :span="8" style="float: right; margin-top: -10px">
-                <div v-if="ProjectList.length === 0">无显示数据</div>
-                <ranking-list title="检测报告" :list="ProjectList" />
-              </el-col>
-            </div>
-          </el-card>
-        </el-row>
+        <!--<el-row :gutter="5">-->
+          <!--<el-col :span="12">-->
+            <!--<el-card class="box-card" style="height: calc(100vh - 350px);" v-if="!allshow">-->
+              <!--<div slot="header">-->
+                <!--<legend style="color:#436EEE"></legend>-->
+                <!--<i class="icon icon-database"> 待办工作</i>-->
+              <!--</div>-->
+              <!--<el-table :data="WaitData" size="small" border height="calc(100vh - 470px)">-->
+                <!--<el-table-column label="待办工作跳转" width="100" align="center" fixed>-->
+                  <!--<template slot-scope="scope">-->
+                    <!--<el-button type="primary" plain size="mini" @click="gopage(scope.row)">详情</el-button>-->
+                  <!--</template>-->
+                <!--</el-table-column>-->
+                <!--<el-table-column prop="EntrustNo" sortable min-width="100" label="委托单号" align="center"></el-table-column>-->
+                <!--<el-table-column prop="CustomerName" sortable min-width="90" label="委托方名称" align="center"></el-table-column>-->
+                <!--<el-table-column prop="TestDetail" sortable min-width="100" label="检测项目" align="center"></el-table-column>-->
+                <!--<el-table-column prop="CheckStatus" sortable min-width="90" label="代办工作" align="center">-->
+                  <!--<template slot-scope="scope">-->
+                    <!--<el-tag size="small" v-show="scope.row.CheckStatus=='0'" type="danger">数据录入</el-tag>-->
+                    <!--<el-tag size="small" v-show="scope.row.CheckStatus=='1'" type="success">数据校核</el-tag>-->
+                    <!--<el-tag size="small" v-show="scope.row.CheckStatus=='2'" type="info">数据审批</el-tag>-->
+                    <!--<el-tag size="small" v-show="scope.row.ReportStatus=='4'" type="warning">报告签发</el-tag>-->
+                  <!--</template>-->
+                <!--</el-table-column>-->
+              <!--</el-table>-->
+            <!--</el-card>-->
+          <!--</el-col>-->
 
-        <el-row :gutter="5">
-          <el-col :span="12">
-            <el-card :bordered="false" style="margin-top: 5px">
-              <div slot="header">
-                <legend style="color:#436EEE"></legend>
-                <i class="icon icon-database"> 设备使用记录统计</i>
-              </div>
-              <div v-if="InstrumentX.length === 0">无显示数据</div>
-              <div id="Instrumentid" style="height:366.5px; min-width:400px; width: 100%"></div>
-            </el-card>
-          </el-col>
+          <!--<el-col :span="12">-->
+            <!--<el-card class="box-card" style="height: calc(100vh - 350px);" v-if="!allshow">-->
+              <!--<div slot="header">-->
+                <!--<legend style="color:#436EEE"></legend>-->
+                <!--<i class="icon icon-database"> 已办工作</i>-->
+              <!--</div>-->
+              <!--<el-table :data="DoneData" size="small" border height="calc(100vh - 470px)">-->
+                <!--<el-table-column prop="EntrustNo" sortable min-width="100" label="委托单号" align="center"></el-table-column>-->
+                <!--<el-table-column prop="CustomerName" sortable min-width="100" label="委托方名称" align="center"></el-table-column>-->
+                <!--<el-table-column prop="TestDetail" sortable min-width="100" label="检测项目" align="center"></el-table-column>-->
+                <!--<el-table-column prop="CheckStatus" sortable min-width="100" label="已办工作" align="center">-->
+                  <!--<template slot-scope="scope">-->
+                    <!--<el-tag size="small" v-show="scope.row.CreateUserId == user.id&&scope.row.CheckStatus=='1'" type="danger">数据录入</el-tag>-->
+                    <!--<el-tag size="small" v-show="scope.row.JHUserId == user.id&&(scope.row.CheckStatus=='2'||scope.row.CheckStatus=='3')"-->
+                            <!--type="success">数据校核</el-tag>-->
+                    <!--<el-tag size="small" v-show="scope.row.CheckUserId == user.id&&(scope.row.CheckStatus=='4'||scope.row.CheckStatus=='5')"-->
+                            <!--type="info">数据审批</el-tag>-->
+                    <!--<el-tag size="small" v-show="scope.row.ReportStatus != '0'" type="warning">报告签发</el-tag>-->
+                  <!--</template>-->
+                <!--</el-table-column>-->
+              <!--</el-table>-->
+            <!--</el-card>-->
+          <!--</el-col>-->
+        <!--</el-row>-->
 
-          <el-col :span="12">
-            <el-card :bordered="false" style="margin-top: 5px">
-              <div slot="header">
-                <legend style="color:#436EEE"></legend>
-                <i class="icon icon-database"> 委托方统计</i>
-              </div>
-              <div v-if="CustomerTitle.length === 0">无显示数据</div>
-              <div id="Customerid" style="width:100%; height:366.5px;"></div>
-            </el-card>
-          </el-col>
-        </el-row>
       </div>
     </div>
   </no-ssr>
@@ -197,15 +215,24 @@
       ChartCard,
       SalesData
     },
-    data() {
+    data () {
       return {
+        activeName: 'first',
+        tjz: false,
         currentPage: 1,
-        pageSize: 50,
+        currentItemCount: 0,
+        size: 10,
+        pageSize: 10,
+        // finished
+        // 分页参数
+        sizeFinished: 10,
+        currentPageFinished: 1,
+        currentItemCountFinished: 0,
         downloading: true,
         usertotal: {},
         DoneTotal: {},
-        WaitData: [], //待办事项列表数据
-        DoneData: [], //已办工作列表数据
+        WaitData: [], // 待办事项列表数据
+        DoneData: [], // 已办工作列表数据
         department: '',
         Department: '',
         departmentList: [{
@@ -235,13 +262,13 @@
         Dataentryid: null,
         Customerid: null,
         Instrumentid: null,
-        CustomerTitle: [], //委托方
-        CustomerData: [], //委托方数据
-        EntrustX: [], //检测任务月份
-        EntrustY: [], //检测任务数目
-        DataEntryX: [], //数据录入月份
-        DataEntryY: [], //数据录入数目
-        InstrumentX: [], //设备使用记录
+        CustomerTitle: [], // 委托方
+        CustomerData: [], // 委托方数据
+        EntrustX: [], // 检测任务月份
+        EntrustY: [], // 检测任务数目
+        DataEntryX: [], // 数据录入月份
+        DataEntryY: [], // 数据录入数目
+        InstrumentX: [], // 设备使用记录
         InstrumentY: [],
         reportColor: ['#188df0'],
         instrumentColor: ['#FA7080', '#FFE373', '#816FD7', '#FF9B73', '#FFF273', '#FFBFB2', '#F690BB', '#1E90FF',
@@ -260,24 +287,24 @@
           entry: 'lims.dataentry.add',
           check: 'lims.dataentry.approve',
           audit: 'lims.dataentry.makesure',
-          sign: 'lims.report.send',
+          sign: 'lims.report.send'
         },
         permissions: {
           'lims.dataentry.add': false,
           'lims.dataentry.approve': false,
           'lims.dataentry.makesure': false,
-          'lims.report.send': false,
+          'lims.report.send': false
         },
 
         docTemplateDictList: [],
-        docTempType: '',
+        docTempType: ''
       }
     },
-    created() {
-      //this.initDatas()
-      this.getPermissions() //权限
+    created () {
+      // this.initDatas()
+      this.getPermissions() // 权限
       this.getShowPermissions()
-      this.getDictList() //获取模板
+      this.getDictList() // 获取模板
       let _this = this
       _this.user.photo = _this.authUser.Profile.Photo
       _this.user.name = _this.authUser.Profile.name
@@ -285,11 +312,34 @@
       _this.user.host = _this.authUser.Profile.Host
       _this.user.id = _this.authUser.Profile.Id
     },
-    computed: mapGetters({
-      authUser: 'authUser'
-    }),
+
     methods: {
-      initData() {
+      handleClick (tab) {
+        if (tab.index === '0') {
+          this.initData()
+        } else {
+          this.initDatas()
+        }
+      },
+      // 判断组织结构确定流程
+      getOrganizeListById () {
+        let _this = this
+        _this.$axios.get('/limsentrust/getstyle')
+          .then(
+            function (response) {
+              _this.departmentList = response.data.items
+              let arr = _this.departmentList.split(',')
+              for (var i = 0; i < arr.length; i++) {
+                if (_this.departmentId == arr[i]) {
+                  _this.tjz = true
+                  // _this.mainForm.EntrustTypeId = 329 //委托检测
+                }
+              }
+            }).catch(function (error) {
+            console.log(error)
+          })
+      },
+      initData () {
         let _this = this
         // paginate
         const params = {
@@ -297,38 +347,40 @@
           _size: this.pageSize
         }
         this.$axios.get('/limsindex/getwaiting', {
-            params
-          })
+          params
+        })
           .then(res => {
-            _this.usertotal = res.data
+            _this.WaitData = res.data.items
+            _this.currentItemCount = res.data.currentItemCount
             _this.downloading = false
             _this.getProject()
             _this.getEntrust()
             _this.getDataEntry()
             _this.getInstrument()
             _this.getCustomer()
-            _this.pushData()
+            // _this.pushData()
           })
           .catch(err => {
             // handle error
             console.error(err)
           })
       },
-      initDatas() {
+      initDatas () {
         let _this = this
         // paginate
         const params = {
-          _currentPage: this.currentPage,
-          _size: this.pageSize,
+          _currentPage: this.currentPageFinished,
+          _size: this.sizeFinished,
           whtintime: this.formatDateTime(this.WhtinTime)
         }
         this.$axios.get('/limsindex/getdone', {
-            params
-          })
+          params
+        })
           .then(res => {
-            _this.DoneTotal = res.data
+            _this.DoneData = res.data.items
+            _this.currentItemCountFinished = res.data.currentItemCount
             _this.downloading = false
-            _this.pushDoneData()
+            // _this.pushDoneData()
           })
           .catch(err => {
             // handle error
@@ -913,26 +965,26 @@
             console.error(err)
           })
       },
-      getShowPermissions() {
+      getShowPermissions () {
         let _this = this
-        if (_this.authUser.Profile.DepartmentId == "100000054") {
+        if (_this.authUser.Profile.DepartmentId === '100000054') {
           _this.allshow = true
           _this.Department = 100000150
         } else {
           this.$axios.get('/limsentrust/getshow', {})
             .then(res => {
               _this.whichshow = res.data.items
-              if (res.data.items == 'tjz') {
+              if (res.data.items === 'tjz') {
                 _this.Department = 100000150
-              } else if (res.data.items == 'yx') {
+              } else if (res.data.items === 'yx') {
                 _this.Department = 100000151
-              } else if (res.data.items == 'jlny') {
+              } else if (res.data.items === 'jlny') {
                 _this.Department = 100000152
-              } else if (res.data.items == 'gcjd') {
+              } else if (res.data.items === 'gcjd') {
                 _this.Department = 100000153
-              } else if (res.data.items == 'zj') {
+              } else if (res.data.items === 'zj') {
                 _this.Department = 100000166
-              } else if (res.data.items == 'wzjy') {
+              } else if (res.data.items === 'wzjy') {
                 _this.Department = 100000167
               }
             })
@@ -944,6 +996,24 @@
         _this.initData()
         _this.initDatas()
       },
+      handleCurrentChangeFinished (value) {
+        this.currentPageFinished = value
+        this.initDatas()
+      },
+      handleSizeChangeFinished (value) {
+        this.sizeFinished = value
+        this.currentPageFinished = 1
+        this.initDatas()
+      },
+      handleCurrentChange (value) {
+        this.currentPage = value
+        this.initData()
+      },
+      handleSizeChange (value) {
+        this.size = value
+        this.currentPage = 1
+        this.initData()
+      }
     }
   }
 

+ 960 - 0
src/dashoo.cn/frontend_web/src/pages/index2.vue

@@ -0,0 +1,960 @@
+<template>
+  <no-ssr placeholder="数据拼命读取中,请稍候。。。">
+    <div style="width: 100%; overflow-y: auto" v-loading="downloading">
+      <div slot="header" style="padding-top: 0px">
+        <el-card>
+        <span style="float: left; margin-top:10px;">
+          <img v-if="user.photo" :src="'http://'+user.host+user.photo" class="avatar-index">
+          <img v-else class="avatar-index" src="../assets/img/avatar-default.jpg" :alt="user.name"> &nbsp;[
+          {{user.Realname}} ]
+        </span>
+          <span style="float: right; margin-right:10px;">
+          <el-form ref="form" :inline="true" style="float: right;">
+            <el-form-item label="查询日期">
+              <el-date-picker v-model="Getime" size="mini" type="daterange" range-separator="至" start-placeholder="开始日期"
+                              end-placeholder="结束日期" style="width:200px" @change="getNewData"></el-date-picker>
+            </el-form-item>
+            <el-form-item>
+              <el-select v-if="allshow" v-model="Department" clearable filterable placeholder="请选择公司" size="mini" style="width: 110px"
+                         @change="getNewData">
+                <el-option v-for="item in departmentList" :key="item.value" :label="item.Name" :value="item.Id"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-form>
+        </span>
+          <el-form ref="form" :inline="true" style="float: left; margin-left:20px;">
+            <el-form-item>
+              <router-link :to="'/lims/dataentry/tacktodo'">
+                <el-button type="primary" plain style="margin-left:5px;" size="mini" v-if="!allshow && permissions[permissionscode.entry]">
+                  数据录入
+                  <span style="color:#0000FF">【{{usertotal.EntryTotal}}】</span>
+                </el-button>
+              </router-link>
+            </el-form-item>
+            <el-form-item>
+              <router-link :to="'/lims/dataentry/tacktodo'">
+                <el-button type="primary" plain style="margin-left:5px;" size="mini" v-if="!allshow && permissions[permissionscode.check]">
+                  数据校核
+                  <span style="color:#0000FF">【{{usertotal.CheckTotal}}】</span>
+                </el-button>
+              </router-link>
+            </el-form-item>
+            <el-form-item>
+              <router-link :to="'/lims/dataentry/tacktodo'">
+                <el-button type="primary" plain style="margin-left:5px;" size="mini" v-if="!allshow && permissions[permissionscode.audit]">
+                  数据审批
+                  <span style="color:#0000FF">【{{usertotal.AuditTotal}}】</span>
+                </el-button>
+              </router-link>
+            </el-form-item>
+            <el-form-item>
+              <router-link :to="'/lims/createreport/reporttodo'">
+                <el-button type="primary" plain style="margin-left:5px;" size="mini" v-if="!allshow && permissions[permissionscode.sign]">
+                  报告签发
+                  <span style="color:#0000FF">【{{usertotal.SignTotal}}】</span>
+                </el-button>
+              </router-link>
+            </el-form-item>
+          </el-form>
+        </el-card>
+
+        <el-row :gutter="5">
+          <el-col :span="12">
+            <el-card class="box-card" style="height: calc(100vh - 350px);" v-if="!allshow">
+              <div slot="header">
+                <legend style="color:#436EEE"></legend>
+                <i class="icon icon-database"> 待办工作</i>
+              </div>
+              <el-table :data="WaitData" size="small" border height="calc(100vh - 470px)">
+                <el-table-column label="待办工作跳转" width="100" align="center" fixed>
+                  <template slot-scope="scope">
+                    <el-button type="primary" plain size="mini" @click="gopage(scope.row)">详情</el-button>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="EntrustNo" sortable min-width="100" label="委托单号" align="center"></el-table-column>
+                <el-table-column prop="CustomerName" sortable min-width="90" label="委托方名称" align="center"></el-table-column>
+                <el-table-column prop="TestDetail" sortable min-width="100" label="检测项目" align="center"></el-table-column>
+                <el-table-column prop="CheckStatus" sortable min-width="90" label="代办工作" align="center">
+                  <template slot-scope="scope">
+                    <el-tag size="small" v-show="scope.row.CheckStatus=='0'" type="danger">数据录入</el-tag>
+                    <el-tag size="small" v-show="scope.row.CheckStatus=='1'" type="success">数据校核</el-tag>
+                    <el-tag size="small" v-show="scope.row.CheckStatus=='2'" type="info">数据审批</el-tag>
+                    <el-tag size="small" v-show="scope.row.ReportStatus=='4'" type="warning">报告签发</el-tag>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-card>
+          </el-col>
+
+          <el-col :span="12">
+            <el-card class="box-card" style="height: calc(100vh - 350px);" v-if="!allshow">
+              <div slot="header">
+                <legend style="color:#436EEE"></legend>
+                <i class="icon icon-database"> 已办工作</i>
+              </div>
+              <el-table :data="DoneData" size="small" border height="calc(100vh - 470px)">
+                <el-table-column prop="EntrustNo" sortable min-width="100" label="委托单号" align="center"></el-table-column>
+                <el-table-column prop="CustomerName" sortable min-width="100" label="委托方名称" align="center"></el-table-column>
+                <el-table-column prop="TestDetail" sortable min-width="100" label="检测项目" align="center"></el-table-column>
+                <el-table-column prop="CheckStatus" sortable min-width="100" label="已办工作" align="center">
+                  <template slot-scope="scope">
+                    <el-tag size="small" v-show="scope.row.CreateUserId == user.id&&scope.row.CheckStatus=='1'" type="danger">数据录入</el-tag>
+                    <el-tag size="small" v-show="scope.row.JHUserId == user.id&&(scope.row.CheckStatus=='2'||scope.row.CheckStatus=='3')"
+                            type="success">数据校核</el-tag>
+                    <el-tag size="small" v-show="scope.row.CheckUserId == user.id&&(scope.row.CheckStatus=='4'||scope.row.CheckStatus=='5')"
+                            type="info">数据审批</el-tag>
+                    <el-tag size="small" v-show="scope.row.ReportStatus != '0'" type="warning">报告签发</el-tag>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-card>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-card style="margin-top: 5px; height:460.5px; width: 100%">
+            <div class="salesCard">
+              <el-col :span="16" style="margin-top: -10px">
+                <el-tabs size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">
+                  <el-tab-pane label="检测任务">
+                    <div v-if="EntrustX.length === 0">无显示数据,可在
+                      <router-link :to="'/lims/tasksentrust/addentrust/operation'">检测任务</router-link> 中录入</div>
+                    <div id="Entrustid" style="height:380px; margin-left:-25px; margin-top:-10px; min-width:400px; width: 900px"></div>
+                  </el-tab-pane>
+                  <el-tab-pane label="数据录入">
+                    <div v-if="DataEntryX.length === 0">无显示数据,可在
+                      <router-link :to="'/lims/dataentry/tacktodo'">数据录入</router-link> 中录入</div>
+                    <div id="Dataentryid" style="height:380px; margin-left:-25px; margin-top:-10px; min-width:400px; width: 900px"></div>
+                  </el-tab-pane>
+                </el-tabs>
+              </el-col>
+              <el-col :span="8" style="float: right; margin-top: -10px">
+                <div v-if="ProjectList.length === 0">无显示数据</div>
+                <ranking-list title="检测报告" :list="ProjectList" />
+              </el-col>
+            </div>
+          </el-card>
+        </el-row>
+
+        <el-row :gutter="5">
+          <el-col :span="12">
+            <el-card :bordered="false" style="margin-top: 5px">
+              <div slot="header">
+                <legend style="color:#436EEE"></legend>
+                <i class="icon icon-database"> 设备使用记录统计</i>
+              </div>
+              <div v-if="InstrumentX.length === 0">无显示数据</div>
+              <div id="Instrumentid" style="height:366.5px; min-width:400px; width: 100%"></div>
+            </el-card>
+          </el-col>
+
+          <el-col :span="12">
+            <el-card :bordered="false" style="margin-top: 5px">
+              <div slot="header">
+                <legend style="color:#436EEE"></legend>
+                <i class="icon icon-database"> 委托方统计</i>
+              </div>
+              <div v-if="CustomerTitle.length === 0">无显示数据</div>
+              <div id="Customerid" style="width:100%; height:366.5px;"></div>
+            </el-card>
+          </el-col>
+        </el-row>
+      </div>
+    </div>
+  </no-ssr>
+</template>
+
+<script>
+  import echarts from 'echarts'
+  import {
+    mapGetters
+  } from 'vuex'
+
+  import ChartCard from '../components/card/ChartCard'
+  import MiniArea from '../components/chart/MiniArea'
+  import MiniBar from '../components/chart/MiniBar'
+  import MiniProgress from '../components/chart/MiniProgress'
+  import Bar from '../components/chart/Bar'
+  import RankingList from '../components/chart/RankingList'
+  import Trend from '../components/chart/Trend'
+  import docTemplateApi from '@/api/lims/docTemplate'
+  import SalesData from '../components/chart/SalesData'
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'index',
+    components: {
+      Trend,
+      RankingList,
+      Bar,
+      MiniProgress,
+      MiniBar,
+      MiniArea,
+      ChartCard,
+      SalesData
+    },
+    data() {
+      return {
+        currentPage: 1,
+        pageSize: 50,
+        downloading: true,
+        usertotal: {},
+        DoneTotal: {},
+        WaitData: [], //待办事项列表数据
+        DoneData: [], //已办工作列表数据
+        department: '',
+        Department: '',
+        departmentList: [{
+          Id: 100000150,
+          Name: '特检站'
+        }, {
+          Id: 100000151,
+          Name: '宇信公司'
+        }, {
+          Id: 100000152,
+          Name: '计量能源站'
+        }, {
+          Id: 100000153,
+          Name: '工程监督中心'
+        }, {
+          Id: 100000166,
+          Name: '质检中心'
+        }, {
+          Id: 100000167,
+          Name: '物资商品检验所'
+        }],
+        Getime: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 12000), new Date()],
+        WhtinTime: new Date(new Date().getTime() - 3600 * 1000 * 24 * 7),
+        ProjectList: [],
+        InstrumentList: [],
+        Entrustid: null,
+        Dataentryid: null,
+        Customerid: null,
+        Instrumentid: null,
+        CustomerTitle: [], //委托方
+        CustomerData: [], //委托方数据
+        EntrustX: [], //检测任务月份
+        EntrustY: [], //检测任务数目
+        DataEntryX: [], //数据录入月份
+        DataEntryY: [], //数据录入数目
+        InstrumentX: [], //设备使用记录
+        InstrumentY: [],
+        reportColor: ['#188df0'],
+        instrumentColor: ['#FA7080', '#FFE373', '#816FD7', '#FF9B73', '#FFF273', '#FFBFB2', '#F690BB', '#1E90FF',
+          '#000080'
+        ],
+        user: {
+          id: '',
+          photo: '',
+          name: '',
+          Realname: '',
+          host: ''
+        },
+        allshow: false,
+        whichshow: '',
+        permissionscode: {
+          entry: 'lims.dataentry.add',
+          check: 'lims.dataentry.approve',
+          audit: 'lims.dataentry.makesure',
+          sign: 'lims.report.send',
+        },
+        permissions: {
+          'lims.dataentry.add': false,
+          'lims.dataentry.approve': false,
+          'lims.dataentry.makesure': false,
+          'lims.report.send': false,
+        },
+
+        docTemplateDictList: [],
+        docTempType: '',
+      }
+    },
+    created() {
+      //this.initDatas()
+      this.getPermissions() //权限
+      this.getShowPermissions()
+      this.getDictList() //获取模板
+      let _this = this
+      _this.user.photo = _this.authUser.Profile.Photo
+      _this.user.name = _this.authUser.Profile.name
+      _this.user.Realname = _this.authUser.Profile.Realname
+      _this.user.host = _this.authUser.Profile.Host
+      _this.user.id = _this.authUser.Profile.Id
+    },
+    computed: mapGetters({
+      authUser: 'authUser'
+    }),
+    methods: {
+      initData() {
+        let _this = this
+        // paginate
+        const params = {
+          _currentPage: this.currentPage,
+          _size: this.pageSize
+        }
+        this.$axios.get('/limsindex/getwaiting', {
+            params
+          })
+          .then(res => {
+            _this.usertotal = res.data
+            _this.downloading = false
+            _this.getProject()
+            _this.getEntrust()
+            _this.getDataEntry()
+            _this.getInstrument()
+            _this.getCustomer()
+            _this.pushData()
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      initDatas() {
+        let _this = this
+        // paginate
+        const params = {
+          _currentPage: this.currentPage,
+          _size: this.pageSize,
+          whtintime: this.formatDateTime(this.WhtinTime)
+        }
+        this.$axios.get('/limsindex/getdone', {
+            params
+          })
+          .then(res => {
+            _this.DoneTotal = res.data
+            _this.downloading = false
+            _this.pushDoneData()
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      pushData() {
+        let _this = this
+        if (_this.usertotal.EntryList.length && _this.usertotal.EntryList.length > 0) {
+          _this.WaitData = _this.WaitData.concat(_this.usertotal.EntryList)
+        }
+        if (_this.usertotal.CheckList.length && _this.usertotal.CheckList.length > 0) {
+          _this.WaitData = _this.WaitData.concat(_this.usertotal.CheckList)
+        }
+        if (_this.usertotal.AuditList.length && _this.usertotal.AuditList.length > 0) {
+          _this.WaitData = _this.WaitData.concat(_this.usertotal.AuditList)
+        }
+        if (_this.usertotal.SignList.length && _this.usertotal.SignList.length > 0) {
+          _this.WaitData = _this.WaitData.concat(_this.usertotal.SignList)
+        }
+      },
+      pushDoneData() {
+        this.$axios.get('/limsdataentry/list', {}).then(res => {
+          if (res.data.items) {
+            this.DoneData = this.DoneData.concat(res.data.items)
+          }
+          this.$axios.get('/createreport/list', {}).then(res => {
+              if (res.data.items) {
+                this.DoneData = this.DoneData.concat(res.data.items)
+              }
+            })
+            .catch(err => {
+              // handle error
+              console.error(err)
+            })
+        })
+        // let _this = this
+        // if (_this.DoneTotal.EntryList.length && _this.DoneTotal.EntryList.length > 0) {
+        //   _this.DoneData = _this.DoneData.concat(_this.DoneTotal.EntryList)
+        // }
+        // if (_this.DoneTotal.CheckList.length && _this.DoneTotal.CheckList.length > 0) {
+        //   _this.DoneData = _this.DoneData.concat(_this.DoneTotal.CheckList)
+        // }
+        // if (_this.DoneTotal.AuditList.length && _this.DoneTotal.AuditList.length > 0) {
+        //   _this.DoneData = _this.DoneData.concat(_this.DoneTotal.AuditList)
+        // }
+        // if (_this.DoneTotal.SignList.length && _this.DoneTotal.SignList.length > 0) {
+        //   _this.DoneData = _this.DoneData.concat(_this.DoneTotal.SignList)
+        // }
+
+      },
+
+      getNewData() {
+        this.WaitData = [] //待办事项列表
+        //this.DoneData = [] //已办事项列表
+        this.EntrustX = [] //检测任务月份
+        this.EntrustY = [] //检测任务数目
+        this.DataEntryX = [] //数据录入月份
+        this.DataEntryY = [] //数据录入数目
+        this.ProjectList = []
+        this.InstrumentX = []
+        this.InstrumentY = []
+        this.CustomerTitle = [] //委托方
+        this.CustomerData = [] //委托方数据
+        this.initData()
+      },
+      //检测任务柱状图数据获取
+      getEntrust() {
+        let _this = this
+        let getime = []
+        if (!_this.Getime) {
+          _this.Getime = []
+        }
+        // 解析时间
+        if (_this.Getime.length == 2) {
+          _this.Getime[1].setHours(23)
+          _this.Getime[1].setMinutes(59)
+          _this.Getime[1].setSeconds(59)
+          getime.push(_this.formatDateTime(_this.Getime[0]))
+          getime.push(_this.formatDateTime(_this.Getime[1]))
+        }
+        let params = {
+          department: this.Department,
+        }
+        _this.$axios.get('/limsindex/getentrust?getime=' + getime.join(','), {
+            params
+          })
+          .then(res => {
+            for (var i = 0; i < res.data.length; i++) {
+              _this.EntrustX.push(res.data[i].YearName + '年' + res.data[i].MonthName + '月')
+              _this.EntrustY.push(res.data[i].Num)
+            }
+            _this.drawEntrust()
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      drawEntrust() {
+        let _this = this
+        var chartBar = echarts.init(document.getElementById('Entrustid'))
+        chartBar.setOption({
+          title: {
+            text: ''
+          },
+          tooltip: {
+            trigger: 'item',
+            formatter: '({b}) {c}'
+          },
+          xAxis: {
+            data: _this.EntrustX,
+          },
+          yAxis: {},
+          series: [{
+            name: '月份',
+            type: 'bar',
+            label: {
+              normal: {
+                show: false
+              }
+            },
+            data: _this.EntrustY,
+            itemStyle: {
+              normal: {
+                color: function (params) {
+                  var colorList = _this.reportColor
+                  return colorList[params.dataIndex]
+                }
+              }
+            }
+          }]
+        })
+      },
+      //数据录入柱状图数据获取
+      getDataEntry() {
+        let _this = this
+        let getime = []
+        if (!_this.Getime) {
+          _this.Getime = []
+        }
+        // 解析时间
+        if (_this.Getime.length == 2) {
+          _this.Getime[1].setHours(23)
+          _this.Getime[1].setMinutes(59)
+          _this.Getime[1].setSeconds(59)
+          getime.push(_this.formatDateTime(_this.Getime[0]))
+          getime.push(_this.formatDateTime(_this.Getime[1]))
+        }
+        let params = {
+          department: this.Department,
+        }
+        _this.$axios.get('/limsindex/getdata?getime=' + getime.join(','), {
+            params
+          })
+          .then(res => {
+            for (var i = 0; i < res.data.length; i++) {
+              _this.DataEntryX.push(res.data[i].YearName + '年' + res.data[i].MonthName + '月')
+              _this.DataEntryY.push(res.data[i].Num)
+            }
+            _this.drawDataEntry()
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      drawDataEntry() {
+        let _this = this
+        var chartBar = echarts.init(document.getElementById('Dataentryid'))
+        chartBar.setOption({
+          title: {
+            text: ''
+          },
+          tooltip: {
+            trigger: 'item',
+            formatter: '({b}) {c}'
+          },
+          xAxis: {
+            data: _this.DataEntryX,
+          },
+          yAxis: {},
+          series: [{
+            name: '月份',
+            type: 'bar',
+            label: {
+              normal: {
+                show: false
+              }
+            },
+            data: _this.DataEntryY,
+            itemStyle: {
+              normal: {
+                color: function (params) {
+                  var colorList = _this.reportColor
+                  return colorList[params.dataIndex]
+                }
+              }
+            }
+          }]
+        })
+      },
+      //检测报告列表获取获取
+      getProject() {
+        let _this = this
+        let getime = []
+        if (!_this.Getime) {
+          _this.Getime = []
+        }
+        // 解析时间
+        if (_this.Getime.length == 2) {
+          _this.Getime[1].setHours(23)
+          _this.Getime[1].setMinutes(59)
+          _this.Getime[1].setSeconds(59)
+          getime.push(_this.formatDateTime(_this.Getime[0]))
+          getime.push(_this.formatDateTime(_this.Getime[1]))
+        }
+        let params = {
+          department: this.Department,
+        }
+        _this.$axios.get('/limsindex/getproject?getime=' + getime.join(','), {
+            params
+          })
+          .then(res => {
+            for (var i = 0; i < res.data.length; i++) {
+              _this.ProjectList.push({
+                name: res.data[i].Name,
+                total: res.data[i].Num
+              })
+            }
+          }).catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      //设备运行记录图
+      getInstrument() {
+        let _this = this
+        let getime = []
+        if (!_this.Getime) {
+          _this.Getime = []
+        }
+        // 解析时间
+        if (_this.Getime.length == 2) {
+          _this.Getime[1].setHours(23)
+          _this.Getime[1].setMinutes(59)
+          _this.Getime[1].setSeconds(59)
+          getime.push(_this.formatDateTime(_this.Getime[0]))
+          getime.push(_this.formatDateTime(_this.Getime[1]))
+        }
+        let params = {
+          department: this.Department,
+        }
+        _this.$axios.get('/limsindex/getinstrument?getime=' + getime.join(','), {
+            params
+          })
+          .then(res => {
+            // if (res.data == null) {
+            //   _this.$message({
+            //     type: "warning",
+            //     message: "设备使用记录没有符合查询条件的结果!"
+            //   })
+            // } else {
+            for (var i = 0; i < res.data.length; i++) {
+              _this.InstrumentX.push(res.data[i].Name)
+              _this.InstrumentY.push(res.data[i].Num)
+            }
+            // }
+            _this.drawInstrument()
+          }).catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      drawInstrument() {
+        let _this = this
+        var chartBar = echarts.init(document.getElementById('Instrumentid'))
+        chartBar.setOption({
+          title: {
+            text: ''
+          },
+          tooltip: {
+            trigger: 'axis',
+            // formatter: '({b}) {c}'
+            axisPointer: {
+              type: 'shadow'
+            }
+          },
+          grid: {
+            left: '3%',
+            right: '4%',
+            bottom: '3%',
+            containLabel: true
+          },
+          xAxis: {
+            type: 'value',
+            boundaryGap: [0, 0.01],
+          },
+          yAxis: {
+            type: 'category',
+            data: _this.InstrumentX,
+          },
+          series: [{
+            name: '设备名称',
+            type: 'bar',
+            label: {
+              normal: {
+                show: false
+              }
+            },
+            data: _this.InstrumentY,
+            itemStyle: {
+              normal: {
+                color: function (params) {
+                  var colorList = _this.instrumentColor
+                  return colorList[params.dataIndex]
+                }
+              }
+            }
+          }]
+        })
+      },
+
+      //委托方统计环形图获取
+      getCustomer() {
+        let _this = this
+        let getime = []
+        if (!_this.Getime) {
+          _this.Getime = []
+        }
+        // 解析时间
+        if (_this.Getime.length == 2) {
+          _this.Getime[1].setHours(23)
+          _this.Getime[1].setMinutes(59)
+          _this.Getime[1].setSeconds(59)
+          getime.push(_this.formatDateTime(_this.Getime[0]))
+          getime.push(_this.formatDateTime(_this.Getime[1]))
+        }
+        // let params = {
+        //   department: this.Department,
+        // }
+        _this.$axios.get('limsindex/getcustomer?getime=' + getime.join(','), {})
+          .then(res => {
+            // if (res.data == null) {
+            //   _this.$message({
+            //     type: "warning",
+            //     message: "没有符合查询条件的结果!"
+            //   })
+            // } else {
+            for (var i = 0; i < res.data.length; i++) {
+              if (res.data[i].Name === '') {
+                res.data[i].Name = '未知'
+              }
+              if (i < 10) {
+                _this.CustomerTitle.push({
+                  name: res.data[i].Name
+                })
+                _this.CustomerData.push({
+                  name: res.data[i].Name,
+                  value: res.data[i].Num
+                })
+              } else {
+                _this.CustomerData.push({
+                  name: res.data[i].Name,
+                  value: res.data[i].Num
+                })
+              }
+            }
+            // }
+            _this.drawCustomer()
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      drawCustomer() {
+        var chartPie = echarts.init(document.getElementById('Customerid'))
+        chartPie.setOption({
+          title: {
+            text: ''
+          },
+          tooltip: {
+            trigger: 'item',
+            formatter: '{b} {c} ({d}%)'
+          },
+          legend: {
+            orient: 'vertical',
+            left: 'right',
+            itemHeight: 20,
+            itemWidth: 20,
+            data: this.CustomerTitle
+          },
+          color: ['#FA7080', '#FFE373', '#816FD7', '#FF9B73', '#FFF273', '#FFBFB2', '#F690BB', '#1E90FF', '#000080'],
+          series: [{
+            name: '委托方统计',
+            type: 'pie',
+            radius: ['35%', '80%'],
+            label: {
+              normal: {
+                show: false
+              }
+            },
+            data: this.CustomerData
+          }]
+        })
+      },
+
+      //页面跳转
+      gopage(val) {
+        if (val.CheckStatus == '0' || val.CheckStatus == '1' || val.CheckStatus == '2') {
+          this.OpenOrignDataInput(val)
+        } else if (val.CheckStatus == '4') {
+          this.shenHeFunc(val)
+        }
+      },
+      getDictList() {
+        docTemplateApi.getDictList(this.$axios).then(res => {
+          this.docTemplateDictList = res.data;
+        });
+      },
+      //打开数据录入
+      OpenOrignDataInput(row) {
+        let CheckStatus = row.CheckStatus
+        let eid = row.EId
+        let tbid = row.TaskId
+        let DataEntryId = row.Id
+        let datadocId = row.DataDocId
+        let datadoc = row.DataDoc
+        for (let idx in this.docTemplateDictList) {
+          if (datadocId == this.docTemplateDictList[idx].Id) {
+            this.docTempType = this.docTemplateDictList[idx].TemplateCode
+          }
+        }
+        let queryParams = {
+          eid: eid,
+          tbid: tbid,
+          deid: DataEntryId,
+          datastatus: CheckStatus,
+          datadocId: datadocId
+        };
+        switch (this.docTempType) {
+          //漏电保护
+          case "DAYT.LeakProtect.Detail":
+            this.$router.push({
+              path: '/lims/reportleakprotect/subdata/datalist',
+              query: queryParams,
+            });
+            break;
+            //空气泡沫
+          case "DAYT.Airfoamgenerator.Detail":
+            this.$router.push({
+              path: '/lims/reportairfoamgenerator/subdata/datalist',
+              query: queryParams,
+            });
+            break;
+            //呼吸阀
+          case "DAYT.AtmosValve.Detail":
+            this.$router.push({
+              path: '/lims/reportatmosvalve/subdata/datalist',
+              query: queryParams,
+            });
+            break;
+            //液压安全阀
+          case "DAYT.HydraulicSafe.Detail":
+            this.$router.push({
+              path: '/lims/reporthydraulicsafe/subdata/datalist',
+              query: queryParams,
+            });
+            break;
+            //电气接地
+          case "DAYT.ElecGround.Detail":
+            this.$router.push({
+              path: '/lims/reportelecground/subdata/datalist',
+              query: queryParams,
+            });
+            break;
+            //防雷装置等电位
+          case "DAYT.Equipotent.Detail":
+            this.$router.push({
+              path: '/lims/reportequipotent/subdata/datalist',
+              query: queryParams,
+            });
+            break;
+            //防雷装置
+          case "DAYT.LightProtect.Detail":
+            this.$router.push({
+              path: '/lims/reportlightprotect/datareview',
+              query: queryParams,
+            });
+            break;
+            //电流表
+          case "DAYT.Ammeter.Detail":
+            this.$router.push({
+              path: '/lims/reportammeter/subdata/dataopera',
+              query: queryParams,
+            });
+            break;
+            //阻火器
+          case "DAYT.BackFire.Detail":
+            this.$router.push({
+              path: '/lims/reportzuhq/subdata/datalist',
+              query: queryParams,
+            });
+            break;
+            //游梁式抽油机
+          case "DAYT.BeamPumpingUnits.Detail":
+            this.$router.push({
+              path: '/lims/reportbeampumpingUnits/subdata/dataopera',
+              query: queryParams,
+            });
+            break;
+            //无游梁式抽油机
+          case "DAYT.NoBeamPumpingUnits.Detail":
+            this.$router.push({
+              path: '/lims/reportnobeampumpingUnits/subdata/dataopera',
+              query: queryParams,
+            });
+            break;
+
+          default:
+            this.$message.warning('无模板类型相匹配,请重试');
+        }
+      },
+      // 签发
+      shenHeFunc(row) {
+        let _this = this
+        let queryParams = {
+          key: row.Id + '' + row.EId,
+          docurl: row.ReportUrl,
+          reportId: row.Id
+        }
+        _this.$router.push({
+          path: '/lims/createreport/onlyofficesframe',
+          query: queryParams
+        })
+      },
+      // searchCommand(command) {
+      //   let _this = this
+      //   if (command == 'entry') {
+      //     _this.WaitData = _this.usertotal.EntryList
+      //   } else if (command == 'check') {
+      //     _this.WaitData = _this.usertotal.CheckList
+      //   } else if (command == 'audit') {
+      //     _this.WaitData = _this.usertotal.AuditList
+      //   } else if (command == 'send') {
+      //     _this.WaitData = _this.usertotal.SignList
+      //   }
+      // },
+
+      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;
+      },
+
+      //获取权限
+      getPermissions() {
+        let _this = this
+        // request
+        let params = {
+          percodes: `'${this.permissionscode.entry}','${this.permissionscode.check}','${this.permissionscode.audit}','${this.permissionscode.sign}'`
+        }
+        this.$axios.get('/permissions/isauths', {
+            params
+          })
+          .then(res => {
+            if (res.data instanceof Array && res.data.length > 0) {
+              console.log(res.data)
+              res.data.forEach(element => {
+                _this.permissions[element.Code] = element.Isperm
+              });
+            }
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      getShowPermissions() {
+        let _this = this
+        if (_this.authUser.Profile.DepartmentId == "100000054") {
+          _this.allshow = true
+          _this.Department = 100000150
+        } else {
+          this.$axios.get('/limsentrust/getshow', {})
+            .then(res => {
+              _this.whichshow = res.data.items
+              if (res.data.items == 'tjz') {
+                _this.Department = 100000150
+              } else if (res.data.items == 'yx') {
+                _this.Department = 100000151
+              } else if (res.data.items == 'jlny') {
+                _this.Department = 100000152
+              } else if (res.data.items == 'gcjd') {
+                _this.Department = 100000153
+              } else if (res.data.items == 'zj') {
+                _this.Department = 100000166
+              } else if (res.data.items == 'wzjy') {
+                _this.Department = 100000167
+              }
+            })
+            .catch(err => {
+              // handle error
+              console.error(err)
+            })
+        }
+        _this.initData()
+        _this.initDatas()
+      },
+    }
+  }
+
+</script>
+
+<style lang="css">
+  .avatar-index {
+    width: 45px;
+    height: 45px;
+    margin-top: -15px;
+    margin-bottom: -15px;
+  }
+
+</style>