Commit f6616a81 authored by 李苏's avatar 李苏 💬

新增功能

parent e2615541
<template> <template>
<div style="display: flex;"> <div style="display: flex;">
<el-dialog <el-dialog :fullscreen='true' append-to-body :visible.sync="show" width="100%">
:fullscreen='true'
append-to-body <div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;">
:visible.sync="show" <div v-if="showType=='pdf'"
width="100%" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 60px;"
> @click="showSize=b"></div>
<div v-if="showType=='pdf'"
style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 90px;"
@click="showSize=m"></div>
<div v-if="showType=='pdf'"
style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 120px;"
@click="showSize=s"></div>
<div :style="showSize" style='height: 85vh;width: 100%;'>
<pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i"></pdf>
</div>
<div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;">
<div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 60px;" @click="showSize=b" ></div>
<div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 90px;" @click="showSize=m" ></div>
<div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 120px;" @click="showSize=s" ></div>
<div :style="showSize" style='height: 85vh;width: 100%;'>
<pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf>
</div>
<!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> --> <!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> -->
<img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" style="max-height: 100%;position: absolute; <img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" style="max-height: 100%;position: absolute;
left: 50%; left: 50%;
top: 50%;; top: 50%;;
transform: translate(-50%,-50%); transform: translate(-50%,-50%);
" border="0" > " border="0">
</div> </div>
</el-dialog> </el-dialog>
<div id='approvefileAdd' style="display: none;" > <div id='approvefileAdd' style="display: none;">
<input @change='beginUpload' id='aqglfilesonadd' ref="upload" type="file" style="display: none;"> <input @change='beginUpload' id='aqglfilesonadd' ref="upload" type="file" style="display: none;">
</div> </div>
<div class="min_full" style="width: 200px;border-right: 0px;"> <div class="min_full" style="width: 200px;border-right: 0px;">
<TreeBase :dgtype='3' :app='this' @selected='selectedTree'></TreeBase> <TreeBase :dgtype='3' :app='this' @selected='selectedTree'></TreeBase>
</div> </div>
<div class="min_full" style="overflow: auto;width: calc(100% - 200px)"> <div class="min_full" style="overflow: auto;width: calc(100% - 200px)">
<div class="min_full" style="calc(60vh - 42px)"> <div class="min_full" style="calc(60vh - 42px)">
<!-- 查询条件--> <!-- 查询条件-->
<div class="search" v-condition> <div class="search" v-condition>
<SearchButton :app='app'></SearchButton> <SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1"> <el-row :gutter="20" class="search-row-1">
<el-col :span="6" class="search-col"> <el-col :span="6" class="search-col">
<div class="search-item"> <div class="search-item">
<span class="search-span">文档标题:</span> <span class="search-span">文档标题:</span>
<el-input v-model="queryParams.title"></el-input> <el-input v-model="queryParams.title"></el-input>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<!-- 按钮操作--> <!-- 按钮操作-->
<el-row class="tool-bar" > <el-row class="tool-bar">
<PrintButton :app='this'></PrintButton> <PrintButton :app='this'></PrintButton>
<EditButton ref="add" :app='this'></EditButton> <EditButton ref="add" :app='this'></EditButton>
<!-- <ViewButton ref="view" :app='this'></ViewButton> <!-- <ViewButton ref="view" :app='this'></ViewButton>
<CopyButton ref="copy" :app='this'></CopyButton> <CopyButton ref="copy" :app='this'></CopyButton>
<FieldButton :app='this'></FieldButton> <FieldButton :app='this'></FieldButton>
<ExcelButton :app='this'></ExcelButton> --> <ExcelButton :app='this'></ExcelButton> -->
<!-- <AttachFileButton :app='this' ></AttachFileButton> --> <!-- <AttachFileButton :app='this' ></AttachFileButton> -->
<el-button @click="upload" size='mini' type="primary">新增</el-button> <el-button @click="upload" size='mini' type="primary">新增</el-button>
</el-row> </el-row>
<!-- 表格--> <!-- 表格-->
<div class="tablePagers"> <div class="tablePagers">
<TablePager v-loading='isupLoad' @getData='getData' :ref="'TablePager'" :app='this' :query='query' @selectItem='selectItem' <TablePager v-loading='isupLoad' @getData='getData' :ref="'TablePager'" :app='this' :query='query'
@getRow='getRow'> @selectItem='selectItem' @getRow='getRow'>
<template slot="tabCustom"> <template slot="tabCustom">
<el-table-column label="附件操作" width="160" header-align="center" fixed="right" > <el-table-column label="附件操作" width="160" header-align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="width: 100%;display: flex;"> <div style="width: 100%;display: flex;">
<el-button style="text-align: center;color: #3399ff;width: 33.3%;" <el-button style="text-align: center;color: #3399ff;width: 33.3%;"
@click.native.prevent="preview(scope.row)" type="text" size="small"> @click.native.prevent="preview(scope.row)" type="text" size="small">
<i class="el-icon-view"></i>预览 <i class="el-icon-view"></i>预览
</el-button> </el-button>
<el-button v-show="app.powerObj['91']" style="text-align: center;color: #3399ff;width: 33.3%;" <el-button v-show="app.powerObj['91']" style="text-align: center;color: #3399ff;width: 33.3%;"
@click.native.prevent="downLoad(scope.row)" type="text" size="small"> @click.native.prevent="downLoad(scope.row)" type="text" size="small">
<i class="el-icon-download"></i>下载 <i class="el-icon-download"></i>下载
</el-button> </el-button>
<el-button style="text-align: center;color: #3399ff;width: 33.3%;" <el-button style="text-align: center;color: #3399ff;width: 33.3%;"
@click.native.prevent="upload('update',scope.row)" type="text" size="small"> @click.native.prevent="upload('update',scope.row)" type="text" size="small">
<i class="el-icon-upload2"></i>更新 <i class="el-icon-upload2"></i>更新
</el-button> </el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
</TablePager> </TablePager>
</div>
</div> </div>
</div> <!-- <MainIndex :vMain='this' ref="mainIndex" ></MainIndex>
<!-- <MainIndex :vMain='this' ref="mainIndex" ></MainIndex>
<LessIndex :vMain='this' ref="lessIndex" ></LessIndex> --> <LessIndex :vMain='this' ref="lessIndex" ></LessIndex> -->
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import {pdf} from 'common'
import { import {
doQuerytree pdf
} from 'common'
import {
doQuerytree
} from "@/api/outsourcingDirector/declare.js"; } from "@/api/outsourcingDirector/declare.js";
import { import {
autoAttachPreview, autoAttachPreview,
autoAttach, autoAttach,
autoAttachDownload, autoAttachDownload,
deleteAttachDownload, deleteAttachDownload,
uploadAttachDownload, uploadAttachDownload,
uploadUpdate uploadUpdate
// aqglUploadUpdate // aqglUploadUpdate
} from "common/src/api/system/dmgSystem.js"; } from "common/src/api/system/dmgSystem.js";
import { import {
doQuery, doQuery,
doDelete, doDelete,
doUpdate doUpdate
} from "@/api/outsourcingDirector/declare.js"; } from "@/api/outsourcingDirector/declare.js";
import Edit from './lessEdit.vue' import Edit from './lessEdit.vue'
import {tableMixin} from 'common' import {
tableMixin
} from 'common'
// import MainIndex from './mainIndex.vue' // import MainIndex from './mainIndex.vue'
// import LessIndex from './lessIndex.vue' // import LessIndex from './lessIndex.vue'
export default { export default {
mixins: [tableMixin], mixins: [tableMixin],
name:'securityDocumentManagement', name: 'securityDocumentManagement',
components:{ components: {
// MainIndex, // MainIndex,
// LessIndex, // LessIndex,
Edit, Edit,
pdf pdf
}, },
data() { data() {
return{ return {
showSize:'transform:scale(0.36)', showSize: 'transform:scale(0.36)',
s:'transform:scale(0.36)', s: 'transform:scale(0.36)',
m:'transform:scale(0.6)', m: 'transform:scale(0.6)',
b:'transform:scale(0.9)', b: 'transform:scale(0.9)',
numPages:1, numPages: 1,
show:false, show: false,
isupLoad:false, isupLoad: false,
treeTitle: '目录', treeTitle: '目录',
treeDefaultProps: { treeDefaultProps: {
children: 'children', children: 'children',
label: 'bmmc' label: 'bmmc'
}, },
// 额外 // 额外
typeMap: [], typeMap: [],
systemType: [], systemType: [],
baseUrl: 'aqgl/wxglzd', baseUrl: 'aqgl/wxglzd',
/* 查询参数*/ /* 查询参数*/
queryParams: { queryParams: {
mlid:'', mlid: '',
title:'', title: '',
gsid:'' gsid: ''
}, },
treeQueryParams:{ treeQueryParams: {
}, },
/* 表格标题对应参数*/ /* 表格标题对应参数*/
tableTitle: [ tableTitle: [{
{prop: 'title', label: '文档名称', width: '340'}, prop: 'title',
{prop: 'fileVersion', label: '版本', width: '60'}, label: '文档名称',
{prop: 'createTime', label: '上传时间', fieldType: "ftDateTime"}, width: '340'
{prop: 'updUserName', label: '上传人', width: "80"}, },
{prop: 'fileSize', label: '大小', width: '70', {
formatter:function(a,b,bytes){ prop: 'fileVersion',
if(!bytes){ label: '版本',
width: '60'
},
{
prop: 'createTime',
label: '上传时间',
fieldType: "ftDateTime"
},
{
prop: 'updUserName',
label: '上传人',
width: "80"
},
{
prop: 'fileSize',
label: '大小',
width: '70',
formatter: function(a, b, bytes) {
if (!bytes) {
return '未上传文件' return '未上传文件'
} }
if (bytes === 0) return '0 B'; if (bytes === 0) return '0 B';
var k = 1000, // or 1024 var k = 1000, // or 1024
sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
i = Math.floor(Math.log(bytes) / Math.log(k)); i = Math.floor(Math.log(bytes) / Math.log(k));
return (bytes / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i]; return (bytes / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
} }
} }
] ]
} }
}, },
methods:{ methods: {
getNumPages(url) { getNumPages(url) {
var loadingTask = pdf.createLoadingTask(url) var loadingTask = pdf.createLoadingTask(url)
loadingTask.promise.then(pdf => { loadingTask.promise.then(pdf => {
this.url = loadingTask this.url = loadingTask
this.numPages = pdf.numPages this.numPages = pdf.numPages
}).catch((err) => { }).catch((err) => {
console.error('pdf加载失败') console.error('pdf加载失败')
}) })
}, },
/* 预览 */ /* 预览 */
preview(row){ preview(row) {
console.log(row) console.log(row)
this.showType=row.fileType this.showType = row.fileType
let canShow=['gif','jpg','jpeg','png','bmp','pdf'].indexOf(row.fileType)==-1 let canShow = ['gif', 'jpg', 'jpeg', 'png', 'bmp', 'pdf'].indexOf(row.fileType) == -1
if(canShow){ if (canShow) {
this.$warning('该文件不支持预览,请直接下载') this.$warning('该文件不支持预览,请直接下载')
return return
} }
autoAttachPreview({},'aqgl/wxglzd',row.fileId).then(res=>{ autoAttachPreview({}, 'aqgl/wxglzd', row.fileId).then(res => {
if(res.type=='application/json'){ if (res.type == 'application/json') {
this.$warning('您没有权限,请联系系统管理员!') this.$warning('您没有权限,请联系系统管理员!')
return return
} }
let blob = new Blob([res], { let blob = new Blob([res], {
type: 'application/'+row.fileType+';charset=UTF-8', type: 'application/' + row.fileType + ';charset=UTF-8',
}); });
this.url=URL.createObjectURL(blob) this.url = URL.createObjectURL(blob)
this.getNumPages(this.url) this.getNumPages(this.url)
this.show=true this.show = true
this.$nextTick(()=>{ this.$nextTick(() => {
this.$refs.show.addEventListener( 'contextmenu', function ( event ) { event.preventDefault(); }, false ); this.$refs.show.addEventListener('contextmenu', function(event) {
event.preventDefault();
}, false);
}) })
}) })
}, },
creatFile(){ creatFile() {
/* 清除老节点 */ /* 清除老节点 */
$('#approvefileAdd').find('input').remove() $('#approvefileAdd').find('input').remove()
let lineEl = document.createElement('input'); let lineEl = document.createElement('input');
let $lineEl=$(lineEl) let $lineEl = $(lineEl)
$lineEl.attr('type','file') $lineEl.attr('type', 'file')
$lineEl.attr('ref','upload') $lineEl.attr('ref', 'upload')
$lineEl.attr('id','aqglfilesonadd') $lineEl.attr('id', 'aqglfilesonadd')
$lineEl.hide() $lineEl.hide()
$lineEl.change(()=>{ $lineEl.change(() => {
this.beginUpload() this.beginUpload()
}) })
// $lineEl // $lineEl
$('#approvefileAdd').append($lineEl) $('#approvefileAdd').append($lineEl)
}, },
beginUpload(){ beginUpload() {
this.isupLoad=true this.isupLoad = true
let uploadDom=document.getElementById('aqglfilesonadd') let uploadDom = document.getElementById('aqglfilesonadd')
var filec = uploadDom.files[0]; var filec = uploadDom.files[0];
var name = filec.name var name = filec.name
var type = filec.type var type = filec.type
let updateId=$(uploadDom).attr('inputId') let updateId = $(uploadDom).attr('inputId')
updateId&&$(uploadDom).attr('inputId',null) updateId && $(uploadDom).attr('inputId', null)
if (filec) { if (filec) {
let formData = new FormData(); let formData = new FormData();
formData.append('file', filec) formData.append('file', filec)
formData.append('type', type) formData.append('type', type)
formData.append('folder', '') formData.append('folder', '')
formData.append('name', name) formData.append('name', name)
if(updateId){ if (updateId) {
formData.append('id', updateId) formData.append('id', updateId)
this.creatFile() this.creatFile()
uploadUpdate(formData,'aqgl/wxglzd').then(res => { uploadUpdate(formData, 'aqgl/wxglzd').then(res => {
if (res.success) { if (res.success) {
this.$success('更新成功') this.$success('更新成功')
this.isupLoad=false this.isupLoad = false
this.$refs['TablePager'].reLoad() this.$refs['TablePager'].reLoad()
} }
}).catch(e=>{ }).catch(e => {
console.error(e) console.error(e)
this.isupLoad=false this.isupLoad = false
}) })
return return
} }
formData.append('groupid', this.queryParams.gsid) formData.append('groupid', this.queryParams.gsid)
this.creatFile() this.creatFile()
uploadAttachDownload(formData,'aqgl/wxglzd').then(res => { uploadAttachDownload(formData, 'aqgl/wxglzd').then(res => {
if (res.success) { if (res.success) {
this.$success('添加成功') this.$success('添加成功')
this.isupLoad=false this.isupLoad = false
this.$refs['TablePager'].reLoad() this.$refs['TablePager'].reLoad()
} }
}).catch(e=>{ }).catch(e => {
console.error(e) console.error(e)
this.isupLoad=false this.isupLoad = false
}) })
} }
}, },
upload(){ upload() {
let $upload=$('#aqglfilesonadd') let $upload = $('#aqglfilesonadd')
arguments[0]=='update'&&$upload.attr('inputId',arguments[1].fileId)&&$upload.click() arguments[0] == 'update' && $upload.attr('inputId', arguments[1].fileId) && $upload.click()
if(arguments[0]=='update'){ if (arguments[0] == 'update') {
return return
} } else if (this.queryParams.gsid) {
else if (this.queryParams.gsid ){
$upload.click() $upload.click()
/* 上传*/ /* 上传*/
}else{ } else {
this.$warning('请选中公司操作操作'); this.$warning('请选中公司操作操作');
} }
}, },
down(data,type,title) { down(data, type, title) {
let a = document.createElement('a'); let a = document.createElement('a');
a.download = title; a.download = title;
a.style.display = 'none'; a.style.display = 'none';
let blob = new Blob([data], { let blob = new Blob([data], {
type: 'application/'+type+';charset=UTF-8', type: 'application/' + type + ';charset=UTF-8',
}); });
a.href = URL.createObjectURL(blob); a.href = URL.createObjectURL(blob);
document.body.appendChild(a); document.body.appendChild(a);
a.click(); a.click();
document.body.removeChild(a); document.body.removeChild(a);
}, },
downLoad(row){ downLoad(row) {
let title=row.fileName let title = row.fileName
autoAttachDownload({},'aqgl/wxglzd',row.fileId).then(res=>{ autoAttachDownload({}, 'aqgl/wxglzd', row.fileId).then(res => {
if(res.type=='application/json'){ if (res.type == 'application/json') {
this.$warning('您没有【下载】权限,请联系系统管理员!') this.$warning('您没有【下载】权限,请联系系统管理员!')
return return
} }
this.down(res,row.type,title) this.down(res, row.type, title)
}) })
}, },
selectedTree(val){ selectedTree(val) {
if(val.type=='ML'){ if (val.type == 'ML') {
this.queryParams.gsid=val.gsid this.queryParams.gsid = val.gsid
this.queryParams.mlid=val.id this.queryParams.mlid = val.id
}else{ } else {
this.queryParams.gsid=val.id this.queryParams.gsid = val.id
this.queryParams.mlid='' this.queryParams.mlid = ''
} }
this.$refs['TablePager'].pageQuery() this.$refs['TablePager'].pageQuery()
}, },
/* 基础查询*/ /* 基础查询*/
query: doQuery, query: doQuery,
apiDelete:doDelete, apiDelete: doDelete,
apiUpdate:doUpdate, apiUpdate: doUpdate,
apiTreeQuery: doQuerytree, apiTreeQuery: doQuerytree,
} }
......
<template> <template>
<!-- <div class="min_full" style="height: 140vh;"> --> <!-- <div class="min_full" style="height: 140vh;"> -->
<div class="min_full" > <div class="min_full">
<Zdzrr :app='this' v-if="showDialog&&DialogName=='指定检查人'" ></Zdzrr> <Zdzrr :app='this' v-if="showDialog&&DialogName=='指定检查人'"></Zdzrr>
<yhContent :app='this' v-if="showDialog&&DialogName=='关联隐患'" ></yhContent> <yhContent :app='this' v-if="showDialog&&DialogName=='关联隐患'"></yhContent>
<!-- 查询条件--> <!-- 查询条件-->
<div class="search" v-condition> <div class="search" v-condition>
<SearchButton :app='app'></SearchButton> <SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1"> <el-row :gutter="20" class="search-row-1">
<el-col :span="6" class="search-col"> <el-col :span="6" class="search-col">
<div class="search-item"> <div class="search-item">
<span class="search-span">状态:</span> <span class="search-span">状态:</span>
<RelSelect style="width: 100%;" src='aqgl/fxyk/fxpc/init/zt' clearable :match="{value:'id',label:'name'}" v-model='queryParams.zt' ></RelSelect> <RelSelect style="width: 100%;" src='aqgl/fxyk/fxpc/init/zt' clearable :match="{value:'id',label:'name'}"
</div> v-model='queryParams.zt'></RelSelect>
</el-col> </div>
<el-col :span="6" class="search-col"> </el-col>
<div class="search-item"> <el-col :span="6" class="search-col">
<span class="search-span">检查人员:</span> <div class="search-item">
<el-input v-model="queryParams.jcr" ></el-input> <span class="search-span">检查人员:</span>
</div> <el-input v-model="queryParams.jcr"></el-input>
</el-col> </div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item"> <el-col :span="6" class="search-col">
<span class="search-span">开始日期:</span> <div class="search-item">
<el-date-picker value-format="timestamp" v-model="queryParams.ksrq"></el-date-picker> <span class="search-span">开始日期:</span>
</div> <el-date-picker value-format="timestamp" v-model="queryParams.ksrq"></el-date-picker>
</el-col> </div>
<el-col :span="6" class="search-col"> </el-col>
<div class="search-item"> <el-col :span="6" class="search-col">
<span class="search-span">结束日期:</span> <div class="search-item">
<el-date-picker value-format="timestamp" v-model="queryParams.jsrq" ></el-date-picker> <span class="search-span">结束日期:</span>
</div> <el-date-picker value-format="timestamp" v-model="queryParams.jsrq"></el-date-picker>
</el-col> </div>
</el-col>
</el-row>
<el-row :gutter="20" class="search-row-1"> </el-row>
<el-col :span="6" class="search-col"> <el-row :gutter="20" class="search-row-1">
<div class="search-item"> <el-col :span="6" class="search-col">
<span class="search-span">公司:</span> <div class="search-item">
<RelSelect style="width: 100%;" src='jcsj/common/bm/queryGs' filterable clearable :match="{value:'id',label:'bmmc'}" v-model='queryParams.gsid' ></RelSelect> <span class="search-span">公司:</span>
</div> <RelSelect style="width: 100%;" src='jcsj/common/bm/queryGs' filterable clearable
</el-col> :match="{value:'id',label:'bmmc'}" v-model='queryParams.gsid'></RelSelect>
<el-col :span="6" class="search-col"> </div>
<div class="search-item"> </el-col>
<span class="search-span">班组:</span> <el-col :span="6" class="search-col">
<RelSelect linkage :linkParams="{pid:queryParams.gsid}" style="width: 100%;" src='jcsj/common/bm/queryBz' filterable clearable :match="{value:'id',label:'bmmc'}" v-model='queryParams.bmid' ></RelSelect> <div class="search-item">
</div> <span class="search-span">班组:</span>
</el-col> <RelSelect linkage :linkParams="{pid:queryParams.gsid}" style="width: 100%;" src='jcsj/common/bm/queryBz'
<el-col :span="6" class="search-col"> filterable clearable :match="{value:'id',label:'bmmc'}" v-model='queryParams.bmid'></RelSelect>
<div class="search-item"> </div>
<span class="search-span">任务类型:</span> </el-col>
<RelSelect style="width: 100%;" src='aqgl/fxyk/fxpc/init/rwlx' clearable :match="{value:'id',label:'name'}" v-model='queryParams.rwlx' ></RelSelect> <el-col :span="6" class="search-col">
</div> <div class="search-item">
</el-col> <span class="search-span">任务类型:</span>
</el-row> <RelSelect style="width: 100%;" src='aqgl/fxyk/fxpc/init/rwlx' clearable :match="{value:'id',label:'name'}"
</div> v-model='queryParams.rwlx'></RelSelect>
<!-- 按钮操作--> </div>
<el-row class="tool-bar"> </el-col>
<PrintButton :app='app'></PrintButton> </el-row>
<ViewButton ref="view" :app='app'></ViewButton> </div>
<!-- <AddButton ref="add" :app='app'></AddButton> <!-- 按钮操作-->
<el-row class="tool-bar">
<PrintButton :app='app'></PrintButton>
<ViewButton ref="view" :app='app'></ViewButton>
<!-- <AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton> <CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton> --> <EditButton ref="edit" :app='app'></EditButton> -->
<AttachFileShow :app='app'></AttachFileShow> <AttachFileShow :app='app'></AttachFileShow>
<FieldButton :app='app'></FieldButton> <FieldButton :app='app'></FieldButton>
<ExcelButton :app='app'></ExcelButton> <ExcelButton :app='app'></ExcelButton>
<el-button size='mini' @click="zdzrr" type="primary">指定责任人</el-button> <el-button size='mini' @click="zdzrr" type="primary">指定责任人</el-button>
<!-- 额外按钮--> <el-button size='mini' @click="wc" type="primary">完成</el-button>
<!-- 表头设置 --> <!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row> <!-- 权限-->
<!-- 表格--> </el-row>
<div class="tablePagers"> <!-- 表格-->
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem' <div class="tablePagers">
@getRow='getRow'> <TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
<template slot="tabCustom"> @getRow='getRow'>
<el-table-column label="关联隐患" width="90" header-align="center" > <template slot="tabCustom">
<template slot-scope="scope" > <el-table-column label="关联隐患" width="90" header-align="center">
<span @click="watchglyh(scope.row)" style="color: cornflowerblue;cursor: pointer;line-height: 30px;text-align: center;width: 70px;display: inline-block;">查看</span> <template slot-scope="scope">
</template> <span @click="watchglyh(scope.row)"
</el-table-column> style="color: cornflowerblue;cursor: pointer;line-height: 30px;text-align: center;width: 70px;display: inline-block;">查看</span>
</template> </template>
</TablePager> </el-table-column>
</div> </template>
</TablePager>
</div> </div>
<!-- <div class="min_full" style="height: 60%;padding: 10px;"> </div>
<!-- <div class="min_full" style="height: 60%;padding: 10px;">
<el-tabs v-model="activeName" > <el-tabs v-model="activeName" >
<el-tab-pane label="检查标准" name="first" > <el-tab-pane label="检查标准" name="first" >
<Details ref="Details" /> <Details ref="Details" />
...@@ -100,22 +106,22 @@ ...@@ -100,22 +106,22 @@
</el-tabs> </el-tabs>
</div> --> </div> -->
<!-- </div> --> <!-- </div> -->
</template> </template>
<script> <script>
import Zdzrr from './zdzrr' import Zdzrr from './zdzrr'
/* 引入需要的接口*/ /* 引入需要的接口*/
/* 引入需要的接口*/ /* 引入需要的接口*/
import { import {
doQuery, doQuery,
doAdd, doAdd,
doUpdate, doUpdate,
doDelete, doDelete,
} from "@/api/riskPrecontrol/maintenanceRiskTask.js"; } from "@/api/riskPrecontrol/maintenanceRiskTask.js";
import { import {
doQueryScgw doQueryScgw
} from "@/api/riskPrecontrol/screeningCriteria.js"; } from "@/api/riskPrecontrol/screeningCriteria.js";
/* edit页面*/ /* edit页面*/
import Edit from './edit' import Edit from './edit'
import Details from './details.vue' import Details from './details.vue'
...@@ -130,23 +136,25 @@ import Zdzrr from './zdzrr' ...@@ -130,23 +136,25 @@ import Zdzrr from './zdzrr'
/* 初始额外赋值*/ /* 初始额外赋值*/
async mounted() { async mounted() {
await this.$asRun( await this.$asRun(
[doQueryScgw(), [doQueryScgw(),
res => { res => {
var data = res['data']['records']; var data = res['data']['records'];
this.doQueryScgw = data this.doQueryScgw = data
} }
] ]
) )
this.$refs['TablePager'].pageQuery({setFirstCurrent:true}) this.$refs['TablePager'].pageQuery({
setFirstCurrent: true
})
console.log(this) console.log(this)
}, },
data() { data() {
return { return {
DialogTitle:'指定检查人', DialogTitle: '指定检查人',
/*需要的额外参数 */ /*需要的额外参数 */
showDialog:false, showDialog: false,
doQueryScgw:[], doQueryScgw: [],
activeName: 'first', activeName: 'first',
/*需要的额外参数 */ /*需要的额外参数 */
showDialog: false, showDialog: false,
...@@ -156,54 +164,137 @@ import Zdzrr from './zdzrr' ...@@ -156,54 +164,137 @@ import Zdzrr from './zdzrr'
baseUrl: '/aqgl/fxyk/fxpc', baseUrl: '/aqgl/fxyk/fxpc',
/* 查询参数*/ /* 查询参数*/
queryParams: { queryParams: {
rwlx:'', rwlx: '',
queryType:'fxpc', queryType: 'fxpc',
gsid:'', gsid: '',
bmid:'', bmid: '',
jcr:'', jcr: '',
zt:'', zt: '',
ksrq: new Date().getTime()-1000*60*60*24*30, ksrq: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
jsrq: new Date().getTime() jsrq: new Date().getTime()
}, },
/* 表格标题对应参数*/ /* 表格标题对应参数*/
tableTitle: [ tableTitle: [
// {label: "ID", prop: "id", fieldType: "ftString",width:192}, // {label: "ID", prop: "id", fieldType: "ftString",width:192},
// {label: "单据来源", prop: "djly", fieldType: "ftString",width:60}, // {label: "单据来源", prop: "djly", fieldType: "ftString",width:60},
// {label: "风险排查标准编码", prop: "fxbzid", fieldType: "ftString",width:192}, // {label: "风险排查标准编码", prop: "fxbzid", fieldType: "ftString",width:192},
{label: "状态", prop: "ztName", fieldType: "ftString",width:50}, {
{label: "任务类型", prop: "rwlxName", fieldType: "ftString",width:100}, label: "状态",
{label: "下达日期", prop: "xdrq", fieldType: "ftDate"}, prop: "ztName",
// {label: "截止日期", prop: "jzrq", fieldType: "ftDateTime"}, fieldType: "ftString",
{label: "检查时间", prop: "sjjcsj", fieldType: "ftDateTime"}, width: 50
{label: "创建时间", prop: "cjsj", fieldType: "ftDateTime"}, },
{label: "检查岗位", prop: "gwName", fieldType: "ftString",width:192}, {
{label: "检查内容", prop: "nr", fieldType: "ftString",width:300}, label: "任务类型",
{label: "检查部位", prop: "jcyd", fieldType: "ftString",width:300}, prop: "rwlxName",
{label: "检查人", prop: "jcrName", fieldType: "ftString",width:192}, fieldType: "ftString",
{label: "地点", prop: "fxpcdd", fieldType: "ftString",width:192}, width: 100
{label: "风险点", prop: "fxd", fieldType: "ftString",width:192}, },
{label: "公司", prop: "gsName", fieldType: "ftString",width:192}, {
{label: "班组", prop: "bzName", fieldType: "ftString",width:192}, label: "下达日期",
], prop: "xdrq",
timer:false, fieldType: "ftDate"
},
// {label: "截止日期", prop: "jzrq", fieldType: "ftDateTime"},
{
label: "检查时间",
prop: "sjjcsj",
fieldType: "ftDateTime"
},
{
label: "创建时间",
prop: "cjsj",
fieldType: "ftDateTime"
},
{
label: "检查岗位",
prop: "gwName",
fieldType: "ftString",
width: 192
},
{
label: "检查内容",
prop: "nr",
fieldType: "ftString",
width: 300
},
{
label: "检查部位",
prop: "jcyd",
fieldType: "ftString",
width: 300
},
{
label: "检查人",
prop: "jcrName",
fieldType: "ftString",
width: 192
},
{
label: "地点",
prop: "fxpcdd",
fieldType: "ftString",
width: 192
},
{
label: "风险点",
prop: "fxd",
fieldType: "ftString",
width: 192
},
{
label: "公司",
prop: "gsName",
fieldType: "ftString",
width: 192
},
{
label: "班组",
prop: "bzName",
fieldType: "ftString",
width: 192
},
],
timer: false,
} }
}, },
methods: { methods: {
watchglyh(row){ wc() {
this.watchglyh.fxpcid=row.id if (this.singleItem && this.singleItem.id) {
this.$confirm('是否继续该操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
this.$post('/aqgl/fxyk/fxpc/complete', {
id: this.singleItem.id,
bmId: this.singleItem.bmid
}).then(res => {
if (res.success) {
this.$refs['TablePager'].pageQuery()
}
})
})
} else {
this.$warning('请选中一条数据')
}
},
watchglyh(row) {
this.watchglyh.fxpcid = row.id
this.showDialog = true this.showDialog = true
this.DialogTitle='关联隐患' this.DialogTitle = '关联隐患'
this.DialogName='关联隐患' this.DialogName = '关联隐患'
}, },
zdzrr(){ zdzrr() {
if (this.app.selectOne || this.app.clickOne) { if (this.app.selectOne || this.app.clickOne) {
this.showDialog = true this.showDialog = true
this.DialogTitle='指定检查人' this.DialogTitle = '指定检查人'
this.DialogName='指定检查人' this.DialogName = '指定检查人'
} else { } else {
this.$warning('请选中一行操作'); this.$warning('请选中一行操作');
} }
}, },
getRow: function(e) { getRow: function(e) {
...@@ -220,12 +311,12 @@ import Zdzrr from './zdzrr' ...@@ -220,12 +311,12 @@ import Zdzrr from './zdzrr'
/* 基础查询*/ /* 基础查询*/
/* 基础查询*/ /* 基础查询*/
query: doQuery, query: doQuery,
/* 基础增*/ /* 基础增*/
apiAdd: doAdd, apiAdd: doAdd,
/* 基础更新*/ /* 基础更新*/
apiUpdate: doUpdate, apiUpdate: doUpdate,
/* 删除操作*/ /* 删除操作*/
apiDelete: doDelete, apiDelete: doDelete,
init() { init() {
}, },
......
...@@ -42,6 +42,13 @@ ...@@ -42,6 +42,13 @@
<RelSelect style="width: 100%;" src='jcsj/common/bm/queryGs' filterable clearable :match="{value:'id',label:'bmmc'}" v-model='queryParams.gsid' ></RelSelect> <RelSelect style="width: 100%;" src='jcsj/common/bm/queryGs' filterable clearable :match="{value:'id',label:'bmmc'}" v-model='queryParams.gsid' ></RelSelect>
</div> </div>
</el-col> </el-col>
<!-- <el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">部门:</span>
<RelSelect linkage :linkParams="{pid:queryParams.gsid}" style="width: 100%;" src='jcsj/common/bm/queryBz' filterable clearable :match="{value:'id',label:'bmmc'}" v-model='queryParams.bmid' ></RelSelect>
</div>
</el-col> -->
<el-col :span="6" class="search-col"> <el-col :span="6" class="search-col">
<div class="search-item"> <div class="search-item">
<span class="search-span">班组:</span> <span class="search-span">班组:</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment