first commit
This commit is contained in:
@@ -0,0 +1,233 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-radio-group {
|
||||
vertical-align: unset !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-clock>
|
||||
<guava ref="guava">
|
||||
<syr-table :smm.sync="smm" auditval="评审" ref="syrTable" request="/platfotm/syr/info/pwjtps/pageData"
|
||||
yeartype="jtyear">
|
||||
<template slot="operation">
|
||||
<el-table-column label="操作" fixed="right" width="300">
|
||||
<template slot-scope="{row}">
|
||||
<!--如果是超管 根据状态来判断评委是否都评审完-->
|
||||
<template v-if="hasAdminRole">
|
||||
<el-button size="mini"
|
||||
:type="row.state>100?null:'primary'"
|
||||
@click="openView(row,row.state>100)">
|
||||
{{row.state>100?'查看':'评审'}}
|
||||
</el-button>
|
||||
</template>
|
||||
<!--如果是评委-->
|
||||
<template v-else>
|
||||
<el-button
|
||||
:type="row.isps>0?null:'primary'"
|
||||
@click="openView(row,row.isps>0)"
|
||||
size="mini">
|
||||
{{row.isps>0?'查看':'评审'}}
|
||||
</el-button>
|
||||
<el-button
|
||||
:type="row.isps>0?'primary':''"
|
||||
@click="openEdit(row)"
|
||||
size="mini"
|
||||
v-if="[100,110].includes(row.state)">
|
||||
修改
|
||||
</el-button>
|
||||
</template>
|
||||
<el-button size="mini" type="danger" v-if="row.state>100 && row.state<=110"
|
||||
@click="doRollBack(row)">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</syr-table>
|
||||
|
||||
<template #edit>
|
||||
<syr-info-new ref="auditInfo">
|
||||
<template slot="handle">
|
||||
<el-tab-pane label="评委结题评审" name="pwjtps">
|
||||
<el-form :model="formData" :rules="rules" label-width="100px" ref="Form">
|
||||
<el-row type="flex">
|
||||
<el-col>
|
||||
<el-form-item label="评委" prop="pwid">
|
||||
<span v-if="hasAdminRole">
|
||||
<el-select v-model="formData.pwid">
|
||||
<el-option v-for="u in userList"
|
||||
:value="u.userid"
|
||||
:key="u.userid"
|
||||
:label="u.username + '-' +u.loginname">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</span>
|
||||
<span v-else>
|
||||
${@shiro.getPrincipalProperty('username')}
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="审核时间">
|
||||
{{moment().format('YYYY-MM-DD')}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex">
|
||||
<el-col>
|
||||
<el-form-item label="是否通过" prop="ispass">
|
||||
<el-radio-group v-model="formData.ispass" size="mini">
|
||||
<el-radio :label="true" border>是</el-radio>
|
||||
<el-radio :label="false" border>否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="是否优秀" prop="isgood" v-if="formData.ispass">
|
||||
<el-radio-group v-model="formData.isgood" size="mini">
|
||||
<el-radio :label="true" border>是</el-radio>
|
||||
<el-radio :label="false" border>否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="评审建议" prop="psjy">
|
||||
<el-input maxlength="100" rows="5" type="textarea"
|
||||
v-model="formData.psjy"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="签字" prop="pwjtqz">
|
||||
<sign :qz.sync="formData.pwjtqz" prefix="pwjtqz"></sign>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row class="mt20 text-center">
|
||||
<el-button @click="$refs.guava.index()">返 回</el-button>
|
||||
<el-button @click="doHandle" type="primary">提 交</el-button>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</syr-info-new>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<syr-info-new ref="viewInfo"></syr-info-new>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
isEdit: false,
|
||||
smm: {
|
||||
status: 'table'
|
||||
},
|
||||
formData: {},
|
||||
handleShow: false,
|
||||
userList: [],
|
||||
rules: {
|
||||
pwid: [{required: true, message: '请选择评委', trigger: ['blur', 'change']}],
|
||||
psjy: [
|
||||
{required: true, message: '请填写评审建议', trigger: ['blur', 'change']},
|
||||
{max: 100, message: '最多填写100个字', trigger: ['blur', 'change']}],
|
||||
ispass: [{required: true, message: '请选择是否通过', trigger: ['blur', 'change']}],
|
||||
isgood: [{required: true, message: '请选择是否优秀', trigger: ['blur', 'change']}],
|
||||
pwjtqz: [{required: true, message: '请签字', trigger: ['blur', 'change']}],
|
||||
},
|
||||
//拥有其它权限吗 校管 超管
|
||||
hasAdminRole: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'syr-table':
|
||||
httpVueLoader('/components/syr/syrtable.vue'),
|
||||
'syr-info':
|
||||
httpVueLoader('/components/syr/syrinfo.vue'),
|
||||
'syr-info-new':
|
||||
httpVueLoader('/components/syr/SyrInfoNew.vue'),
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
openView(row, isView) {
|
||||
if (isView) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id, '9')
|
||||
} else {
|
||||
this.isEdit = false
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.openView(row.id, 'pwjtps')
|
||||
this.$set(this.formData, 'xmid', row.id)
|
||||
this.$set(this.formData, 'ispass', null)
|
||||
this.$set(this.formData, 'isgood', null)
|
||||
this.$set(this.formData, 'psjy', null)
|
||||
this.$set(this.formData, 'pwid', this.hasAdminRole ? '' : "${@shiro.getPrincipalProperty('id')}")
|
||||
}
|
||||
this.getWpsPwList(row.id)
|
||||
},
|
||||
async openEdit(row) {
|
||||
this.isEdit = true
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.openView(row.id, 'pwjtps')
|
||||
const resp = await $.get(loc() + '/getJtpsInfo', {
|
||||
xmId: row.id,
|
||||
pwId: "${@shiro.getPrincipalProperty('id')}"
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$set(this.formData, 'xmid', resp.data.xmid)
|
||||
this.$set(this.formData, 'ispass', resp.data.ispass)
|
||||
this.$set(this.formData, 'isgood', resp.data.isgood)
|
||||
this.$set(this.formData, 'pssj', resp.data.pssj)
|
||||
this.$set(this.formData, 'psjy', resp.data.psjy)
|
||||
this.$set(this.formData, 'pwid', resp.data.pwid)
|
||||
this.$set(this.formData, 'pwjtqz', resp.data.pwjtqz)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
this.getWpsPwList(row.id)
|
||||
/*console.log(resp.data)
|
||||
this.formData = {
|
||||
xmid: row.id,
|
||||
isjylx: '1',
|
||||
lxlevel: '2000',
|
||||
psyj: '',
|
||||
pwid: this.hasAdminRole ? '' : "${@shiro.getPrincipalProperty('id')}"
|
||||
}*/
|
||||
|
||||
},
|
||||
async doHandle() {
|
||||
const valid = await this.$refs['Form'].validate()
|
||||
if (!valid) return
|
||||
const reqUrl = this.isEdit ? '/platfotm/syr/info/pwjtps/doEdit' : '/platfotm/syr/info/pwjtps/doHandle'
|
||||
const resp = await $.post(reqUrl, this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
this.$refs['syrTable'].doSearch()
|
||||
}
|
||||
}
|
||||
,
|
||||
async getWpsPwList(xmid) {
|
||||
const {data} = await $.get('/platfotm/syr/info/pwjtps/getWpsPwList', {xmid: xmid})
|
||||
this.userList = data
|
||||
},
|
||||
async doRollBack(row) {
|
||||
const resp = await $.get('/platfotm/syr/info/yjsh/doRollBack', {id: row.id, state: row.state})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.$refs['syrTable'].doSearch()
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
if (${@shiro.hasRole('sysadmin')} || ${@shiro.hasRole('A06')}) {
|
||||
this.hasAdminRole = true
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user