first commit
This commit is contained in:
@@ -0,0 +1,317 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">届次:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="meetingChange"
|
||||
placeholder="请选择教代会届次" style="width: 300px" v-model="pageForm.meetingId">
|
||||
<el-option
|
||||
:label="item.jdhallname"
|
||||
:value="item.id"
|
||||
v-for="item in allJdhOptions">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label"></div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
|
||||
style="width: 90%" v-model="pageForm.searchKeyword">
|
||||
<el-select placeholder="查询类型" slot="prepend" style="width: 110px;"
|
||||
v-model="pageForm.searchName">
|
||||
<el-option label="提案名称" value="proposalName"></el-option>
|
||||
<el-option label="提案编号" value="proposalCode"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">承办单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable filterable
|
||||
placeholder="请选择承办单位" style="width: 300px" v-model="pageForm.unitId">
|
||||
<el-option
|
||||
:label="item.unitName"
|
||||
:value="item.id"
|
||||
v-for="item in unitOptions">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="pageData" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search">
|
||||
<div class="search-item" style="width: 100%;margin-top: 15px;">
|
||||
<div class="search-item-label">快捷查询:</div>
|
||||
<div class="search-item-option">
|
||||
<el-tag :effect="clickTags.includes(item.name)?'dark':''"
|
||||
@click="filterData(item)"
|
||||
class="mr5"
|
||||
style="cursor: pointer"
|
||||
v-for="item in searchTags">
|
||||
{{item.name}}
|
||||
</el-tag>
|
||||
<el-link :underline="false" @click="clickTags=[];pageData()"
|
||||
type="danger" v-if="clickTags.length>0">清空
|
||||
</el-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="提案列表">
|
||||
<template #func>
|
||||
<!-- <el-button type="primary" icon="el-icon-download" size="small"
|
||||
@click="doExport">
|
||||
导出提案承办汇总表
|
||||
</el-button>-->
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
class="vi-table"
|
||||
row-key="id" style="width: 100%;margin-bottom: 20px" v-loading="tableLoading">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='proposalName'">
|
||||
<el-link @click="$refs.info.openView(row.id);$refs.guava.view()" type="primary">
|
||||
{{row.proposalName}}
|
||||
</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='pruMaster'">
|
||||
<template v-if="row.pruMaster">
|
||||
<el-popover
|
||||
@show="getUnitLeader([row.pruMasterId])"
|
||||
placement="right"
|
||||
trigger="click"
|
||||
width="400">
|
||||
<div v-html="unitLeaderInfo"></div>
|
||||
<span slot="reference" style="cursor: pointer">
|
||||
{{row.pruMaster}}<i class="el-icon-phone" style="color: #67c23a"></i>
|
||||
</span>
|
||||
</el-popover>
|
||||
</template>
|
||||
<span v-else>
|
||||
暂无
|
||||
</span>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='pruSlaveReply'">
|
||||
<template v-if="row.pruSlaveReply">
|
||||
<el-popover
|
||||
@show="getUnitLeader(row.pruSlaveId.split(','))"
|
||||
placement="right"
|
||||
trigger="click"
|
||||
width="400">
|
||||
<div v-html="unitLeaderInfo"></div>
|
||||
<span slot="reference" style="cursor: pointer">
|
||||
{{row.pruSlaveReply}}<i class="el-icon-phone" style="color: #67c23a"></i>
|
||||
</span>
|
||||
</el-popover>
|
||||
</template>
|
||||
<span v-else>
|
||||
暂无
|
||||
</span>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='stateCode'">
|
||||
<vi-table-state :state="row"></vi-table-state>
|
||||
</template>
|
||||
<template scope="{row:{feedback}}" v-else-if="column.prop=='feedback'">
|
||||
<el-tag size="medium" type="success" v-if="feedback">已反馈</el-tag>
|
||||
<el-tag size="medium" type="danger" v-else>未反馈</el-tag>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='urgeNum'">
|
||||
<el-link @click="findUrgeRecord(row.id)" type="primary">{{row.urgeNum}}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作" width="100px">
|
||||
<template scope="{row}">
|
||||
<!-- :disabled="row.isAllReply"-->
|
||||
<el-button :loading="submitDisabled" @click="doUrge(row)" disabled
|
||||
size="mini"
|
||||
type="primary">催办
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<proposal-info ref="info"></proposal-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog :visible.sync="urgeDialog" title="催办记录">
|
||||
<el-table :data="urgeRecordList">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index" width="80"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="催办人姓名"
|
||||
property="urgeUserName"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="催办人工号"
|
||||
property="urgeLoginName"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="催办时间" property="operateTime"></el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let chart
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
urgeDialog: false,
|
||||
submitDisabled: false,
|
||||
urgeRecordList: [],
|
||||
allJdhOptions: [],
|
||||
tableData: [],
|
||||
fullTableData: [],
|
||||
unitOptions: [],
|
||||
tableColumns: [
|
||||
{prop: 'oldProposalCode', label: '草案编号', width: "120", checked: 0},
|
||||
{prop: 'proposalCode', label: '提案编号', width: "120", sortable: true, disabled: true},
|
||||
{prop: 'proposalName', label: '提案名称', disabled: true},
|
||||
{prop: 'username', label: '提案人', disabled: true},
|
||||
{prop: 'resultName', label: '立案结果', disabled: true, sortable: true},
|
||||
{prop: 'pruMaster', label: '主办单位', sortable: true},
|
||||
{prop: 'pruMasterReply', label: '主办单位答复', sortable: true},
|
||||
{prop: 'pruSlaveReply', label: '协办单位'},
|
||||
{prop: 'pruMasterLeader', label: '分管校领导'},
|
||||
{prop: 'pruMasterLeaderIsAudit', label: '审批答复'},
|
||||
{prop: 'feedback', label: '反馈意见'},
|
||||
{prop: 'stateCode', label: '状态'},
|
||||
{prop: 'urgeNum', label: '催办次数'},
|
||||
],
|
||||
unitLeaderInfo: null,
|
||||
searchTags: [
|
||||
{name: '主办已答复', cnd: {key: 'pruMasterReply', value: '已答复'}},
|
||||
{name: '主办未答复', cnd: {key: 'pruMasterReply', value: '未答复'}},
|
||||
{name: '协办已答复', cnd: {key: 'pruSlaveReply', value: '已答复'}},
|
||||
{name: '协办未答复', cnd: {key: 'pruSlaveReply', value: '未答复'}},
|
||||
{name: '领导已审批', cnd: {key: 'pruMasterLeaderIsAudit', value: '已审批'}},
|
||||
{name: '领导未审批', cnd: {key: 'pruMasterLeaderIsAudit', value: '未审批'}},
|
||||
],
|
||||
clickTags: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue')
|
||||
},
|
||||
methods: {
|
||||
filterData(tag) {
|
||||
const {name, cnd} = tag
|
||||
if (this.clickTags.indexOf(name) > -1) {
|
||||
this.clickTags.splice(this.clickTags.indexOf(name), 1)
|
||||
} else {
|
||||
this.clickTags.push(name)
|
||||
}
|
||||
const choseTags = this.searchTags.filter(v => this.clickTags.includes(v.name))
|
||||
let tempTableData = this.fullTableData
|
||||
choseTags.forEach(v => {
|
||||
tempTableData = tempTableData.filter(t => t[v.cnd.key] && t[v.cnd.key].indexOf(v.cnd.value) > -1)
|
||||
})
|
||||
this.tableData = tempTableData
|
||||
if (choseTags.length === 0) {
|
||||
this.tableData = this.fullTableData
|
||||
}
|
||||
},
|
||||
async findUrgeRecord(proposalId) {
|
||||
this.urgeDialog = true
|
||||
const resp = await $.post("/platform/proposal/senior/urge/findUrgeRecord", {proposalId})
|
||||
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.urgeRecordList = data
|
||||
}, () => {
|
||||
this.$notify.error({title: '失败', message: resp.msg});
|
||||
})
|
||||
},
|
||||
doExport() {
|
||||
location.href = loc() + '/export?meetingId=' + (this.pageForm.meetingId ? this.pageForm.meetingId : '') + '&unitId=' + (this.pageForm.unitId ? this.pageForm.unitId : '')
|
||||
},
|
||||
async doUrge(row) {
|
||||
this.submitDisabled = true
|
||||
this.$confirm('确定催办吗?', '提示', {type: 'warning'}).then(async () => {
|
||||
const resp = await $.post("/platform/proposal/senior/urge/doUrge", {proposalId: row.id})
|
||||
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
this.pageData()
|
||||
}, () => {
|
||||
this.$notify.error({title: '失败', message: resp.msg});
|
||||
}, () => {
|
||||
this.submitDisabled = false
|
||||
})
|
||||
}).catch(() => {
|
||||
this.submitDisabled = false
|
||||
});
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.info.openView(row.id)
|
||||
},
|
||||
async pageData() {
|
||||
sublime.showLoadingbar()
|
||||
this.tableLoading = true
|
||||
const resp = await $.post(loc() + "/data", this.pageForm)
|
||||
sublime.closeLoadingbar()
|
||||
this.tableLoading = false
|
||||
if (resp.code === 0) {
|
||||
this.fullTableData = resp.data
|
||||
this.tableData = resp.data
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
},
|
||||
async meetingChange(val) {
|
||||
this.unitOptions = await proposal.getUndertakeByMeeting(val)
|
||||
},
|
||||
async getUnitLeader(unitIds) {
|
||||
const resp = await $.get(loc() + '/getUnitLeader', {unitIds: JSON.stringify(unitIds)})
|
||||
this.unitLeaderInfo = resp.data
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.allJdhOptions = await getAllJdh()
|
||||
this.$set(this.pageForm, 'meetingId', this.allJdhOptions.length ? this.allJdhOptions[0].id : '')
|
||||
this.pageData()
|
||||
this.unitOptions = await proposal.getUndertakeByMeeting(this.pageForm.meetingId)
|
||||
if (proposal.enableState.some(v => v.stateCode === 800)) {
|
||||
this.tableColumns.splice(9, 0, {prop: 'caseCheckAudit', label: '提案委员会审查'},)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user