huxinglu 4 роки тому
джерело
коміт
9b46ae8c4f
9 змінених файлів з 1035 додано та 16 видалено
  1. +9
    -0
      src/App.vue
  2. +30
    -1
      src/api/app/list.js
  3. +53
    -0
      src/api/basicData/driver.js
  4. +213
    -14
      src/views/app/list/index.vue
  5. +49
    -0
      src/views/assessment/content.vue
  6. +180
    -0
      src/views/basicdata/driver/driverForm.vue
  7. +207
    -0
      src/views/basicdata/driver/index.vue
  8. +275
    -0
      src/views/basicdata/oneDriver/index.vue
  9. +19
    -1
      src/views/business/inspectDriver/inspectReport.vue

+ 9
- 0
src/App.vue Переглянути файл

@@ -257,4 +257,13 @@
display: none!important;
}

.el-dialog {
width: 500px!important;
}

.el-textarea.is-disabled .el-textarea__inner {
background-color: #ffffff!important;
color: #ffffff;
}

</style>

+ 30
- 1
src/api/app/list.js Переглянути файл

@@ -16,8 +16,37 @@ export default {
method: "GET",
url: '/api/front/app/getPoints/'+id
})
}
},

getAppDetail(id) {
return axios({
method: "GET",
url: '/api/front/inspectDriver/appDetail',
params:{
id
}
})
},

getReportDetail(id) {
return axios({
method: "GET",
url: '/api/front/report/detail',
params:{
id
}
})
},

getInspectfileView(id) {
return axios({
method: "GET",
url: '/api/front/inspectfile/view',
params:{
id
}
})
}
}



+ 53
- 0
src/api/basicData/driver.js Переглянути файл

@@ -1,6 +1,9 @@
import axios from '../api'

export default {
getBaseData(params) {
return axios.get('/api/driver/baseData', JSON.stringify(params))
},
getDriverList(params) {
return axios({
method: "GET",
@@ -17,6 +20,56 @@ export default {
data: {}
})
},

getDriverIndexList(params) {
return axios({
method: "GET",
url: '/api/front/driver/index',
params: {
...params
}
})
},

getDriverDetail(driverId) {
return axios({
method: "GET",
url: '/api/front/driver/detail',
params: {
driverId
}
})
},

getOneDriverIndexList(params) {
return axios({
method: "GET",
url: '/api/front/driver/list',
params: {
...params
}
})
},

upload(params) {
return axios({
method: "POST",
url: '/api/front/driver/upload',
data: params,
timeout: 1000000,
headers: {
'Content-Type': 'multipart/form-data'
}
})
},

describe(params) {
return axios({
method: "POST",
url: '/api/front/driver/describe',
data: params
})
},
}



+ 213
- 14
src/views/app/list/index.vue Переглянути файл

@@ -59,8 +59,8 @@
<el-table-column :index="indexMethod" label="序号" type="index" width="80" align="center"/>
<el-table-column width="120" show-overflow-tooltip prop="inspectNo" label="任务单号" align="center">
<template slot-scope="scoped">
<!-- <a v-if="btnRule.usernotice_add" href="javascript:void(0);" @click="detailNo(scoped.row)">{{scoped.row.inspectNo}}</a>-->
<span>{{scoped.row.inspectNo}}</span>
<a v-if="btnRule.front_inspectDriver_appDetail" href="javascript:void(0);" @click="detailNo(scoped.row)">{{scoped.row.inspectNo}}</a>
<span v-else>{{scoped.row.inspectNo}}</span>
</template>
</el-table-column>
<el-table-column width="60" show-overflow-tooltip prop="num" label="行号" align="center"/>
@@ -80,19 +80,19 @@
<el-table-column width="160" show-overflow-tooltip prop="beginTime" label="巡查时间" align="center"/>
<el-table-column width="60" show-overflow-tooltip prop=""
label="报告" align="center">
<!-- <template slot-scope="{row}">-->
<!-- <el-tooltip v-if="row.reportId" class="item" effect="dark" content="查看报告" placement="bottom">-->
<!-- <el-button @click="getDetail(row.reportId)" type="primary" size="mini" icon="el-icon-document"/>-->
<!-- </el-tooltip>-->
<!-- </template>-->
<template slot-scope="{row}">
<el-tooltip v-if="btnRule.front_report_detail&&row.reportId" class="item" effect="dark" content="查看报告" placement="bottom">
<el-button @click="getDetail(row.reportId)" type="primary" size="mini" icon="el-icon-document"/>
</el-tooltip>
</template>
</el-table-column>
<el-table-column width="80" show-overflow-tooltip prop=""
label="图像资料" align="center">
<!-- <template slot-scope="{row}">-->
<!-- <el-tooltip v-if="row.status==4" class="item" effect="dark" content="查看图像" placement="bottom">-->
<!-- <el-button @click="setMark(row)" type="primary" size="mini" icon="el-icon-picture"/>-->
<!-- </el-tooltip>-->
<!-- </template>-->
<template slot-scope="{row}">
<el-tooltip v-if="btnRule.front_inspectfile_view" class="item" effect="dark" content="查看图像" placement="bottom">
<el-button @click="setMark(row)" type="primary" size="mini" icon="el-icon-picture"/>
</el-tooltip>
</template>
</el-table-column>

</el-table>
@@ -117,6 +117,29 @@
:before-close="handleRrajectoryClose">
<trajectory-dialog :isApp="true" :driverId="driverId" v-if="trajectoryVisible"></trajectory-dialog>
</el-drawer>
<report :isApp="true" :inspectId="id" :visible="reportVisible" @goBack="reportVisible=false" v-if="reportVisible"></report>
<el-dialog :close-on-press-escape="false" :close-on-click-modal="false" ref="dialogForm" top="5vh" center
class="detail-dialog" :visible.sync="detailVisible">
<pReport :mapImg="mapImg" v-if="detailVisible" typeName="query" :ruleForm="ruleForm"></pReport>
<span slot="footer" class="dialog-footer no-print">
<el-button @click="pointMain('reportPoint')" type="primary" size="medium"
icon="el-icon-printer">打印</el-button>
<el-button size="medium" icon="el-icon-back"
@click="detailVisible = false">返回
</el-button>
</span>
</el-dialog>
<el-dialog :close-on-press-escape="false" :close-on-click-modal="false" class="image-dialog" top="2vh" center
:visible.sync="imageVisible" title="图片">
<image-list selectType="1" ref="imageList" type="show" :imageDetail="imageDetail"
:documentList="documentList"
v-if="imageVisible"></image-list>
<span slot="footer" class="dialog-footer">
<el-button size="medium" icon="el-icon-back"
@click="imageVisible = false">返回
</el-button>
</span>
</el-dialog>
</div>
</template>

@@ -125,15 +148,28 @@
import driverAreaSelect from "@/components/driverAreaSelect";
import {mapGetters} from "vuex";
import trajectoryDialog from '@/components/trajectoryDialog'
import report from '../../business/inspectDriver/inspectReport'
import pReport from '@/components/report'
import html2canvas from 'html2canvas'
import $ from 'jquery'
import imageList from '@/components/imageList'
import inspectfileApi from '@/api/file/inspectfile'


export default {
name: "app-list",
data() {
return {
documentList: {},
imageVisible:false,
imageDetail:{},
mapImg: '',
detailVisible:false,
trajectoryVisible:false,
visible: false,
dataList: [],
id:'',
reportVisible:false,
currentPage: 1,
count: 0,
driverId:'',
@@ -146,20 +182,165 @@
area: "",
driverName: "",
time: ""
}
},
ruleForm: {
videoUrl: '',
imageUrl: '',
examineScore: [],
manyiExamineScore: '',
manyiCheckScore: '',
totalExamineScore: '',
totalCheckScore: '',
desc: '',
descriptionList: [],
filterQuestionList: []
},
};
},
computed: {
...mapGetters(["btnRule"])
},
components: {driverAreaSelect,trajectoryDialog},
components: {driverAreaSelect,trajectoryDialog,report,pReport,imageList},
created() {
},
mounted() {
this.tableLoading = true;
this.getAllList();
this.getDocument()
},
methods: {
getDocument() {
inspectfileApi.getDocument().then(res => {
this.documentList = res.data ? res.data : {}
}).catch(e => {
this.documentList = {}
})
},
setMark(row) {
this.tableLoading = true
let method = 'getInspectfileView'
api[method](row.inspectDriverId).then(res => {
this.tableLoading = false
let imageDetail = {
taskId: row.id,
driverName: row.driverName,
formatExecutionStartTime: row.formatInspectTime,
imgList: res.data ? res.data : []
}
this.imageDetail = Object.assign({}, imageDetail)
this.imageVisible = true
this.tableLoading = false
}).catch(e => {
this.tableLoading = false
})
},
print(content, w = null, h = null) {
const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : screen.left;
const dualScreenTop = window.screenTop !== undefined ? window.screenTop : screen.top;

const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;
w = +w === 0 ? width : w;
h = +h === 0 ? height : h;
const left = ((width / 2) - (w / 2)) + dualScreenLeft;
const top = ((height / 2) - (h / 2)) + dualScreenTop;
var myWindow = window.open("", "打印", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=" + w + ", height=" + h + ", top=" + top + ", left=" + left);
var style = "<style type='text/css'>table.gridtable {font-family: verdana,arial,sans-serif;font-size:11px;color:#333333;border-width: 1px;border-color: #666666;border-collapse: collapse;}table.gridtable th {border-width: 1px;padding: 8px;border-style: solid;border-color: #666666;background-color: #dedede;}table.gridtable td {border-width: 1px;padding: 8px;border-style: solid;border-color: #666666;background-color: #ffffff;}</style>";
myWindow.document.write(content + style);
myWindow.focus();
myWindow.document.close(); //关闭document的输出流, 显示选定的数据
$(myWindow).ready(function () {
myWindow.print();
myWindow.close()
});
return myWindow;
},
pointMain(name) {
let me = this
if (name == 'reportPoint') {
let reportMap = document.getElementById('reportMap')
if (reportMap) {
html2canvas(reportMap, {
backgroundColor: 'white',
scale: 2,
dpi: 300
}).then((canvas) => {
let dataURL = canvas.toDataURL("image/png");
me.mapImg = dataURL
me.$nextTick(function () {
me.print(document.getElementById('reportPoint').innerHTML);
me.mapImg = ''
})
});
} else {
me.print(document.getElementById('reportPoint').innerHTML);
}
} else {
me.print(document.getElementById(name).innerHTML);
}
},
initRuleForm() {
this.ruleForm = {
videoUrl: '',
imageUrl: '',
examineScore: [],
manyiExamineScore: '',
manyiCheckScore: '',
totalExamineScore: '',
totalCheckScore: '',
desc: '',
descriptionList: [],
filterQuestionList: [],
}
},
getDetail(id) {
this.tableLoading = true
api.getReportDetail( id).then(res => {
this.tableLoading = false
this.initRuleForm()
let ruleForm = JSON.parse(JSON.stringify(res.data))
let questionList = ruleForm.questionList
let filterQuestionList = []
let categoryList = []
questionList.map(item => {
if (!categoryList.some(category => category == item.category)) {
categoryList.push(item.category)
}
})
categoryList.sort(function (a, b) {
return a - b
})
categoryList.map(category => {
let list = questionList.filter(item => item.category == category)
let typeList = []
list.map(item => {
if (!typeList.some(type => type == item.type)) {
typeList.push(item.type)
}
})
typeList.sort(function (a, b) {
return a - b
})
let filter = []
typeList.map(type => {
let filterType = list.filter(item => item.type == type)
filterType[0].typeRow = filterType.length
filter = filter.concat(filterType)
})
filter[0].categoryRow = list.length
filterQuestionList = filterQuestionList.concat(filter)
})
ruleForm.filterQuestionList = filterQuestionList
this.ruleForm = Object.assign({}, ruleForm)
this.detailVisible = true
}).catch(e => {
this.tableLoading = false
})
},
detailNo(row) {
this.id=row.inspectDriverId
this.reportVisible=true
},
handleRrajectoryClose(){
this.trajectoryVisible=false
},
@@ -219,5 +400,23 @@
background-color: #fff;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
padding: 15px;
.detail-dialog {
.el-dialog {
width: 80% !important;

.el-dialog__header {
padding: 0 !important;

.el-dialog__headerbtn .el-dialog__close {
color: #333333 !important;
}
}
}
}
.image-dialog {
.el-dialog {
width: 600px !important;
}
}
}
</style>

+ 49
- 0
src/views/assessment/content.vue Переглянути файл

@@ -0,0 +1,49 @@
<template>
<div class="content">
<div style="text-align: center;font-size: 20px">南京市河湖长制工作考核办法</div>
<div>为深入贯彻市委市政府《关于全面推行河长制的实施意见》(宁委办发〔2017〕18号)和《关于进一步落实全市湖长制工作的通知》(宁委办发〔2018〕59号)文件精神,落实河湖长制工作要求和河湖管理保护责任,制定本考核办法。</div>
<div>第一条 考核主体。市级考核工作由市河长办组织实施。</div>
<div>第二条 考核对象。江北新区管委会,各区人民政府,中山陵园管理局。</div>
<div>第三条 考核范围。区级河长制基础工作,纳入河湖长制管理的河湖治理与管护成效。</div>
<div>第四条 考核方式。市级每年开展一次年度考核,年度考核由日常工作评分、河湖评价、年终考核等3个部分组成,考核得分采用百分制,其中日常工作评分占40%、河湖评价占40%、年终考核占20%。</div>
<div>第五条 考核内容。</div>
<div>(一)日常工作评分主要内容:各区河湖长制基础工作情况,区级河(湖)长日常巡河履职情况,河湖日常管护情况,年度专项任务推进情况等。</div>
<div>(二)河湖评价主要内容:区级及以上河(湖)长责任河湖水域岸线管护成效,入河湖支流、排口、水面、水体感观状况,河湖水质达标状况,各区河湖长制工作的群众知晓度和满意度测评等。</div>
<div>(三)年终考核主要内容:样板河湖打造情况、年度河长制工作要点落实情况,上级下达的专项整治年度任务完成情况,黑臭水体、劣V类水体整治年度任务完成情况、水污染防治年度目标完成情况等。审议第三方河湖评价初评报告,核实加减分项,汇总考核总分。</div>
<div>第六条 考核流程。</div>
<div>(一)开展日常工作评分。市级相关单位根据日常工作评分表,结合本部门职能,参评日常工作及重点任务完成情况评分。</div>
<div>(二)开展河湖评价。由第三方开展对区级河(湖)长责任河湖管护成效巡检评估,开展河长制知晓度、满意度测评,于每年12月初将初评报告报市河长办。</div>
<div>(三)年终考核。市河长办组织集中进行现场查看、查阅资料、审议河湖评价报告,根据各区工作完成情况,分别对各区进行评分。</div>
<div>(五)结果审定。市河长办汇总考核结果,撰写年度考核报告,报请总河长审定。</div>
<div>第七条 市河长办负责制定每年度河湖长制工作要点、年度考核评分表,并上报年度考核报告。</div>
<div> 第八条 市河长办成员单位及有关部门依据部门职责和考核分工,对被考核对象河湖长制工作实施情况考核评分,市河长办汇总报总河长审定后公示。</div>
<div>第九条 考核等次。考核等次设为优秀、良好、合格、不合格四个等次。综合考核得分90分以上(含,下同)评定为优秀,80-89分评定为良好,70-79分评定为合格,70分以下的评定为不合格。</div>
<div> 第十条 出现下列情形之一的,直接认定不合格:</div>
<div>(一)发生重大水污染事故造成社会不良影响的。</div>
<div>(二)发生饮用水水源地污染事件,严重影响供水安全的。</div>
<div>(三)发生防洪工程溃坝、决口等重大防洪安全事故的。</div>
<div>(四)因河湖管理不到位,河湖水质严重恶化,或发生严重违法行为等,被国家、省里批评,限期整改不到位的。</div>
<div>(五)干预、伪造考核数据、资料,人为干扰考核工作,造成不良影响的。</div>
<div>第十一条 结果运用。年终考核结果与市委市政府《对标找差创新实干推动高质量发展》综合考核挂钩,排名靠前的区给予奖励,考核不合格的区由市级总河长约谈区级总河长。考核结果抄送组织人事部门,作为党政领导综合考核的依据。同时纳入领导干部自然资源资产离任审计的考核体系,作为离任审计的重要参考。因河湖长履职不力,责任河湖因严重问题被省、市级通报或媒体曝光造成不良影响的,由区总河长约谈,责任河湖长不得评先进。造成责任河湖生态资源遭到严重破坏的要严厉问责。</div>
<div>第十二条 区级及以下考核工作可结合实际情况参照执行。本办法由市河长办负责解释,自印发之日起施行</div>
</div>
</template>

<script>
export default {
name: "content"
}
</script>

<style lang="less">
.content {
height: fit-content;
background-color: #fff;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
padding: 15px 50px 35px 50px;
>div{
margin-top: 20px;
line-height: 30px;
}
}
</style>

+ 180
- 0
src/views/basicdata/driver/driverForm.vue Переглянути файл

@@ -0,0 +1,180 @@
<template>
<div class="driver-form">
<el-form ref="ruleForm" :model="ruleForm" size="small" label-width="100px">
<el-form-item label="河湖类型" prop="type" :rules="{
required: true, message: '河湖类型不能为空', trigger: 'change'
}">
<el-select :disabled="true" filterable clearable v-model="ruleForm.type" size="small"
>
<el-option v-for="(value,key,index) in typeList" :key="key" :label="value" :value="parseInt(key)"/>
</el-select>
</el-form-item>
<el-form-item label="河湖名称" prop="name" :rules="[{
required: true, message: '河湖名称不能为空', trigger: 'blur'
},
{min: 2, max: 20, message: '长度在2 到 20 个字符', trigger: 'blur'}]">
<el-input maxlength="20" :disabled="true" clearable v-model="ruleForm.name" size="small"/>
</el-form-item>
<el-form-item label="河湖等级" prop="level" :rules="{
required: true, message: '河湖等级不能为空', trigger: 'change'
}">
<el-select :disabled="true" filterable clearable v-model="ruleForm.level" size="small"
>
<el-option v-for="(value,key,index) in levelList" :key="key" :label="value" :value="parseInt(key)"/>
</el-select>
</el-form-item>
<el-form-item label="河长" prop="driverManager" :rules="[{
required: true, message: '河长不能为空', trigger: 'change'
}]">
<el-input maxlength="20" :disabled="true" clearable v-model="ruleForm.driverManagerName" size="small"/>
</el-form-item>
<el-form-item label="起点" prop="startPoint" :rules="[
{min: 0, max: 50, message: '最多50 个字符', trigger: 'blur'}]">
<el-input maxlength="50" :disabled="true" clearable v-model="ruleForm.startPoint" size="small"
/>
</el-form-item>
<el-form-item label="终点" prop="endPoint" :rules="[
{min: 0, max: 50, message: '最多50 个字符', trigger: 'blur'}]">
<el-input maxlength="50" :disabled="true" clearable v-model="ruleForm.endPoint" size="small"/>
</el-form-item>
<el-form-item label="河道长度" prop="length" :rules="{
validator: validateNum, trigger: 'blur'
}">
<el-input maxlength="9" :disabled="true" clearable v-model="ruleForm.length" size="small" />
</el-form-item>
<el-form-item label="区划" prop="driverArea" :rules="{
required: true, message: '区划不能为空', trigger: 'change'
}">
<driverAreaSelect :clearValidate="clearValidate" :disabled="true" v-model="ruleForm.driverArea"></driverAreaSelect>
</el-form-item>
<el-form-item label="水质标准" prop="category">
<el-select :disabled="true" filterable clearable v-model="ruleForm.category" size="small"
>
<el-option v-for="(item,index) in categoryList" :key="index" :label="item.name" :value="item.id"/>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="note" :rules="[
{min: 0, max: 200, message: '最多200个字符', trigger: 'blur'}]">
<el-input :disabled="true" show-word-limit maxlength="200" clearable type="textarea" rows="5" v-model="ruleForm.note" size="small" />
</el-form-item>
</el-form>
<div style="text-align: center">
<el-button icon="el-icon-back" style="margin-left: 15px" size="medium"
@click="onBack('ruleForm')">返回
</el-button>
</div>
</div>
</template>

<script>
import driverApi from '@/api/basicData/driver'
import driverAreaSelect from '@/components/driverAreaSelect'

export default {
name: "driverForm",
data() {
var patrn = /^\d+(\.\d+)?$/;
var lengthP = /^(\d+)(.\d{0,4})?$/
var validateNum = (rule, value, callback) => {
if (!value) {
callback();
} else {
if (rule.field == "length") {
if (!lengthP.test(value)) {
callback(new Error('小数点最多4位'));
}else if (parseInt(value)>9999) {
callback(new Error('最大10000'));
} else {
callback();
}
}else{
if (!patrn.test(value)) {
callback(new Error('请输入数字'));
} else {
callback();
}
}
}
};
return {
validateNum: validateNum,
addBtnLoading: false,
categoryList:[
{id:'categoryOne',name:'Ⅰ类'},
{id:'categoryTwo',name:'Ⅱ类'},
{id:'categoryThree',name:'Ⅲ类'},
{id:'categoryFour',name:'Ⅳ类'},
{id:'categoryFive',name:'Ⅴ类'},
]
}
},
props: {
ruleForm: {
type: Object,
default() {
return {};
}
},
userList:{
type: Array,
default() {
return [];
}
},
typeList: {
type: Object,
default() {
return {};
}
},
levelList: {
type: Object,
default() {
return {};
}
}
},
components: {driverAreaSelect},
created() {
},
mounted() {
},
methods: {
clearValidate(){
this.$refs.ruleForm.clearValidate('driverArea')
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let method = 'addDriver'
if (this.ruleForm.id) {
method = 'editDriver'
}
let ruleForm=JSON.parse(JSON.stringify(this.ruleForm))
this.addBtnLoading = true
driverApi[method](ruleForm).then(res => {
this.addBtnLoading = false
this.$refs[formName].resetFields()
this.$message({
type: 'success',
message: this.ruleForm.id ? '修改成功' : '添加成功'
})
if (this.ruleForm.id) {
this.$emit('submit', 2)
this.$emit('onBack')
} else {
this.$emit('submit', 1)
}
}).catch(e => {
this.addBtnLoading = false
})
}
})
},
onBack() {
this.$refs['ruleForm'].resetFields()
this.$emit('onBack')
}
}
}
</script>

+ 207
- 0
src/views/basicdata/driver/index.vue Переглянути файл

@@ -0,0 +1,207 @@
<template>
<div class="driver-container">
<el-form :inline="true" :model="searchParam" class="demo-form-inline">
<el-form-item label="区划">
<driverAreaSelect v-model="searchParam.driverArea"></driverAreaSelect>
</el-form-item>
<el-form-item label="河湖名称">
<el-input clearable v-model="searchParam.name" size="small" placeholder="请输入河道名称"
style="width: 200px"/>
</el-form-item>
<el-form-item label="河湖类型">
<el-select clearable v-model="searchParam.type" size="small" placeholder="-请选择-"
style="width: 150px">
<el-option v-for="(value,key,index) in typeList" :key="key" :label="value" :value="key"/>
</el-select>
</el-form-item>
<el-form-item label="河湖等级">
<el-select clearable v-model="searchParam.level" size="small" placeholder="-请选择-"
style="width: 150px">
<el-option v-for="(value,key,index) in levelList" :key="key" :label="value" :value="key"/>
</el-select>
</el-form-item>
<el-form-item>
<el-button :loading="tableLoading" @click="search" size="small" icon="el-icon-search" type="primary">搜索
</el-button>
<el-button @click="initSearchParam();search()" icon="el-icon-refresh-right"
type="primary" size="small"
style="background-color: #fff; border: 1px solid #ccc ; color: #666">清空
</el-button>
</el-form-item>
</el-form>
<el-table stripe ref="table" :height="tableHeight" v-loading="tableLoading"
:data="driverList"
size="medium"
border>
<el-table-column :index="indexMethod" label="序号" type="index" width="80" align="center"/>
<el-table-column show-overflow-tooltip prop="driverSn" label="河湖编码" align="center" width="100"/>
<el-table-column show-overflow-tooltip prop="name" label="河湖名称" align="center" min-width="120">
<template slot-scope="scoped">
<span>{{scoped.row.name}}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="driverManagerName" label="河长" align="center" min-width="80"/>
<el-table-column show-overflow-tooltip label="河湖类型" align="center" min-width="80">
<template slot-scope="{row}">
<el-tag :type="row.type === 2?'success':((row.type === 3||row.type === 4)?'warning':'')" size="small">
{{typeList[row.type]}}
</el-tag>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip label="河湖等级" align="center" min-width="100">
<template slot-scope="scoped">
<span v-if="scoped.row.level">{{levelList[scoped.row.level]}}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="driverAreaName" label="区划" min-width="200" align="center"/>
<el-table-column show-overflow-tooltip prop="startPoint" label="起点" align="center"/>
<el-table-column show-overflow-tooltip prop="endPoint" label="终点" align="center"/>
<el-table-column show-overflow-tooltip prop="length" label="长度(公里)" min-width="110" align="center"/>
<el-table-column width="100" label="操作" align="center">
<template slot-scope="scoped">
<el-button v-if="btnRule.front_driver_detail" @click="handleEdit(scoped.row)" type="primary" size="mini" icon="el-icon-view">详情</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<div class="page-current">
<el-pagination
background
:current-page="currentPage"
:page-size="pageSize"
prev-text="上一页"
next-text="下一页"
layout="total, prev, pager, next, jumper"
style="display: inline-block;"
@current-change="handleCurrentChange"
:total="count"/>
</div>
<el-dialog :close-on-press-escape="false" :close-on-click-modal="false" center :visible.sync="addDialogVisible"
title="河湖详情">
<driverForm :userList="userList" v-if="addDialogVisible" :levelList="levelList" :typeList="typeList"
ref="dialogForm" :ruleForm="ruleForm"
style="width: 100%" @onBack="onBack"></driverForm>
</el-dialog>
</div>
</template>

<script>
import driverApi from '@/api/basicData/driver'
import driverAreaSelect from '@/components/driverAreaSelect'
import driverForm from './driverForm'
import {mapGetters} from "vuex";

export default {
name: "driver",
data() {
return {
typeList: {},
levelList: {},
searchParam: {
name: '',
type: '',
level: '',
driverArea: ''
},
addDialogVisible: false,
ruleForm: {},
userList: [],
currentPage: 1,
pageSize: parseInt((document.body.clientHeight - 250 - 43) / 44.5),
count: 0,
driverList: [],
tableLoading: false,
tableHeight: document.body.clientHeight - 250
}
},
components: {driverForm, driverAreaSelect},
computed: {
...mapGetters(["btnRule", "isAdmin"])
},
created() {
},
mounted() {
this.tableLoading = true
let me = this
this.getBaseData(function () {
me.getAllList()
})
},
methods: {
indexMethod(index) {
return (index + 1) + ((this.currentPage - 1) * this.pageSize);
},
handleEdit(row) {
this.ruleForm = {}
driverApi.getDriverDetail(row.id).then(res => {
this.ruleForm =res.data?res.data:{}
this.addDialogVisible = true
}).catch(err => {
})
},
getAllList() {
let searchParam = JSON.parse(JSON.stringify(this.searchParam))
searchParam.page = this.currentPage
searchParam.pageSize = this.pageSize
driverApi.getDriverIndexList(searchParam).then(res => {
this.count = res.data.total
this.driverList = res.data.records
this.tableLoading = false
}).catch(err => {
this.driverList = []
this.tableLoading = false
})
},
search() {
this.currentPage = 1
this.tableLoading = true
this.$refs.table.bodyWrapper.scrollTop = 0;
this.getAllList()
},
handleCurrentChange(val) {
this.currentPage = val
this.tableLoading = true
this.$refs.table.bodyWrapper.scrollTop = 0;
this.getAllList()
},
initSearchParam() {
this.searchParam = {
name: '',
type: '',
level: '',
driverArea: ''
}
},
getBaseData(call) {
driverApi.getBaseData().then(res => {
const {area_list, level_list, type_list} = res.data
this.levelList = level_list ? level_list : {}
this.typeList = type_list ? type_list : {}
call()
}).catch(e => {
this.levelList = {}
this.typeList = {}
call()
})
},
onBack() {
this.addDialogVisible = false
}
}
}
</script>

<style lang="less">
.driver-container {
width: 100%;
height: fit-content;
background-color: #fff;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
padding: 15px;

.el-input.is-disabled .el-input__inner {
background-color: #fff !important;
color: #333 !important;
}
}
</style>

+ 275
- 0
src/views/basicdata/oneDriver/index.vue Переглянути файл

@@ -0,0 +1,275 @@
<template>
<div class="driver-container">
<el-form :inline="true" :model="searchParam" class="demo-form-inline">
<el-form-item label="区划">
<driverAreaSelect v-model="searchParam.driverArea"></driverAreaSelect>
</el-form-item>
<el-form-item label="河湖名称">
<el-input clearable v-model="searchParam.name" size="small" placeholder="请输入河道名称"
style="width: 200px"/>
</el-form-item>
<el-form-item label="河湖类型">
<el-select clearable v-model="searchParam.type" size="small" placeholder="-请选择-"
style="width: 150px">
<el-option v-for="(value,key,index) in typeList" :key="key" :label="value" :value="key"/>
</el-select>
</el-form-item>
<el-form-item label="河湖等级">
<el-select clearable v-model="searchParam.level" size="small" placeholder="-请选择-"
style="width: 150px">
<el-option v-for="(value,key,index) in levelList" :key="key" :label="value" :value="key"/>
</el-select>
</el-form-item>
<el-form-item>
<el-button :loading="tableLoading" @click="search" size="small" icon="el-icon-search" type="primary">搜索
</el-button>
<el-button @click="initSearchParam();search()" icon="el-icon-refresh-right"
type="primary" size="small"
style="background-color: #fff; border: 1px solid #ccc ; color: #666">清空
</el-button>
</el-form-item>
</el-form>
<el-table stripe ref="table" :height="tableHeight" v-loading="tableLoading"
:data="driverList"
size="medium"
border>
<el-table-column :index="indexMethod" label="序号" type="index" width="80" align="center"/>
<el-table-column show-overflow-tooltip prop="driverSn" label="河湖编码" align="center" width="100"/>
<el-table-column show-overflow-tooltip prop="name" label="河湖名称" align="center" min-width="120">
<template slot-scope="scoped">
<span>{{scoped.row.name}}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="driverManagerName" label="河长" align="center" min-width="80"/>
<el-table-column show-overflow-tooltip label="河湖类型" align="center" min-width="80">
<template slot-scope="{row}">
<el-tag :type="row.type === 2?'success':((row.type === 3||row.type === 4)?'warning':'')" size="small">
{{typeList[row.type]}}
</el-tag>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip label="河湖等级" align="center" min-width="100">
<template slot-scope="scoped">
<span v-if="scoped.row.level">{{levelList[scoped.row.level]}}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="driverAreaName" label="区划" min-width="100" align="center"/>
<el-table-column show-overflow-tooltip prop="startPoint" label="起点" align="center"/>
<el-table-column show-overflow-tooltip prop="endPoint" label="终点" align="center"/>
<el-table-column show-overflow-tooltip prop="length" label="长度(公里)" min-width="110" align="center"/>
<el-table-column width="280" label="操作" align="left">
<template slot-scope="scoped">
<el-button v-if="btnRule.front_driver_detail" @click="handleEdit(scoped.row)" type="primary" size="mini" icon="el-icon-view">详情</el-button>
<el-button v-if="scoped.row.fileUrl" @click="openUrl(scoped.row.fileUrl)" type="primary" size="mini" icon="el-icon-download">下载</el-button>
<el-button v-if="btnRule.front_driver_upload" @click="upload(scoped.row)" type="primary" size="mini" icon="el-icon-upload2">上传</el-button>
<el-button v-if="btnRule.front_driver_describe" @click="describe(scoped.row)" type="primary" size="mini" icon="el-icon-edit">描述</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<div class="page-current">
<el-pagination
background
:current-page="currentPage"
:page-size="pageSize"
prev-text="上一页"
next-text="下一页"
layout="total, prev, pager, next, jumper"
style="display: inline-block;"
@current-change="handleCurrentChange"
:total="count"/>
</div>
<el-dialog :close-on-press-escape="false" :close-on-click-modal="false" center :visible.sync="addDialogVisible"
title="河湖详情">
<driverForm :userList="userList" v-if="addDialogVisible" :levelList="levelList" :typeList="typeList"
ref="dialogForm" :ruleForm="ruleForm"
style="width: 100%" @onBack="onBack"></driverForm>
</el-dialog>
<input id="upload" type="file" name="file" @change="uploadClick" style="display: none;">
<el-dialog v-if="descriptionVisible" center :visible.sync="descriptionVisible"
title="一河一策描述">
<el-form ref="driverRowForm" :model="driverRow" size="small" label-width="60px">
<el-form-item label="描述" prop="description">
<el-input show-word-limit maxlength="200" clearable type="textarea" rows="5" v-model="driverRow.description" size="small" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button icon="el-icon-document-add" size="medium" :loading="descriptionLoading" type="primary"
@click="descriptionSubmit">提交</el-button>
<el-button icon="el-icon-back" size="medium" @click="descriptionVisible= false">取 消</el-button>
</span>
</el-dialog>
</div>
</template>

