|
|
@@ -0,0 +1,620 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div class="heads">非CNASCMA检测档案</div>
|
|
|
+ <div class="top-box">
|
|
|
+ <span class="t-span">年份</span
|
|
|
+ ><el-input
|
|
|
+ class="inp"
|
|
|
+ v-model="nianfen"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ <span class="t-span">报告编号</span
|
|
|
+ ><el-input
|
|
|
+ class="inp"
|
|
|
+ v-model="bianhao"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ <el-button class="btn" type="primary" @click="search">
|
|
|
+ <i class="ibps-icon-search"></i>查询
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ :data="tableData"
|
|
|
+ border
|
|
|
+ :stripe="true"
|
|
|
+ style="width: 100%"
|
|
|
+ height="75vh"
|
|
|
+ :header-cell-style="{
|
|
|
+ color: '#000',
|
|
|
+ 'font-size': '14px',
|
|
|
+ padding: '6px 6px',
|
|
|
+ background: '#a7d6f8 !important',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <el-table-column prop="chu_ju_bao_gao_sh" label="年份" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.chu_ju_bao_gao_sh | yeare("年") }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="he_tong_bian_hao_" label="合同编号" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.he_tong_bian_hao_ | returnHetong(hetong) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="bao_gao_bian_hao_" label="报告编号" width="150">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="jian_ce_kai_shi_s" label="检测时间" width="120">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="wei_tuo_zhan_shi_"
|
|
|
+ label="检测委托单号"
|
|
|
+ width="180"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.wei_tuo_zhan_shi_ | returnweituobianhao(wTBH) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="wei_tuo_ri_qi_" label="委托日期" width="120">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="yang_pin_bian_hao" label="样品编号" width="150">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="yang_pin_ming_che" label="样品名称" width="">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="left" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-popover placement="left" width="200" trigger="click">
|
|
|
+ <div slot="reference" class="more">
|
|
|
+ <i class="el-icon-caret-bottom"></i>查阅
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="item"
|
|
|
+ style="color: #85ce61"
|
|
|
+ @click="
|
|
|
+ alertReport(
|
|
|
+ reports.jianceshenqingdan,
|
|
|
+ scope.row.jian_ce_shen_qing
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <i class="el-icon-s-order"></i> 检测委托单
|
|
|
+ </div>
|
|
|
+ <!-- <div
|
|
|
+ class="item"
|
|
|
+ style="color: #85ce61"
|
|
|
+ @click="
|
|
|
+ alertReport(reports.hetongpingshen, scope.row.jian_ce_shen_qing)
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <i class="el-icon-s-order"></i> 合同评审
|
|
|
+ </div> -->
|
|
|
+ <div>
|
|
|
+ <el-popover placement="left" width="200" trigger="click">
|
|
|
+ <div
|
|
|
+ class="div_test item"
|
|
|
+ style="color: #85ce61"
|
|
|
+ slot="reference"
|
|
|
+ @click="juTiItem(scope.row)"
|
|
|
+ >
|
|
|
+ <i class="el-icon-s-order"></i> 检测记录
|
|
|
+ </div>
|
|
|
+ <div class="three-item">
|
|
|
+ <div
|
|
|
+ style="color: #85ce61; cursor: pointer"
|
|
|
+ v-for="it in itemInfo"
|
|
|
+ :key="it.id_"
|
|
|
+ @click="formEvent(it.id_,it.shujuid)"
|
|
|
+ >
|
|
|
+ {{ it.jian_ce_xiang_mu_ }}记录
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-popover placement="left" width="200" trigger="click">
|
|
|
+ <div
|
|
|
+ class="div_test item"
|
|
|
+ style="color: #85ce61"
|
|
|
+ slot="reference"
|
|
|
+ @click="getjianceFile(scope.row)"
|
|
|
+ >
|
|
|
+ <i class="el-icon-s-order"></i> 检测附件
|
|
|
+ </div>
|
|
|
+ <div class="three-item">
|
|
|
+ <div
|
|
|
+ style="color: #85ce61; cursor: pointer"
|
|
|
+ v-for="it in jianceFileList"
|
|
|
+ :key="it.id_"
|
|
|
+ @click="jianceFile(it)"
|
|
|
+ >
|
|
|
+ {{ it.fileName }}.{{ it.ext }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="item"
|
|
|
+ style="color: #85ce61"
|
|
|
+ @click="alertReport(reports.baogaoshenpibiao, scope.row.id_)"
|
|
|
+ >
|
|
|
+ <i class="el-icon-s-order"></i> 检测报告审批表
|
|
|
+ </div>
|
|
|
+ <div v-if="false">
|
|
|
+ <el-popover placement="left" width="200" trigger="triggerType">
|
|
|
+ <div
|
|
|
+ class="div_test item"
|
|
|
+ style="color: #85ce61"
|
|
|
+ slot="reference"
|
|
|
+ @click="YubaogaoItem(scope.row)"
|
|
|
+ >
|
|
|
+ <i class="el-icon-s-order"></i> 预报告
|
|
|
+ </div>
|
|
|
+ <div class="three-item">
|
|
|
+ <div
|
|
|
+ style="color: #85ce61; cursor: pointer"
|
|
|
+ v-for="it in yubaogaoitem"
|
|
|
+ :key="it.id_"
|
|
|
+ @click="yuReports(reports.yubaogao, it.id)"
|
|
|
+ >
|
|
|
+ {{ it.jian_ce_xiang_mu_ }}预报告记录
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ <!-- <div
|
|
|
+ class="item"
|
|
|
+ style="color: #85ce61"
|
|
|
+ @click="alertReport(reports.jiancebaogao, scope.row.id_)"
|
|
|
+ >
|
|
|
+ <i class="el-icon-s-order"></i> 检测报告
|
|
|
+ </div> -->
|
|
|
+ <div v-if="scope.row && scope.row.shou_quan_qian_z">
|
|
|
+ <el-popover placement="left" width="200" trigger="click">
|
|
|
+ <div
|
|
|
+ class="div_test item"
|
|
|
+ style="color: #85ce61"
|
|
|
+ slot="reference"
|
|
|
+ @click="getFile(scope.row.shou_quan_qian_z)"
|
|
|
+ >
|
|
|
+ <i class="el-icon-s-order"></i> 检测报告
|
|
|
+ </div>
|
|
|
+ <div class="three-item">
|
|
|
+ <div
|
|
|
+ style="color: #85ce61; cursor: pointer"
|
|
|
+ v-for="i in fileList"
|
|
|
+ :key="i.id_"
|
|
|
+ @click="preview(i)"
|
|
|
+ >
|
|
|
+ {{ i.fileName }}.{{ i.ext }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-dialog
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :close-on-press-escape="false"
|
|
|
+ :top="'3vh'"
|
|
|
+ :width="'90%'"
|
|
|
+ class="js-custom-dialog"
|
|
|
+ append-to-body
|
|
|
+ :fullscreen="false"
|
|
|
+ :visible.sync="visible"
|
|
|
+ >
|
|
|
+ <iframe
|
|
|
+ :src="srcUrl"
|
|
|
+ :height="'100%'"
|
|
|
+ :width="'100%'"
|
|
|
+ frameborder="0"
|
|
|
+ scrolling="no"
|
|
|
+ />
|
|
|
+ </el-dialog>
|
|
|
+ <div class="block">
|
|
|
+ <el-pagination
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page.sync="currentPage4"
|
|
|
+ :page-sizes="[10, 20, 50, 100]"
|
|
|
+ :page-size="20"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ <image-viewer
|
|
|
+ v-if="fileType === 'image'"
|
|
|
+ :z-index="zIndex"
|
|
|
+ :url-list="[fileUrl]"
|
|
|
+ :on-close="() => fileType = ''"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <script>
|
|
|
+ import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
|
|
|
+ import GetReport from "../corresponding/getReport.js";
|
|
|
+ import { SYSTEM_URL, BASE_API } from '@/api/baseUrl'
|
|
|
+ import PopupManager from '@/utils/popup';
|
|
|
+ import { previewFile } from '@/api/platform/file/attachment'
|
|
|
+ const imageType = ['jpg', 'jpeg', 'bmp', 'png', 'gif']
|
|
|
+ export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ runqianId: "",
|
|
|
+ total: 200,
|
|
|
+ currentPage4: 1,
|
|
|
+ visible: false,
|
|
|
+ reports: {
|
|
|
+ hetong: "",
|
|
|
+ hetongpingshen: "42明鉴/吴/MJT-QP-7.1-01-R02合同评审表.rpx",
|
|
|
+ jianceshenqingdan: "42明鉴/MJT-QP-7-01-R03 检测委托单.rpx",
|
|
|
+ jianceyuanshijilu: "",
|
|
|
+ baogaoshenpibiao: "42明鉴/吴/检测报告审批表.rpx",
|
|
|
+ yubaogao: "42明鉴/吴/明鉴细胞专业技术检测非预报告.rpx",
|
|
|
+ jiancebaogao: "42明鉴/吴/明鉴细胞专业技术检测非报告.rpx",
|
|
|
+ },
|
|
|
+ shenqingdanid: "",
|
|
|
+ nianfen: "",
|
|
|
+ danwei: "",
|
|
|
+ bianhao: "",
|
|
|
+ tableData: [],
|
|
|
+ itemInfo: [], // 列表内容
|
|
|
+ yubaogaoitem: [],
|
|
|
+ hetong: [],
|
|
|
+ triggerType: "click",
|
|
|
+ wTBH: [],
|
|
|
+ tongyonglujin: '',// 检测项目通用路径
|
|
|
+ srcUrl: '',
|
|
|
+ fileUrl: '',
|
|
|
+ fileType: '',
|
|
|
+ zIndex: 2000,
|
|
|
+ fileList: [],
|
|
|
+ fileType: '',
|
|
|
+ fileOption: {user: {}},
|
|
|
+ jianceFileList:[],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mixins: [GetReport],
|
|
|
+ components: {
|
|
|
+ ImageViewer: () => import('@/components/ibps-file-viewer/image')
|
|
|
+ },
|
|
|
+ filters: {
|
|
|
+ returnHetong(value, arr) {
|
|
|
+ for (var i = 0; i < arr.length; i++) {
|
|
|
+ if (arr[i].id_ == value) {
|
|
|
+ return arr[i].he_tong_bian_hao_;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ returnweituobianhao(value, arr) {
|
|
|
+ for (var i = 0; i < arr.length; i++) {
|
|
|
+ if (arr[i] != null && arr[i] != undefined) {
|
|
|
+ if (arr[i].shen_qing_id_ == value) {
|
|
|
+ return arr[i].wei_tuo_bian_hao_;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ yeare(value, dedal) {
|
|
|
+ if (value == undefined || value == null || value == "") {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ if (dedal == "年") {
|
|
|
+ return value.split("-")[0];
|
|
|
+ } else if (dedal == "月") {
|
|
|
+ return value.split("-")[0] + value.split("-")[1];
|
|
|
+ } else {
|
|
|
+ value;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ let sql =
|
|
|
+ "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非' and (zhuang_tai_ ='报告待发放' or zhuang_tai_ = '完成') ORDER BY create_time_ DESC limit 0,20";
|
|
|
+ // curdPost("sql", sql).then((response) => {
|
|
|
+ // this_.tableData = response.variables.data;
|
|
|
+ // });
|
|
|
+ this.loadData(sql);
|
|
|
+ let sumsql =
|
|
|
+ "select COUNT(*) AS sum FROM t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非' and (zhuang_tai_ ='报告待发放' or zhuang_tai_ = '完成')";
|
|
|
+ curdPost("sql", sumsql).then((response) => {
|
|
|
+ this.total = response.variables.data[0].sum;
|
|
|
+ });
|
|
|
+ let sql2 ="select id_,yuan_shi_ji_lu_ba FROM t_mjjcnlfw WHERE id_ ='f5a95b425d444b549d5a217d4c031855'";
|
|
|
+ curdPost("sql", sql2).then((response) => {
|
|
|
+ this.tongyonglujin = response.variables.data[0].yuan_shi_ji_lu_ba;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 请求表格数据函数
|
|
|
+ async loadData(sql) {
|
|
|
+ let this_ = this;
|
|
|
+ this.listData = [];
|
|
|
+ await curdPost("sql", sql).then((res) => {
|
|
|
+ this_.tableData = res.variables.data;
|
|
|
+ if (this_.tableData.length > 0) {
|
|
|
+ this.hetongidFn(this_.tableData);
|
|
|
+ } else {
|
|
|
+ this_.tableData = [];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ for (let i = 0; i < this.tableData.length; i++) {
|
|
|
+ let sql =
|
|
|
+ "select wei_tuo_bian_hao_,shen_qing_id_ FROM t_mjwtzsb WHERE shen_qing_id_ ='" +
|
|
|
+ this.tableData[i].wei_tuo_zhan_shi_ +
|
|
|
+ "'";
|
|
|
+ await curdPost("sql", sql).then((res) => {
|
|
|
+ let data = res.variables.data;
|
|
|
+ this_.wTBH.push(data[0]);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ hetongidFn(bianhaoArr) {
|
|
|
+ var sqlStr = "";
|
|
|
+ var this_ = this;
|
|
|
+ bianhaoArr.forEach((item) => {
|
|
|
+ sqlStr += "'" + item.he_tong_bian_hao_ + "',";
|
|
|
+ });
|
|
|
+ sqlStr = sqlStr.substring(0, sqlStr.length - 1);
|
|
|
+ sqlStr = "(" + sqlStr + ")";
|
|
|
+ let sql =
|
|
|
+ "select he_tong_bian_hao_,id_ from t_bjd WHERE id_ in " + sqlStr;
|
|
|
+ curdPost("sql", sql).then((res) => {
|
|
|
+ this_.hetong = res.variables.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ juTiItem(info) {
|
|
|
+ let itemId;
|
|
|
+ let this_ = this;
|
|
|
+ this.runqianId = "";
|
|
|
+ this_.itemInfo =[];
|
|
|
+ var sql =`select jian_ce_xiang_mu2,jian_ce_xiang_si_ ,jian_ce_xiang_me_ ,jian_ce_xiang_ms_ FROM t_mjypb WHERE wai_jian_= (SELECT jian_ce_shen_qing FROM t_mjjcbg WHERE id_= '${info.id_}') AND yang_pin_bian_hao = '${info.yang_pin_bian_hao}'`;
|
|
|
+ curdPost("sql", sql).then((res) => {
|
|
|
+ console.log(sql)
|
|
|
+ itemId = res.variables.data;
|
|
|
+ if(itemId.length <=0 ||itemId ==null){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this_.runqianId = itemId[0].jian_ce_xiang_mu2+','+itemId[0].jian_ce_xiang_si_+','+itemId[0].jian_ce_xiang_me_+','+itemId[0].jian_ce_xiang_ms_;
|
|
|
+ var itemSql =`select a.id_,a.jian_ce_xiang_mu_ ,b.id_ as shujuid FROM t_mjjcnlfw AS a JOIN t_jchzb AS b ON a.id_ = b.jian_ce_xiang_mu_ WHERE b.yang_pin_bian_hao = '${info.yang_pin_bian_hao}'`;
|
|
|
+ curdPost("sql", itemSql).then((res) => {
|
|
|
+ this_.itemInfo = res.variables.data;
|
|
|
+ });
|
|
|
+
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // juTiItem(info) {
|
|
|
+ // let itemId;
|
|
|
+ // let this_ = this;
|
|
|
+ // var sql =
|
|
|
+ // "select b.id_ ,c.jian_ce_xiang_mu2 FROM t_mjjcbg a JOIN t_jchzb b ON a.jian_ce_shen_qing = b.shen_qing_dan_id_ JOIN t_mjypb c ON a.jian_ce_shen_qing = c.wai_jian_ WHERE a.id_ = '" +
|
|
|
+ // info.id_ +
|
|
|
+ // "'";
|
|
|
+ // curdPost("sql", sql).then((res) => {
|
|
|
+ // itemId = res.variables.data;
|
|
|
+ // this_.runqianId = itemId[0].id_;
|
|
|
+ // var itemSql =
|
|
|
+ // "select id_,jian_ce_xiang_mu_ FROM t_mjjcnlfw WHERE id_ IN(" +
|
|
|
+ // itemId[0].jian_ce_xiang_mu2 +
|
|
|
+ // ")";
|
|
|
+ // curdPost("sql", itemSql).then((res) => {
|
|
|
+ // this_.itemInfo = res.variables.data;
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+ formEvent(itemId,shujuid) {
|
|
|
+ var itemSql =`select id_,jian_ce_xiang_mu_,yuan_shi_ji_lu_ba FROM t_mjjcnlfw`;
|
|
|
+ curdPost("sql", itemSql).then((res) => {
|
|
|
+ let data = res.variables.data;
|
|
|
+ data.forEach(item=>{
|
|
|
+ if(item.id_ ==itemId){
|
|
|
+ this.alertReport(item.yuan_shi_ji_lu_ba?item.yuan_shi_ji_lu_ba:this.tongyonglujin,shujuid);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ YubaogaoItem(info) {
|
|
|
+ let itemId;
|
|
|
+ let this_ = this;
|
|
|
+ var sql =
|
|
|
+ "select b.id_ ,c.jian_ce_xiang_mu2 FROM t_mjjcbg a JOIN t_jchzb b ON a.jian_ce_shen_qing = b.shen_qing_dan_id_ JOIN t_mjypb c ON a.jian_ce_shen_qing = c.wai_jian_ WHERE a.id_ = '" +
|
|
|
+ info.id_ +
|
|
|
+ "'";
|
|
|
+ curdPost("sql", sql).then((res) => {
|
|
|
+ itemId = res.variables.data;
|
|
|
+ this_.runqianId = itemId[0].id_;
|
|
|
+ var itemSql =
|
|
|
+ "select * FROM t_mjjcnlfw WHERE id_ IN(" +
|
|
|
+ itemId[0].jian_ce_xiang_mu2 +
|
|
|
+ ")";
|
|
|
+ curdPost("sql", itemSql).then((res) => {
|
|
|
+ this_.itemInfo = res.variables.data;
|
|
|
+ for (var i = 0; i++; i < this_itemInfo) {
|
|
|
+ if (this_itemInfo[i].shi_fou_yu_bao_ga == "是") {
|
|
|
+ this_.yubaogaoitem.push(it);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this_.yubaogaoitem.length == 0) {
|
|
|
+ this_.triggerType = "";
|
|
|
+ alert("此条报告没有预报告记录");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ yuReports(url, id) {
|
|
|
+ this.alertReport(url, id);
|
|
|
+ },
|
|
|
+ // pin凑sql
|
|
|
+ selectSplit() {
|
|
|
+ var q1, q2, q3;
|
|
|
+ if (this.nianfen) {
|
|
|
+ q1 = "chu_ju_bao_gao_sh like'" + "%" + this.nianfen + "%" + "' ";
|
|
|
+ }
|
|
|
+ if (this.danwei) {
|
|
|
+ q2 = "wei_tuo_dan_wei_ = '" + this.danwei + "' ";
|
|
|
+ }
|
|
|
+ if (this.bianhao) {
|
|
|
+ q3 = "bao_gao_bian_hao_ = '" + this.bianhao + "'";
|
|
|
+ }
|
|
|
+ if (this.nianfen && this.danwei && this.bianhao) {
|
|
|
+ return "where " + '"+q1+"' + " and " + q2 + " and " + q3 + " and ";
|
|
|
+ } else if (this.nianfen && this.danwei && !this.bianhao) {
|
|
|
+ return "where " + q1 + " and " + q2 + " and ";
|
|
|
+ } else if (!this.nianfen && this.danwei && this.bianhao) {
|
|
|
+ return "where " + q2 + " and " + q3 + " and ";
|
|
|
+ } else if (this.nianfen && !this.danwei && this.bianhao) {
|
|
|
+ return "where " + q1 + " and " + q3 + " and ";
|
|
|
+ } else if (this.nianfen && !this.danwei && !this.bianhao) {
|
|
|
+ return "where " + q1 + " and ";
|
|
|
+ } else if (!this.nianfen && this.danwei && !this.bianhao) {
|
|
|
+ return "where " + q2 + " and ";
|
|
|
+ } else if (!this.nianfen && !this.danwei && this.bianhao) {
|
|
|
+ return "where " + q3 + " and ";
|
|
|
+ } else if (!this.nianfen && !this.danwei && !this.bianhao) {
|
|
|
+ return "WHERE";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //检测附件
|
|
|
+ getjianceFile(row){
|
|
|
+ let this_ =this;
|
|
|
+ this.jianceFileList = []
|
|
|
+ // const { bao_gao_pdf_, suo_you_yuan_shi_ } = row.suo_you_yuan_shi_
|
|
|
+ let sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${row.jian_ce_yuan_shi_}')`
|
|
|
+ curdPost('sql', sql).then(res => {
|
|
|
+ this_.jianceFileList = res.variables && res.variables.data;
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ jianceFile(file){
|
|
|
+ if (imageType.includes(file.ext)) {
|
|
|
+ this.zIndex = PopupManager.getZIndex()
|
|
|
+ this.fileUrl = previewFile(file.id)
|
|
|
+ this.fileType = 'image'
|
|
|
+ } else {
|
|
|
+ this.getOption(file)
|
|
|
+ this.openWindow()
|
|
|
+ this.fileType = ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ search() {
|
|
|
+ let moreSql = this.selectSplit();
|
|
|
+ var sql =
|
|
|
+ "select * from t_mjjcbg " +
|
|
|
+ moreSql +
|
|
|
+ " shi_fou_yu_bao_ga ='否' and lei_bie_qu_fen_yu = '非' and (zhuang_tai_ ='报告待发放' or zhuang_tai_ = '完成') ORDER BY create_time_ DESC limit 0,20";
|
|
|
+ this.loadData(sql);
|
|
|
+ },
|
|
|
+ handleSizeChange(value) {
|
|
|
+ this.currentPage4 = 1;
|
|
|
+ let sql =
|
|
|
+ "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非' and (zhuang_tai_ ='报告待发放' or zhuang_tai_ = '完成') ORDER BY create_time_ DESC limit 0," +
|
|
|
+ value;
|
|
|
+ this.loadData(sql);
|
|
|
+ },
|
|
|
+ handleCurrentChange(value) {
|
|
|
+ let sql =
|
|
|
+ "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非' and (zhuang_tai_ ='报告待发放' or zhuang_tai_ = '完成') ORDER BY create_time_ DESC limit " +
|
|
|
+ value +
|
|
|
+ ", 20";
|
|
|
+ this.loadData(sql);
|
|
|
+ },
|
|
|
+ // 获取附件信息
|
|
|
+ getFile (data) {
|
|
|
+ this.fileList = []
|
|
|
+ let sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${data}')`
|
|
|
+ curdPost('sql', sql).then(res => {
|
|
|
+ this.fileList = res.variables && res.variables.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 文件预览
|
|
|
+ preview (file) {
|
|
|
+ this.getOption(file)
|
|
|
+ this.openWindow()
|
|
|
+ this.fileType = ''
|
|
|
+ },
|
|
|
+ getOption (file) {
|
|
|
+ this.fileOption.user.id = this.$store.getters.userId
|
|
|
+ this.fileOption.user.name = this.$store.getters.name
|
|
|
+ this.fileOption.url = BASE_API() + SYSTEM_URL() + `/file/download?attachmentId=${file.id}`
|
|
|
+ this.fileOption.editUrl = BASE_API() + SYSTEM_URL() + `/file/editCallback?fileName=${file.fileName}&fileType=${file.ext}&id=${file.id}`
|
|
|
+ this.fileOption.title = file.fileName
|
|
|
+ this.fileOption.fileType = file.ext
|
|
|
+ console.log(this.fileOption)
|
|
|
+ },
|
|
|
+ openWindow () {
|
|
|
+ let routeData = this.$router.resolve({
|
|
|
+ path: '/fileView',
|
|
|
+ query: this.fileOption
|
|
|
+ })
|
|
|
+ window.open(routeData.href);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ };
|
|
|
+ </script>
|
|
|
+
|
|
|
+ <style lang="scss">
|
|
|
+ .heads {
|
|
|
+ margin-top: 5px;
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ font-weight: 700;
|
|
|
+ background-color: #f9ffff;
|
|
|
+ width: 100%;
|
|
|
+ font-size: 18px;
|
|
|
+ }
|
|
|
+ // .tableRowClassName {
|
|
|
+ // backface-visibility: #d9eefd;
|
|
|
+ // }
|
|
|
+ // .el-table .warning-row {
|
|
|
+ // background: #d9eefd;
|
|
|
+ // }
|
|
|
+ .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
|
|
|
+ background: #d9eefd;
|
|
|
+ }
|
|
|
+ .more,
|
|
|
+ .item {
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .more {
|
|
|
+ color: #409eff;
|
|
|
+ }
|
|
|
+ .el-dropdown-link {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #409eff;
|
|
|
+ }
|
|
|
+ .el-icon-arrow-down {
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .top-box {
|
|
|
+ margin-bottom: 20px;
|
|
|
+ .t-span {
|
|
|
+ margin: 0 6px 0 6px;
|
|
|
+ color: #916266;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+ .btn {
|
|
|
+ margin-left: 10px;
|
|
|
+ background-color: #409eff;
|
|
|
+ border-color: #409eff;
|
|
|
+ font-size: 12px;
|
|
|
+ border-radius: 3px;
|
|
|
+ padding: 7px 15px;
|
|
|
+ }
|
|
|
+ .inp {
|
|
|
+ width: 150px;
|
|
|
+ font-size: 12px;
|
|
|
+ height: 28px !important;
|
|
|
+ line-height: 28px;
|
|
|
+ color: #606266;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+
|