This commit is contained in:
2026-09-09 16:16:22 +08:00
parent ebffbab428
commit ba3a985c40
3749 changed files with 29 additions and 608551 deletions
@@ -1,206 +0,0 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.chart-card {
background-color: #FFFFFF;
margin: 10px;
}
</style>
<div id="app" v-clock>
<van-nav-bar
title="提案分析"
left-arrow
placeholder
fixed
@click-left="history.back()"
></van-nav-bar>
<van-dropdown-menu>
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionList"
@change="getData()"></van-dropdown-item>
</van-dropdown-menu>
<div class="chart-card">
<div class="van-sidebar-item van-sidebar-item--select ml15 p10">
提案类型
</div>
<div id="pieDiv"></div>
</div>
<div class="chart-card">
<div class="van-sidebar-item van-sidebar-item--select ml15 p10" style="display: flex;align-items: center;justify-content: space-between">
<div>
<span>【{{clickTypeName}}】分析</span>
<span style="font-size: 10px;color: orange">点击饼图查看详细信息</span>
</div>
<van-button size="mini" plain type="info" @click="renderColumnData(null)">全部类型</van-button>
</div>
<div id="columnDiv"></div>
</div>
</div>
<script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.js"></script>
<script>
var vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
pageForm: {
sessionId: ''
},
sessionList: [],
clickTypeName: '全部类型',
reqData: []
}
},
methods: {
async getData() {
this.mLoading = true
const {data} = await $.get('/mobile/proposal/analysis/getData', this.pageForm)
this.reqData = data
const pieData = data.map(v => {
const o = {}
o.code = v.typeCode
o.name = v.typeName
o.value = v.totalCount
return o
})
this.renderPieData(pieData)
this.renderColumnData(null)
},
renderPieData(data) {
const myPie = echarts.init(document.getElementById('pieDiv'), null, {
height: 580
})
let option = {
tooltip: {
trigger: 'item'
},
legend: {
top: '5%',
left: 'center'
},
series: [
{
name: '提案类型',
type: 'pie',
radius: ['35%', '55%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
},
label: {
show: false,
position: 'center'
},
emphasis: {
label: {
show: true,
fontSize: '20',
fontWeight: 'bold'
},
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
},
labelLine: {
show: false
},
data
}
]
}
myPie.setOption(option)
window.onresize = function () {
myPie.resize();
};
myPie.on('click', (params) => {
this.renderColumnData(params.data)
console.log(params)
});
},
renderColumnData(params) {
const data = []
if (params == null) {
this.clickTypeName = '全部类型'
let laCount = 0, jyCount = 0, caCount = 0, myCount = 0, ybCount = 0, bmyCount = 0;
data.push(this.reqData.reduce((laCount, item) => laCount + item.laCount, 0))
data.push(this.reqData.reduce((jyCount, item) => jyCount + item.jyCount, 0))
data.push(this.reqData.reduce((caCount, item) => caCount + item.caCount, 0))
data.push(this.reqData.reduce((myCount, item) => myCount + item.myCount, 0))
data.push(this.reqData.reduce((ybCount, item) => ybCount + item.ybCount, 0))
data.push(this.reqData.reduce((bmyCount, item) => bmyCount + item.bmyCount, 0))
console.log(data)
} else {
const {code, name} = params
this.clickTypeName = name
const clickTypeData = this.reqData.find(v => v.typeCode === code)
data.push(clickTypeData.laCount)
data.push(clickTypeData.jyCount)
data.push(clickTypeData.caCount)
data.push(clickTypeData.myCount)
data.push(clickTypeData.ybCount)
data.push(clickTypeData.bmyCount)
}
const myColumn = echarts.init(document.getElementById('columnDiv'), null, {
height: 350
});
let option = {
xAxis: {
type: 'category',
data: ['立案数', '作为建议、意见', '不予立案', '评分满意', '评分一般', '评分不满意'],
axisLabel: {//坐标轴刻度标签的相关设置。
interval: 0,
rotate: "45"
}
},
yAxis: {
type: 'value'
},
series: [
{
data,
type: 'bar',
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
}
}
]
};
myColumn.setOption(option);
}
},
mounted() {
},
async created() {
this.mLoading = true
this.sessionList = await mProposal.getAllSession()
if (this.sessionList && this.sessionList.length > 0) {
this.pageForm.sessionId = this.sessionList[0].value
this.getData()
}
}
})
</script>
<!--#
}
#-->
@@ -1,82 +0,0 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.van-cell-group__title {
padding-left: 0 !important;
}
</style>
<div id="app" v-clock>
<van-nav-bar
title="代表详细信息"
left-arrow
placeholder
fixed
@click-left="history.back()"
safe-area-inset-top
></van-nav-bar>
<div class="van-cell-group__title">
<div class="van-sidebar-item van-sidebar-item--select">
基本信息
</div>
</div>
<van-cell-group>
<van-cell title="姓名">{{ viewData.username }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="年龄">{{ viewData.birthday }}</van-cell>
<van-cell title="民族">{{ viewData.mz }}</van-cell>
<van-cell title="文化程度">{{ viewData.xl }}</van-cell>
<van-cell title="政治面貌">{{ viewData.zzmm }}</van-cell>
<van-cell title="部门">{{ viewData.dwname }}</van-cell>
<van-cell title="职称">{{ viewData.zc }}</van-cell>
<van-cell title="职务">{{ viewData.zw }}</van-cell>
</van-cell-group>
<div class="van-cell-group__title">
<div class="van-sidebar-item van-sidebar-item--select">
个人简历
</div>
</div>
<van-cell-group>
<van-cell>
<template>
<div v-if="viewData.grjl!=null" v-html="viewData.grjl"></div>
<div v-else>暂无</div>
</template>
</van-cell>
</van-cell-group>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
viewData:{}
}
},
methods: {
async getData(id) {
const {data} = await $.get('/platform/jdh/Common/findDbxx', {id})
console.log(data)
this.viewData = data
console.log(this.viewData)
}
},
async created() {
const id = GetQueryString("id")
if (id !== '') {
this.getData(id)
} else {
}
}
})
</script>
<!--#
}
#-->
@@ -1,137 +0,0 @@
<!--#
layout("/mobile/platform.html"){
#-->
<div id="app" v-cloak>
<van-nav-bar title="团长审核" fixed placeholder safe-area-inset-top @click-left="history.back()"
:left-arrow="leftArrow"></van-nav-bar>
<proposal-info :proposal_id="proposalId" title="团长审核" :handle="handle" ref="info">
<template #handle>
<div class="van-cell-group__title">
<div class="van-sidebar-item van-sidebar-item--select">
团长审核
</div>
</div>
<van-form>
<van-cell-group class="info">
<van-cell title="审核时间" :value="formData.auditTime"></van-cell>
<van-field
input-align="right"
v-model="formData.opinion"
rows="2"
autosize
label="审核意见"
type="textarea"
maxlength="1000"
placeholder="请输入审核意见"
show-word-limit
></van-field>
</van-cell-group>
<van-row type="flex" :gutter="20" style="padding: 20px 0px">
<van-col span="12" style="padding: 0 10px">
<van-button plain size="large" @click="doAudit(0)">退回</van-button>
</van-col>
<van-col span="12" style="padding: 0 10px">
<van-button :color="themeColor" block size="large" @click="doAudit(1)">通过</van-button>
</van-col>
</van-row>
</van-form>
</template>
</proposal-info>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
leftArrow: false,
handle: true,
proposalId: GetQueryString('proposal_id'),
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
opinion: '',
proposalId: GetQueryString('proposal_id')
}
}
},
components: {
'proposal-info': httpVueLoader('/components/proposal/mobile/ProposalInfo.vue?v=' + new Date().getTime()),
},
methods: {
async doAudit(flag) {
if (this.formData.opinion === '') {
vant.Toast('请输入审核意见');
return
}
const res = flag === 1 ? '通过' : '退回'
vant.Dialog.confirm({
title: '提示',
message: '您确定' + res + '该提案吗?',
}).then(async () => {
const loading = this.$toast({
duration: 0,
message: '提交中...',
forbidClick: true,
loadingType: 'spinner',
type: 'loading',
overlay: true
});
const resp = await $.post("/platform/proposal/transact/audit/doAudit", {
audit: JSON.stringify(this.formData),
flag: flag
})
if (resp.code === 0) {
setTimeout(async () => {
loading.type = 'success'
loading.message = '提交成功'
loading.close()
this.handle = await mProposal.GetProposalStateCode(this.proposalId) === 200
this.$refs.info.openView(this.proposalId)
}, 1200)
} else {
loading.type = 'fail'
loading.message = '提交失败,请联系管理员'
}
})
}
},
async created() {
if (GetQueryString("mobile")) this.leftArrow = true
const proposal_id = GetQueryString("proposal_id")
const biz_key = GetQueryString("biz_key")
if (proposal_id === '' || biz_key === '') {
vant.Dialog.alert({
title: '提示',
message: '非法参数',
showConfirmButton: false
}).then(() => {
})
return
}
this.handle = await mProposal.GetProposalStateCode(this.proposalId) === 200
const lastIndex = window.location.href.lastIndexOf('&')
if (window.location.href.substr(lastIndex + 1, 6) === 'ticket') {
window.document.location.replace(window.location.href.substring(0, lastIndex))
}
}
})
</script>
<!--#
}
#-->
@@ -1,236 +0,0 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.van-doc-card {
margin: 14px;
padding: 12px 12px 12px 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
font-size: 12px;
position: relative;
}
.van-divider {
margin: 12px 0 12px 0px;
border-color: lightgray;
}
.van-button--small {
border-top-right-radius: 16px;
border-bottom-left-radius: 16px;
height: 26px;
}
.van-col {
line-height: 25px;
}
.title_span {
font-size: 16px;
font-weight: bold;
position: absolute;
left: -1px;
top: 11px;
}
</style>
<div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar
title="团长审议"
left-arrow
placeholder
fixed
@click-left="history.back()"
></van-nav-bar>
<div class="search-fixed">
<van-search
v-model="pageForm.searchKeyWord"
shape="round"
maxlength="10"
@search="doSearch"
placeholder="请输入提案名称或者提案编号进行查询"
>
</van-search>
<van-dropdown-menu>
<van-dropdown-item v-model="pageForm.meetingId" :options="sessionList"
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList"
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
<van-tabs v-model="pageForm.isAudit" @click="doSearch">
<van-tab title="未审核" :name="false"></van-tab>
<van-tab title="已审核" :name="true"></van-tab>
</van-tabs>
</div>
<div style="margin: 170px auto 0">
<van-list
v-model="mLoading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<div v-for="o in tableData" class="van-doc-card" @click="openView(o.id)">
<div @click="openView(o.id)">
<div>
<div class="van-ellipsis"
style="font-size: 13px;font-weight: bold;flex: 1;width:80%;overflow: hidden;white-space: nowrap">
<span class="title_span" :style="'color:'+o.stateColor">|</span>提案名称:{{o.proposalName}}
</div>
<div style="position: absolute; right: 14px;top: 12.3px;text-align: right">
<van-tag :style="'color:'+o.stateColor" size="medium" plain round type="primary">{{
o.stateName }}
</van-tag>
</div>
</div>
<van-divider></van-divider>
<div>
<van-row>
<van-col span="12"><span style="color: grey">提案编号:</span>{{o.proposalCode}}</van-col>
<van-col span="12"><span style="color: grey">提案类型:</span>{{o.typeName}}</van-col>
</van-row>
<van-row>
<van-col span="12" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
<span style="color: grey">&ensp;&ensp;团:</span>{{o.delegationName}}
</van-col>
<van-col span="12"><span style="color: grey">提案届次:</span>{{o.meetingName}}</van-col>
</van-row>
<van-divider></van-divider>
</div>
<div class="train-title" style="margin-top: 11px">
<span style="color: grey">立案结果:</span>{{o.resultName ? o.resultName : '暂无'}}
</div>
</div>
</div>
</van-list>
<van-empty
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div>
</div>
<script>
let vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
pageForm: {
isAudit: false
},
list: [],
state: '0',
loading: false,
finished: false,
refreshing: false,
sessionList: [],
delegationList: [],
proposalTypeList: [],
resultList: []
}
},
methods: {
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.onLoad()
},
async onLoad() {
this.mLoading = true
$.post(loc() + '/pageData', this.pageForm).then(res => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) {
this.finished = true
} else {
this.pageForm.pageNumber++
}
}
this.mLoading = false
})
},
openAudit(id) {
this.formData = {
proposalId: id,
username: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
opinion: '',
sign: '',
}
this.state = '0'
this.show = true
},
validateForm(action, done) {
done(false)
},
async doHandle() {
this.$refs['handleForm'].validate().then(valid => {
$.post('/platform/proposal/transact/audit/doAudit', {
audit: JSON.stringify(this.formData),
flag: this.state === 0
}).then((res) => {
console.log(res)
if (res.code === 0) {
this.show = false
this.pageForm = {
pageNumber: 1,
pageSize: 5,
totalCount: 0
}
this.tableData = []
this.onLoad()
vant.Toast.success('审核成功!')
} else {
vant.Toast.error('审核失败!')
}
})
})
},
openView(id) {
window.location.href = '/mobile/proposal/delegation/view?biz_key=' + id + '&proposal_id=' + id + '&mobile=' + true
}
},
async created() {
this.sessionList = await mProposal.getAllSession()
this.proposalTypeList = await mProposal.getProposalType()
this.resultList = await mProposal.getProposalDict()
if (this.sessionList && this.sessionList.length > 0) {
this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
}
if (this.proposalTypeList && this.proposalTypeList.length > 0) {
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
}
if (this.resultList && this.resultList.length > 0) {
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
}
}
})
window.addEventListener('pageshow', e => {
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
vue.onLoad()
}
})
</script>
<!--#
}
#-->
@@ -1,480 +0,0 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.register-icon {
position: absolute;
bottom: 50px;
right: 50px;
z-index: 1;
}
.register-sapn {
position: absolute;
bottom: 30px;
right: 38px;
z-index: 1;
font-size: 10px;
}
.van-index-bar__sidebar {
display: none;
}
.van-doc-card {
margin: 14px;
padding: 12px 12px 12px 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
font-size: 12px;
position: relative;
}
.van-divider {
margin: 12px 0 12px 0px;
border-color: lightgray;
}
.van-button--small, .van-button--mini {
border-radius: 15px;
height: 23px;
width: 50px;
}
.van-col {
line-height: 25px;
}
.title_span {
font-size: 16px;
font-weight: bold;
position: absolute;
left: -1px;
top: 11px;
}
.train-title {
margin-top: 10px;
display: flex;
align-items: center;
justify-content: space-between;
}
.train-title .van-button--small, .van-button--mini {
max-width: 100px;
width: auto;
min-width: 50px;
}
</style>
<div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar
title="我的提案"
left-arrow
placeholder
fixed
@click-left="history.back()"
safe-area-inset-top
></van-nav-bar>
<div class="search-fixed">
<van-search
v-model="pageForm.searchKeyWord"
shape="round"
maxlength="10"
@search="doSearch"
placeholder="请输入提案名称或者提案编号进行查询"
>
</van-search>
<van-dropdown-menu>
<van-dropdown-item v-model="pageForm.meetingId" :options="sessionList"
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList"
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
</div>
<div style="margin-top: 120px">
<van-list
v-model="loading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<div class="van-doc-card" v-for="o in tableData">
<div @click="openView(o.id)">
<div>
<div class="van-ellipsis"
style="font-size: 13px;font-weight: bold;flex: 1;width:80%;overflow: hidden;white-space: nowrap">
<span :style="'color:'+o.stateColor" class="title_span">|</span>提案名称:{{o.proposalName}}
</div>
<div style="position: absolute; right: 14px;top: 12.3px;text-align: right">
<van-tag :style="'color:'+o.stateColor" plain round size="medium" type="primary">{{
o.stateName }}
</van-tag>
</div>
</div>
<van-divider></van-divider>
<div>
<van-row>
<van-col span="12"><span style="color: grey">提案编号:</span>{{o.proposalCode}}</van-col>
<van-col span="12"><span style="color: grey">提案类型:</span>{{o.typeName}}</van-col>
</van-row>
<van-row>
<van-col span="12" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
<span style="color: grey">&ensp;&ensp;团:</span>{{o.delegationName}}
</van-col>
<van-col span="12"><span style="color: grey">提案届次:</span>{{o.meetingName}}</van-col>
</van-row>
<van-divider></van-divider>
</div>
<div class="train-title">
<div>
<span style="color: grey">立案结果:</span>{{o.resultName ? o.resultName : '暂无'}}
</div>
<div>
<van-button v-if="o.mannerCode==='W01' && o.stateCode < 200"
@click.stop="openFuyi(o)" color="#1867b0" size="small"
type="primary">邀请附议人
</van-button>
<van-button v-if="showSubmitBtn(o)"
@click.stop="doSubmit(o)" color="#1867b0" size="mini"
type="primary">提交
</van-button>
</div>
</div>
</div>
</div>
</van-list>
<van-empty
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div>
<van-popup :close-on-click-overlay="false" :lazy-render="false"
:style="{ height: '80%'}"
@click-close-icon="closeInvitePopup"
closeable get-container="#app" position="bottom"
round
safe-area-inset-bottom v-model="fuyiShowPicker">
<van-search @search="onSearchSecondedUser"
close-icon="close"
placeholder="请输入姓名搜索"
show-action
style="width: 85%"
v-model="searchSecondedUserKeyWord">
<template #action>
<div @click="onSearchSecondedUser">搜索</div>
</template>
</van-search>
<div style="padding:0px 20px;margin-top:20px;box-sizing: border-box;max-height: calc(100% - 150px);overflow-y: auto">
<van-checkbox-group :checked-color="themeColor" style="font-size: 12px" v-model="helpDb">
<van-cell-group>
<van-index-bar :sticky="false" highlight-color="red" ref="indexBar">
<template v-for="c,ci in dBData" :key="c.k">
<van-index-anchor :index="c.k" v-if="c.v && c.v.length>0 && c.isShow"></van-index-anchor>
<template v-for="x,xi in c.v" :key="x.id">
<van-cell
v-if="c.isShow && x.isShow"
:id="'van-cell-'+x.id"
:key="x.id"
:title="x.username + '-' + x.loginname + '-' + x.dbtName"
@click="fuyiToggle(x.id)"
clickable
>
<template #right-icon>
<van-checkbox :name="x.id" @click.stop="fuyiToggle(x.id)"
ref="fuyiCheckboxes"></van-checkbox>
</template>
</van-cell>
</template>
</template>
</van-index-bar>
</van-cell-group>
</van-checkbox-group>
</div>
<van-row gutter="20" style="position:absolute;bottom: 20px;width: 100%">
<van-col span="12" style="text-align: center">
<van-button @click="cleanSelectedUser" color="red" style="width: 60%">清空</van-button>
</van-col>
<van-col span="12" style="text-align: center">
<van-button :color="themeColor" @click="fuyiDwselclose" style="width: 60%">
确定({{hasSelectedUser}})
</van-button>
</van-col>
</van-row>
<!-- <div style="position: absolute;width: 80%;bottom: 20px;left: 50%;transform: translateX(-50%)">-->
<!-- <van-button :color="themeColor" @click="cleanSelectedUser">清空</van-button>-->
<!-- <van-button :color="themeColor" @click="fuyiDwselclose">确定</van-button>-->
<!-- </div>-->
</van-popup>
</div>
<script>
const py = new Pinyin()
const pyArr = [...Array(26).keys()].map(i => String.fromCharCode(i + 65))
var vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
dBData: [],
SecondedData: [],
helpDb: [],
formData: {
helpDb: [],
proposalId: ''
},
dbList: [],
fuyiShowPicker: false,
list: [],
sessionList: [],
delegationList: [],
proposalTypeList: [],
resultList: [],
searchSecondedUserKeyWord: '',
hasSelectedUser: 0,
proposalConfig: {},
}
},
methods: {
async showSubmitBtn(row) {
const {alreadySecondedCount, stateCode} = row
if (row.mannerCode === 'W01') {
if (stateCode !== 150) {
return false
}
const {submitMode, seconderNum} = this.proposalConfig
if (submitMode === 'AMT' || submitMode === "manual") {
return alreadySecondedCount === seconderNum
} else {
return false
}
} else {
return stateCode === 100
}
// [proposal.UNSUBMIT].includes(row.stateCode) && row.mannerCode != 'W01' || (!config.isAutoSubmit && row.mannerCode == 'W01')
},
closeInvitePopup() {
this.fuyiShowPicker = false
this.cleanSelectedUser()
},
cleanSelectedUser() {
this.$refs.fuyiCheckboxes.forEach(v => {
if (v.checked) {
v.toggle()
}
})
setTimeout(() => {
const hasSelectedUser = this.$refs.fuyiCheckboxes.filter(v => v.checked).length
console.log(hasSelectedUser)
this.hasSelectedUser = hasSelectedUser
}, 100)
},
dbListTransToA2Z(list) {
const py = new Pinyin()
let arr = []
pyArr.forEach(p => {
const c = list.filter(x => {
return py.getCamelChars(x.username).substr(0, 1) === p
})
arr.push({k: p, v: c})
})
return arr
},
onSearchSecondedUser(val) {
// if (!this.searchSecondedUserKeyWord) {
// this.dBData = this.dbListTransToA2Z(this.dbList)
// } else {
// const filterUserList = this.dbList.filter(v => v.username.includes(this.searchSecondedUserKeyWord))
// this.dBData = this.dbListTransToA2Z(filterUserList)
// }
if (!this.searchSecondedUserKeyWord) {
this.dBData.forEach(v => {
v.isShow = true
})
} else {
const firstName = py.getCamelChars(this.searchSecondedUserKeyWord).substr(0, 1)
this.dBData.forEach(x => {
x.isShow = x.k === firstName
if (x.isShow) {
x.v.forEach(c => {
c.isShow = c.username.includes(this.searchSecondedUserKeyWord) || c.loginname.includes(this.searchSecondedUserKeyWord)
})
x.v.sort()
}
})
this.$forceUpdate()
}
},
cellShow(username) {
if (!this.searchSecondedUserKeyWord) {
return true
}
const firstName = py.getCamelChars(username).substr(0, 1)
this.dBData.forEach(x => {
x.isShow = x.k === firstName
})
},
fuyiToggle(id) {
this.$refs.fuyiCheckboxes.some(v => {
if (v.name === id) {
v.toggle()
return true
}
})
setTimeout(() => {
const hasSelectedUser = this.$refs.fuyiCheckboxes.filter(v => v.checked).length
console.log(hasSelectedUser)
this.hasSelectedUser = hasSelectedUser
}, 100)
},
async getSecondedList(proposalId, jdhid) {
const {data} = await $.post("/platform/proposal/transact/compose/getSecondedList", {
proposalId: proposalId,
jdhid: jdhid
})
data.sort((a, b) => a.username.localeCompare(b.username, 'zh'))
this.dbList = data
pyArr.forEach(p => {
const c = this.dbList.filter(x => {
x.isShow = true
return py.getCamelChars(x.username).substr(0, 1) === p
})
this.dBData.push({k: p, v: c, isShow: true})
})
},
fuyiDwselclose() {
const userIds = this.helpDb
const userNames = this.dbList.filter(v => userIds.includes(v.id)).map(v => v.username).join('、')
vant.Dialog.confirm({
title: '',
message: this.helpDb.length > 0 ? ('您邀请了' + userNames + this.helpDb.length + '位附议人,您确定要邀请吗?确定后会有信息通知') : '您没有选择附议人请确认',
}).then(async () => {
const resp = await $.post("/platform/proposal/transact/compose/addSeconded", {
proposalId: this.proposalId,
users: JSON.stringify(userIds),
})
if (resp.code === 0) {
this.$toast.success(resp.msg);
this.doSearch()
this.fuyiShowPicker = false
}
}).catch(() => {
this.fuyiShowPicker = false
});
},
openFuyi(row) {
this.formData.helpDb = []
this.helpDb = []
this.dBData = []
this.proposalId = row.id
this.getSecondedList(row.id, row.teacherMeetingId)
this.fuyiShowPicker = true
this.searchSecondedUserKeyWord = ''
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.onLoad()
},
async onLoad() {
this.loading = true
$.post(loc() + '/pageData', this.pageForm).then(res => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) {
this.finished = true
} else {
this.pageForm.pageNumber++
}
}
this.loading = false
})
},
openView(id) {
window.location.href = '/mobile/proposal/compose/view?biz_key=' + null + '&proposal_id=' + id + '&mobile=' + true
},
doSubmit({id, mannerCode}) {
vant.Dialog.confirm({
title: '提示',
message: '您确认要提交吗?',
}).then(async () => {
const resp = await $.post('/platform/proposal/transact/compose/doSubmit', {
id,
mannerCode
})
if (resp.code === 0) {
this.$toast.success('提交成功')
this.doSearch()
} else {
this.$toast.fail(resp.msg)
}
}).catch(() => {
});
}
},
async created() {
this.proposalConfig = await mProposal.getProposalConfig()
this.sessionList = await mProposal.getAllSession()
this.proposalTypeList = await mProposal.getProposalType()
this.resultList = await mProposal.getProposalDict()
if (this.sessionList && this.sessionList.length > 0) {
this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
}
if (this.proposalTypeList && this.proposalTypeList.length > 0) {
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
}
if (this.resultList && this.resultList.length > 0) {
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
}
}
})
window.addEventListener('pageshow', e => {
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
// vue.onLoad()
}
})
</script>
<!--#
}
#-->
@@ -1,42 +0,0 @@
<!--#
layout("/mobile/platform.html"){
#-->
<div id="app" v-cloak>
<van-nav-bar title="提案信息" fixed placeholder :left-arrow="leftArrow" safe-area-inset-top
@click-left="history.back()"></van-nav-bar>
<proposal-info :proposal_id="proposalId" ref="pi"></proposal-info>
</div>
<script>
var vue = new Vue({
el: '#app',
data() {
return {
leftArrow: false,
proposalId: GetQueryString('proposal_id')
}
},
components: {
'proposal-info': httpVueLoader('/components/proposal/mobile/ProposalInfo.vue?v=' + new Date().getTime()),
},
methods: {},
async created() {
if (GetQueryString("mobile")) this.leftArrow = true
const proposal_id = GetQueryString("proposal_id")
const biz_key = GetQueryString("biz_key")
if (proposal_id === '' || biz_key === '') {
vant.Dialog.alert({
title: '提示',
message: '非法参数',
showConfirmButton: false
}).then(() => {
})
return
}
}
})
</script>
<!--#
}
#-->
@@ -1,174 +0,0 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
</style>
<div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar
title="提案查询"
left-arrow
placeholder
fixed
@click-left="history.back()"
></van-nav-bar>
<div class="search-fixed">
<van-search
v-model="pageForm.searchKeyWord"
shape="round"
maxlength="10"
@search="doSearch"
placeholder="请输入提案名称或者提案编号进行查询"
>
</van-search>
<van-dropdown-menu>
<van-dropdown-item v-model="pageForm.meetingId" :options="sessionList"
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.delegationId" :options="delegationList"
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList"
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList"
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalStateCode" :options="stateList"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
</div>
<div style="margin: 120px auto">
<van-list
v-model="mLoading" :immediate-check="false"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<div v-for="o in tableData" class="list-card" @click="openView(o.id)">
<van-cell-group inset>
<van-cell title="提案名称" :border="false">
<div style="display: flex;align-items: center">
<span v-if="o.resultName=='不予立案'" style="font-size: 16px;color: red" class="van-ellipsis">{{o.proposalName}}</span>
<span v-else-if="o.resultName=='意见建议'" style="color: #0000FF" style="font-size: 16px"
class="van-ellipsis">{{o.proposalName}}</span>
<span v-else-if="o.resultName=='确定立案'" style="color: green" style="font-size: 16px"
class="van-ellipsis">{{o.proposalName}}</span>
<span v-else style="color: #7f8481" style="font-size: 16px" class="van-ellipsis">{{o.proposalName}}</span>
</div>
</van-cell>
<van-cell :border="false" title="提案编号">{{o.proposalCode}}</van-cell>
<van-cell :border="false" title="提&emsp14;&emsp14;案&emsp14;&emsp14;人">{{o.username}}</van-cell>
<van-cell :border="false" title="提案类型">{{o.typeName}}</van-cell>
<van-cell :border="false" title="代&emsp14;&emsp14;表&emsp14;&emsp14;团">{{o.delegationName}}
</van-cell>
<!-- <van-cell :border="false" title="立案结果">{{o.resultName ? o.resultName : '暂无'}}</van-cell>-->
<van-cell :border="false" title="提案状态">
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
</van-cell>
</van-cell-group>
</div>
</van-list>
<van-empty
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
list: [],
sessionList: [],
delegationList: [],
proposalTypeList: [],
resultList: [],
stateList: [],
}
},
methods: {
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.onLoad()
},
async onLoad() {
this.mLoading = true
const res = await $.post(loc()+'/pageData', this.pageForm)
this.mLoading = false
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length >= res.data.totalCount) {
this.finished = true
} else {
this.pageForm.pageNumber++
}
}
},
openView(id) {
window.location.href = '/mobile/proposal/compose/view?biz_key=' + null + '&proposal_id=' + id + '&mobile=' + true
}
},
async created() {
this.sessionList = await mProposal.getAllSession()
this.proposalTypeList = await mProposal.getProposalType()
this.resultList = await mProposal.getProposalDict()
const stateResp = await $.get("/platform/proposal/common/getOpenProposalState")
this.stateList = stateResp.data.map(v => {
return {
text: v.stateName,
value: v.stateCode
}
})
this.stateList.unshift({text: '状态(全部)', value: null})
if (this.proposalTypeList && this.proposalTypeList.length > 0) {
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
}
if (this.stateList && this.stateList.length > 0) {
this.$set(this.pageForm, "proposalStateCode", this.stateList[0].value)
}
if (this.resultList && this.resultList.length > 0) {
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
}
if (this.sessionList && this.sessionList.length > 0) {
this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
let delegationList = await mProposal.getDelegation(this.pageForm.meetingId)
delegationList = delegationList.map(v => {
return {
text: v.dbtname,
value: v.id
}
})
delegationList.unshift({text: '代表团(全部)', value: null})
this.delegationList = delegationList
if (this.delegationList && this.delegationList.length > 0) {
this.pageForm.delegationId = this.delegationList[0].value
}
if (this.delegateTypeList && this.delegateTypeList.length > 0) {
this.pageForm.delegateTypeId = this.delegateTypeList[0].value
}
}
this.sessionList.unshift({text: '全部届次', value: ''});
this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
this.onLoad()
}
})
</script>
<!--#
}
#-->
@@ -1,108 +0,0 @@
<!--#
layout("/mobile/platform.html"){
#-->
<div id="app" v-cloak>
<van-nav-bar title="附议提案" fixed placeholder :left-arrow="leftArrow" safe-area-inset-top
@click-left="history.back()"></van-nav-bar>
<proposal-info :proposal_id="proposalId" ref="pi"></proposal-info>
<van-row v-if="secondedInfo.isAgree==null">
<div class="van-cell-group__title">
<div class="van-sidebar-item van-sidebar-item--select">
附议提案
</div>
</div>
<div style="display: flex;justify-content: space-around;padding: 5px 0 20px 0;">
<van-button :color="themeColor" plain style="flex: 1;margin: 0 10px 0 10px" @click="openDialog(false)">拒绝
</van-button>
<van-button :color="themeColor" style="flex: 1;margin: 0 10px 0 10px" @click="openDialog(true)">同意
</van-button>
</div>
</van-row>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
leftArrow: false,
proposalId: GetQueryString('proposal_id'),
secondedInfo: {
isAgree: false
}
}
},
components: {
'proposal-info': httpVueLoader('/components/proposal/mobile/ProposalInfo.vue?v=' + new Date().getTime()),
},
methods: {
openDialog(flag) {
const res = flag === true ? '通过' : '拒绝'
vant.Dialog.confirm({
title: '提示',
message: '您确定' + res + '附议该提案吗?',
}).then(async () => {
const loading = this.$toast({
duration: 0,
message: '提交中...',
forbidClick: true,
loadingType: 'spinner',
type: 'loading',
overlay: true
});
const resp = await $.post("/platform/proposal/transact/seconded/doAudit", {
secondedId: this.secondedInfo.id,
proposalId: this.proposalId,
flag: flag
})
if (resp.code === 0) {
setTimeout(async () => {
loading.type = 'success'
loading.message = '提交成功'
loading.close()
this.$refs.pi.openView(this.proposalId)
this.getSecondedCount()
}, 1200)
} else {
loading.type = 'fail'
loading.message = '提交失败,请联系管理员'
}
})
},
getSecondedCount() {
const biz_key = GetQueryString("biz_key")
$.post("/mobile/proposal/seconded/getSecondedCount", {
proposalId: this.proposalId,
id: biz_key
}).then(res => {
this.secondedInfo = res.data
})
}
},
async created() {
if (GetQueryString("mobile")) this.leftArrow = true
const proposal_id = GetQueryString("proposal_id")
const biz_key = GetQueryString("biz_key")
if (proposal_id === '' || biz_key === '') {
vant.Dialog.alert({
title: '提示',
message: '非法参数',
showConfirmButton: false
}).then(() => {
})
return
}
this.getSecondedCount();
}
})
</script>
<!--#
}
#-->
@@ -1,241 +0,0 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.van-doc-card {
margin: 14px;
padding: 12px 12px 12px 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
font-size: 12px;
position: relative;
}
.van-divider {
margin: 12px 0 12px 0px;
border-color: lightgray;
}
.van-button--small {
border-top-right-radius: 16px;
border-bottom-left-radius: 16px;
height: 26px;
}
.van-col {
line-height: 25px;
}
.title_span {
font-size: 16px;
font-weight: bold;
position: absolute;
left: -1px;
top: 11px;
}
</style>
<div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar
title="附议提案"
left-arrow
placeholder
fixed
@click-left="history.back()"
></van-nav-bar>
<div class="search-fixed">
<van-search
v-model="pageForm.searchKeyWord"
shape="round"
maxlength="10"
@search="doSearch"
placeholder="请输入提案名称或者提案编号进行查询"
>
</van-search>
<van-dropdown-menu>
<van-dropdown-item v-model="pageForm.meetingId" :options="sessionList"
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList"
@change="doSearch"></van-dropdown-item>
<!-- <van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList"
@change="doSearch"></van-dropdown-item>-->
</van-dropdown-menu>
<van-tabs v-model="pageForm.isAudit" @change="doSearch()">
<van-tab title="未附议" :name="false"></van-tab>
<van-tab title="已附议" :name="true"></van-tab>
</van-tabs>
</div>
<div style="margin: 170px auto 0">
<van-list
v-model="mLoading" :immediate-check="false"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<div v-for="o in tableData" class="van-doc-card">
<div @click="openView(o.id,o.secondedId)">
<div>
<div class="van-ellipsis"
style="font-size: 13px;font-weight: bold;flex: 1;width:80%;overflow: hidden;white-space: nowrap">
<span class="title_span" :style="'color:'+o.stateColor">|</span>提案名称:{{o.proposalName}}
</div>
<div style="position: absolute; right: 14px;top: 12.3px;text-align: right" v-if="!o.isAgree">
<van-tag :style="'color:'+o.stateColor" size="medium" plain round>附议
</van-tag>
</div>
</div>
<van-divider></van-divider>
<div>
<van-row>
<van-col span="12"><span style="color: grey">提案编号:</span>{{o.proposalCode}}</van-col>
<van-col span="12"><span style="color: grey">提案类型:</span>{{o.typeName}}</van-col>
</van-row>
<van-row>
<van-col span="12" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
<span style="color: grey">&ensp;&ensp;团:</span>{{o.delegationName}}
</van-col>
<van-col span="12"><span style="color: grey">提案届次:</span>{{o.meetingName}}</van-col>
</van-row>
<van-divider></van-divider>
</div>
<div class="train-title" style="margin-top: 11px">
<span style="color: grey">立案结果:</span>{{o.resultName ? o.resultName : '暂无'}}
<span style="color: grey;margin-left: 24%;">&ensp;&ensp;人:</span>{{o.secondedUserName}}
</div>
</div>
<!-- <van-cell-group inset>
<van-cell title="提案名称" :border="false">
<div style="display: flex;align-items: center">
<span :style="{color:themeColor}" style="font-size: 16px" class="van-ellipsis">{{o.proposalName}}</span>
</div>
</van-cell>
<van-cell :border="false" title="提案编号">{{o.proposalCode}}</van-cell>
<van-cell :border="false" title="附&emsp14;&emsp14;议&emsp14;&emsp14;人">{{o.secondedUserName}}</van-cell>
<van-cell :border="false" title="提案类型">{{o.typeName}}</van-cell>
<van-cell :border="false" title="提案状态">
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
</van-cell>
</van-cell-group>-->
</div>
</van-list>
<van-empty
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
pageForm: {
isAudit: false
},
list: [],
state: '0',
loading: false,
finished: false,
refreshing: false,
sessionList: [],
delegationList: [],
proposalTypeList: [],
resultList: [],
auditList: [
{text: '未附议', value: false},
{text: '已附议', value: true},
]
}
},
methods: {
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.onLoad()
},
async onLoad() {
this.mLoading = true
$.post(loc() + '/pageData', this.pageForm).then(res => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length >= res.data.totalCount) {
this.finished = true
} else {
this.pageForm.pageNumber++
}
}
this.mLoading = false
})
},
doAudit(flag, row) {
const {id, secondedId} = row
let res = flag === true ? '通过' : '拒绝'
vant.Dialog.confirm({
title: '提示',
message: '您确定' + res + '吗?',
}).then(() => {
$.post('/platform/proposal/transact/seconded/doAudit', {
secondedId: secondedId,
proposalId: id,
flag: flag
}).then(res => {
if (res.code === 0) {
this.pageForm = {
pageNumber: 1,
pageSize: 5,
totalCount: 0
}
this.tableData = []
this.onLoad()
vant.Toast.success('提交成功!')
}
})
}).catch(() => {
})
},
openView(id, secondedId) {
window.location.href = '/mobile/proposal/seconded/view?biz_key=' + secondedId + '&proposal_id=' + id + '&mobile=' + true
}
},
async created() {
this.sessionList = await mProposal.getAllSession()
this.proposalTypeList = await mProposal.getProposalType()
this.resultList = await mProposal.getProposalDict()
if (this.sessionList && this.sessionList.length > 0) {
this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
}
if (this.proposalTypeList && this.proposalTypeList.length > 0) {
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
}
if (this.resultList && this.resultList.length > 0) {
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
}
this.onLoad()
},
})
window.addEventListener('pageshow', e => {
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
vue.onLoad()
}
})
</script>
<!--#
}
#-->
@@ -1,353 +0,0 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
</style>
<div id="app" v-cloak>
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder
title="撰写提案"></van-nav-bar>
<van-form :show-error-message="false" input-align="right" ref="addForm">
<van-cell-group class="mt10" inset>
<van-field label="代表姓名" name="username" readonly
value="${@shiro.getPrincipalProperty('username')}"></van-field>
<van-field :value="formData.createTime" label="提案时间" name="createTime"
readonly></van-field>
<van-field :rules="[{ required:true, message: '请填写提案名称'}]" label="提案名称" name="proposalName"
placeholder="请填写提案名称"
required v-model="formData.proposalName"></van-field>
<van-field :rules="[{ required:true, message: '请选择提案方式'}]" @click="showMannerCodePicker = true"
clickable
label="提案方式"
name="mannerName"
placeholder="点击选择提案方式"
readonly required
v-model="formData.mannerName"></van-field>
<van-popup position="bottom" round v-model:show="showMannerCodePicker">
<van-picker :columns="mannerList" @cancel="showMannerCodePicker = false" @confirm="onMannerCodeConfirm"
show-toolbar>
</van-picker>
</van-popup>
<van-field :value="formData.teacherMeeting" label="所属教代会" name="teacherMeeting"
readonly></van-field>
<van-field v-show="false" :rules="[{ required:true, message: '请选择所属代表团'}]"
@click="${@shiro.hasRole('jdhdb01')} ? '' : showDelegationNamePicker = true"
clickable label="所属代表团"
name="delegationName"
placeholder="点击选择所属代表团"
readonly required
v-if="formData.mannerCode!='W03'" v-model="formData.delegationName"></van-field>
<van-popup position="bottom" round v-model:show="showDelegationNamePicker">
<van-picker :columns="delegationOptions" @cancel="showDelegationNamePicker = false"
@confirm="onDelegationNameConfirm"
show-toolbar>
</van-picker>
</van-popup>
<van-field :rules="[{ required:true, message: '请选择所属委员会'}]" @click="showCommitteeNamePicker = true"
clickable label="所属委员会"
name="committeeName"
placeholder="点击选择所属委员会"
readonly required
v-if="formData.mannerCode=='W03'" v-model="formData.committeeName"></van-field>
<van-popup position="bottom" round v-model:show="showCommitteeNamePicker">
<van-picker :columns="committeeOptions" @cancel="showCommitteeNamePicker = false"
@confirm="onCommitteeNameConfirm"
show-toolbar>
</van-picker>
</van-popup>
<van-field @click="showTypeNamePicker = true" clickable
label="提案类型"
name="typeName"
placeholder="点击选择提案类型"
readonly
v-model="formData.typeName"></van-field>
<van-popup position="bottom" round v-model:show="showTypeNamePicker">
<van-picker :columns="typeOptions" @cancel="showTypeNamePicker = false" @confirm="onTypeNameConfirm"
show-toolbar>
</van-picker>
</van-popup>
<van-field
:rules="[{ required:true, message: '请输入案由'}]"
autosize
clearable
label="案&emsp;&emsp;由"
maxlength="1000"
placeholder="请输入案由"
required
rows="5"
show-word-limit
type="textarea"
v-model="formData.brief"
></van-field>
<van-field
:rules="[{ required:true, message: '请输入建议措施'}]"
autosize
clearable
label="建议措施"
maxlength="1000"
placeholder="请输入建议措施"
required
rows="5"
show-word-limit
type="textarea"
v-model="formData.measures"
></van-field>
<van-field name="files" label="附&emsp;&emsp;件" style="flex-flow: column" input-align="left">
<template #label>
<div class="mb10">&emsp;&emsp;</div>
</template>
<template #input>
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
</template>
</van-field>
<van-cell title="签&emsp;&emsp;字" v-if="isSign()">
<template #label>
<mobile-sign class="mt20" ref="signature" h="0.25" :my_sign.sync="formData.sign"></mobile-sign>
</template>
</van-cell>
</van-cell-group>
<div style="display: flex;justify-content: space-around;padding: 20px 0 20px 0;">
<van-button :color="themeColor" @click="doAdd" style="flex: 1;margin: 0 10px 0 10px">保存提案
</van-button>
<van-button :color="themeColor" @click="doSubmit" style="flex: 1;margin: 0 10px 0 10px"
v-if="formData.mannerCode!='W01'">提交
</van-button>
</div>
</van-form>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
showMannerCodePicker: false,
showDelegationNamePicker: false,
showCommitteeNamePicker: false,
showTypeNamePicker: false,
config: {},
allMannerList: [],
mannerList: [],
meetingOptions: [],
typeOptions: [],
delegationOptions: [],
committeeOptions: [],
formData: {
username: '${@shiro.getPrincipalProperty("username")}',
createTime: moment().format('YYYY-MM-DD'),
delegationId: '',
sign: '',
id: '',
mannerCode: 'W01'
},
isSign: () => {
return mProposal.needSignState.map(v => v.stateCode).includes(100)
},
}
},
components: {
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue'),
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
},
mounted() {
this.$nextTick(() => {
if (this.$refs.signature) {
this.$refs.signature.getMySign()
}
})
},
methods: {
async doAdd() {
let method = this.formData.id ? "/doEdit" : "/doAdd"
this.$refs['addForm'].validate().then(async () => {
if (!this.formData.brief || this.formData.brief.length < this.config.words) {
vant.Toast('提案案由最少需要' + this.config.words + '字')
return
}
if (this.formData.sign !== "") {
this.$refs.signature.submitSign()
}
let data = clone(this.formData)
if (data.files) {
data.files = JSON.stringify(data.files)
}
$.post('/platform/proposal/transact/compose' + method, {
data: JSON.stringify(data),
sign: data.sign
}).then(res => {
if (res.code == 0) {
this.$toast.success('成功');
window.location.href = "/mobile/proposal/compose"
} else {
this.$toast.fail('失败');
}
})
})
},
async doSubmit() {
this.$refs["addForm"].validate().then(async () => {
if (!this.formData.brief || this.formData.brief.length < this.config.words) {
vant.Toast('提案案由最少需要' + this.config.words + '字')
return
}
vant.Dialog.confirm({
title: '提示',
message: '确定要提交此提案吗?',
}).then(async () => {
if (this.formData.sign !== "") {
this.$refs.signature.submitSign()
}
let data = clone(this.formData)
if (data.files) {
data.files = JSON.stringify(data.files)
}
const resp = await $.post("/platform/proposal/transact/writeproposal/doSubmit", {
data: JSON.stringify(data),
sign: data.sign
})
if (resp.code === 0) {
this.$toast.success('成功');
window.location.href = "/mobile/proposal/compose"
} else {
this.$toast.fail('失败');
}
})
})
},
onTypeNameConfirm(val) {
this.$set(this.formData, "typeName", val.text)
this.$set(this.formData, "typeId", val.value)
this.showTypeNamePicker = false;
},
onCommitteeNameConfirm(val) {
this.$set(this.formData, "committeeName", val.text)
this.$set(this.formData, "committeeId", val.value)
this.showCommitteeNamePicker = false;
},
onDelegationNameConfirm(val) {
this.$set(this.formData, "delegationName", val.text)
this.$set(this.formData, "delegationId", val.value)
this.showDelegationNamePicker = false;
},
onMannerCodeConfirm(val) {
this.$set(this.formData, "mannerName", val.text)
this.$set(this.formData, "mannerCode", val.value)
this.showMannerCodePicker = false;
},
async getDictByCode() {
const {data} = await $.get("/platform/proposal/basics/config/getDictByCode", {code: "proposal_manner"})
return data
},
async initData() {
this.allMannerList = await this.getDictByCode("proposal_manner");
this.config = await mProposal.getProposalConfig()
vant.Dialog.alert({
title: '撰写须知',
message: this.config.writeRemind,
}).then(() => {
// on close
});
this.meetingOptions = await mProposal.getOpenMeeting()
const typeOptions = await mProposal.getProposalType()
this.$set(this.formData, "teacherMeetingId", this.meetingOptions ? this.meetingOptions[0].id : null)
this.$set(this.formData, "teacherMeeting", this.meetingOptions ? this.meetingOptions[0].jdhallname : null)
const delegationOptions = await mProposal.getDelegation(this.formData.teacherMeetingId)
delegationOptions.forEach(v => {
this.delegationOptions.push({value: v.id, text: v.dbtname})
})
this.typeOptions = typeOptions.filter(v => v.value)
console.log(this.typeOptions)
// typeOptions.forEach(v => {
// this.typeOptions.push({value: v.id, text: v.typeName})
// })
this.$set(this.formData, "delegationId", this.delegationOptions.length > 0 ? this.delegationOptions[0].value : '')
this.$set(this.formData, "delegationName", this.delegationOptions.length > 0 ? this.delegationOptions[0].text : '')
const jgcy = await $.post("/platform/proposal/transact/writeproposal/getJdhJgcy", {jdhid: this.formData.teacherMeetingId})
const cbdwFzr = await $.post("/platform/proposal/transact/writeproposal/getCbdwFzr")
if (jgcy.data > 0) {
const jgName = await $.post("/platform/proposal/transact/writeproposal/getJgNameByuser")
jgName.data.forEach(v => {
this.committeeOptions.push({value: v.id, text: v.name})
})
}
if (this.allMannerList.length > 0) {
this.config.manner.forEach(v => {
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('jdhdb01')}" === 'true' && v === "W01") {
const data = this.allMannerList.find(z => z.code == v)
this.mannerList.push({value: data.code, text: data.name})
}
if ("${@shiro.hasRole('sysadmin')||(@shiro.hasRole('jdhdb01')&&@shiro.hasRole('jdhdbt01'))}" === 'true' && v === "W02") {
const data = this.allMannerList.find(z => z.code == v)
this.mannerList.push({value: data.code, text: data.name})
}
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('jdhdb01')}" === 'true' && v === "W03" && jgcy.data > 0) {
const data = this.allMannerList.find(z => z.code == v)
this.mannerList.push({value: data.code, text: data.name})
}
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('jdhdb01')}" === 'true' && v === "W04" && cbdwFzr.data > 0) {
const data = this.allMannerList.find(z => z.code == v)
this.mannerList.push({value: data.code, text: data.name})
}
})
this.$set(this.formData, "mannerId", this.mannerList ? this.mannerList[0].value : '')
this.$set(this.formData, "mannerName", this.mannerList ? this.mannerList[0].text : '')
}
}
},
created() {
this.initData()
}
})
</script>
<!--#
}
#-->