<script>
import driverApi from '@/api/basicData/driver'
import driverAreaSelect from '@/components/driverAreaSelect'
import driverForm from '../driver/driverForm'
import {mapGetters} from "vuex";
import $ from 'jquery'

export default {
name: "driver",
data() {
return {
descriptionLoading:false,
descriptionVisible:false,
driverRow:{},
typeList: {},
levelList: {},
searchParam: {
name: '',
type: '',
level: '',
driverArea: ''
},
addDialogVisible: false,
ruleForm: {},
description:{},
userList: [],
currentPage: 1,
pageSize: parseInt((document.body.clientHeight - 250 - 43) / 44.5),
count: 0,
driverList: [],
tableLoading: false,
tableHeight: document.body.clientHeight - 250
}
},
components: {driverForm, driverAreaSelect},
computed: {
...mapGetters(["btnRule", "isAdmin"])
},
created() {
},
mounted() {
this.tableLoading = true
let me = this
this.getBaseData(function () {
me.getAllList()
})
},
methods: {
descriptionSubmit(){
this.descriptionLoading=true
driverApi.describe(this.driverRow).then((rs) => {
this.$message({
type: "success",
message: "操作成功"
});
this.descriptionVisible=false
this.tableLoading=true
this.getAllList()
this.descriptionLoading=false
}, error => {
this.descriptionLoading=false
});
},

describe(row){
this.driverRow=Object.assign({},row)
this.$nextTick(function () {
this.descriptionVisible=true
})
},
openUrl(url){
window.open(url)
},
uploadClick(event) {
let file = event.target.files[0]
let formdata = new window.FormData()
formdata.append('file', file)
formdata.append('driverId',this.driverRow.id)
this.tableLoading=true
driverApi.upload(formdata).then((rs) => {
this.$message({
type: "success",
message: "上传成功"
});
this.getAllList()
}, error => {
this.tableLoading=false
});
event.target.value = ''
},
upload(row) {
this.driverRow=row
$('#upload').click()
},
indexMethod(index) {
return (index + 1) + ((this.currentPage - 1) * this.pageSize);
},
handleEdit(row) {
this.ruleForm = {}
driverApi.getDriverDetail(row.id).then(res => {
this.ruleForm =res.data?res.data:{}
this.addDialogVisible = true
}).catch(err => {
})
},
getAllList() {
let searchParam = JSON.parse(JSON.stringify(this.searchParam))
searchParam.page = this.currentPage
searchParam.pageSize = this.pageSize
driverApi.getOneDriverIndexList(searchParam).then(res => {
this.count = res.data.total
this.driverList = res.data.records
this.tableLoading = false
}).catch(err => {
this.driverList = []
this.tableLoading = false
})
},
search() {
this.currentPage = 1
this.tableLoading = true
this.$refs.table.bodyWrapper.scrollTop = 0;
this.getAllList()
},
handleCurrentChange(val) {
this.currentPage = val
this.tableLoading = true
this.$refs.table.bodyWrapper.scrollTop = 0;
this.getAllList()
},
initSearchParam() {
this.searchParam = {
name: '',
type: '',
level: '',
driverArea: ''
}
},
getBaseData(call) {
driverApi.getBaseData().then(res => {
const {area_list, level_list, type_list} = res.data
this.levelList = level_list ? level_list : {}
this.typeList = type_list ? type_list : {}
call()
}).catch(e => {
this.levelList = {}
this.typeList = {}
call()
})
},
onBack() {
this.addDialogVisible = false
}
}
}
</script>

<style lang="less">
.driver-container {
width: 100%;
height: fit-content;
background-color: #fff;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
padding: 15px;

.el-input.is-disabled .el-input__inner {
background-color: #fff !important;
color: #333 !important;
}
}
</style>

+ 19
- 1
src/views/business/inspectDriver/inspectReport.vue Переглянути файл

@@ -127,6 +127,7 @@

<script>
import inspectApi from '@/api/business/inspect'
import appApi from '@/api/app/list'
import pcVideo from '@/components/pcVideo'
export default {
name: "inspectReport",
@@ -138,6 +139,12 @@
}
},
props:{
isApp:{
type:Boolean,
default(){
return false
}
},
status:{
type:String,
default(){
@@ -158,7 +165,11 @@
},
},
mounted(){
this.getDetail()
if(this.isApp){
this.getAppDetail()
}else{
this.getDetail()
}
},
components:{pcVideo},
methods: {
@@ -169,6 +180,13 @@
this.reportData={}
})
},
getAppDetail(){
appApi.getAppDetail(this.inspectId).then(res => {
this.reportData=res.data?res.data:{}
}).catch(e => {
this.reportData={}
})
},
handleReportClose() {
this.$emit('goBack')
}

Завантаження…
Відмінити
Зберегти