834 lines
40 KiB
HTML
834 lines
40 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<style>
|
|
.el-divider {
|
|
background-color: #409EFF;
|
|
margin-top: 40px;
|
|
}
|
|
|
|
.el-divider__text {
|
|
color: #409EFF;
|
|
}
|
|
|
|
.el-form-item__error {
|
|
font-size: 16px;
|
|
}
|
|
</style>
|
|
<div id="app" v-cloak>
|
|
<guava ref="guava">
|
|
<syr-table :smm.sync="smm" auditval="申请" ref="syrTable" request="/platfotm/syr/info/jtsq/pageData"
|
|
yeartype="jtyear">
|
|
<template slot="operation">
|
|
<el-table-column label="操作" fixed="right" width="400">
|
|
<template slot-scope="{row}">
|
|
<el-button size="mini" :type="row.state>90?null:'primary'"
|
|
@click="openView(row,row.state>90)">
|
|
{{row.state>90?'查看':'结题申请'}}
|
|
</el-button>
|
|
<el-button size="mini" type="primary" @click="doRevoke(row.id)" v-if="row.state==91">
|
|
撤回
|
|
</el-button>
|
|
<el-button size="mini" type="primary" @click="openView(row,row.state>90)" v-if="row.state==91">
|
|
编辑
|
|
</el-button>
|
|
<el-button size="mini" v-if="row.state>90" type="primary" @click="exportjtBgs(row.id)">
|
|
导出结题报告书
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</template>
|
|
</syr-table>
|
|
|
|
<template #edit>
|
|
<syr-info-new ref="auditInfo">
|
|
<template slot="handle">
|
|
<el-tab-pane label="结题申请" name="jtsq">
|
|
<el-form :model="formData" :rules="rules" label-position="top" ref="Form">
|
|
|
|
<h3>基本信息</h3>
|
|
<div style="margin-bottom: 30px">
|
|
<el-form-item label="项目名称" prop="xmmc">
|
|
<el-input maxlength="50" placeholder="项目名称" v-model="formData.xmmc"></el-input>
|
|
</el-form-item>
|
|
</div>
|
|
|
|
<el-divider content-position="left">申报人信息</el-divider>
|
|
|
|
<el-row :gutter="20">
|
|
<el-col :lg="8" :sm="24">
|
|
<el-form-item label="申请人">
|
|
<el-input placeholder="姓名" readonly
|
|
:value="formData.username"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :lg="8" :sm="24">
|
|
<el-form-item label="性别">
|
|
<el-input placeholder="性别" readonly
|
|
:value="formData.sex"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :lg="8" :sm="24">
|
|
<el-form-item label="出生年月" prop="birthday">
|
|
<el-date-picker
|
|
placeholder="出生年月"
|
|
type="date"
|
|
v-model="formData.birthday"
|
|
value-format="yyyy-MM-dd">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
<el-row :gutter="20">
|
|
<el-col :lg="8" :sm="24">
|
|
<!-- <el-form-item label="职务/职称" prop="zwzc">-->
|
|
<!-- <el-input v-model="formData.zwzc"></el-input>-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item label="立项资助金额">
|
|
<el-input :value="formData.lxlevel" readonly></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :lg="8" :sm="24">
|
|
<el-form-item label="申报单位" prop="dwname">
|
|
<el-input readonly :value="formData.dwname"></el-input>
|
|
</el-form-item>
|
|
</el-col><!--
|
|
<el-col :lg="8" :sm="24">
|
|
<el-form-item label="学历/学位" prop="xlxw">
|
|
<el-input v-model="formData.xlxw"></el-input>
|
|
</el-form-item>
|
|
</el-col>-->
|
|
</el-row>
|
|
<el-row :gutter="20">
|
|
|
|
<el-col :lg="8" :sm="24">
|
|
<el-form-item label="手机" prop="mobile">
|
|
<el-input v-model="formData.mobile"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :lg="8" :sm="24">
|
|
<el-form-item label="院级工会" prop="ghname">
|
|
<el-input :value="formData.ghname"
|
|
readonly></el-input>
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
</el-row>
|
|
|
|
<el-divider content-position="left">项目组成员</el-divider>
|
|
<div>
|
|
<div class="text-right">
|
|
<el-button @click="addXmzcy" round
|
|
size="mini"
|
|
type="primary">添加成员
|
|
</el-button>
|
|
</div>
|
|
|
|
<el-table :data="formData.xmzcy" max-height="300">
|
|
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
|
<el-table-column label="工号" prop="loginname">
|
|
<template slot-scope="scope">
|
|
<el-select clearable
|
|
size="mini"
|
|
v-model="scope.row.userId" filterable remote
|
|
placeholder="输入工号或者姓名查找" :remote-method="queryUser"
|
|
@change="userChange(scope)" style="width: 100%">
|
|
<el-option v-for="o in userList"
|
|
:label="o.username+'('+o.loginname+')'"
|
|
:value="o.id"
|
|
:key="o.id"></el-option>
|
|
</el-select>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="姓名" prop="username">
|
|
<template slot-scope="scope">
|
|
<el-input size="mini" v-model="scope.row.username"></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="职称" prop="zc">
|
|
<template slot-scope="scope">
|
|
<el-input size="mini" v-model="scope.row.zc"></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<!-- <el-table-column label="学历" prop="xl">
|
|
<template slot-scope="scope">
|
|
<el-input size="mini" v-model="scope.row.xl"></el-input>
|
|
</template>
|
|
</el-table-column>-->
|
|
<el-table-column label="工作单位及职务" prop="gzdw">
|
|
<template slot-scope="scope">
|
|
<el-input size="mini" v-model="scope.row.gzdw"></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="150">
|
|
<template slot-scope="scope">
|
|
<el-button @click="formData.xmzcy.splice(scope.$index, 1)"
|
|
icon="el-icon-delete" round
|
|
size="mini"
|
|
type="danger"></el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
|
|
<!-- <el-divider content-position="left" ref="yjjctjdivider">
|
|
项目研究基础及条件(最多填写400字,当前字数
|
|
<span :style="{color:(yanjiujichuLength>400?'red':'')}"> {{yanjiujichuLength}})</span>
|
|
</el-divider>
|
|
<el-form-item label-width="0" prop="yjjctj" style="margin-bottom: 40px;">
|
|
<div ref="yjjctj" style="width: 100%;"></div>
|
|
</el-form-item>
|
|
|
|
<el-divider content-position="left" ref="xmssljffdivider">
|
|
项目实施路径及方法(最多填写400字,当前字数
|
|
<span :style="{color:(xmssljffLength>400?'red':'')}"> {{xmssljffLength}})</span>
|
|
</el-divider>
|
|
<el-form-item label-width="0" prop="xmssljff" style="margin-bottom: 40px;">
|
|
<div ref="xmssljff" style="width: 100%;"></div>
|
|
</el-form-item>
|
|
|
|
|
|
<el-divider content-position="left">
|
|
项目预期成果及应用推广价值(最多填写300字,当前字数
|
|
<span :style="{color:(yqcgtgjzLength>400?'red':'')}">{{yqcgtgjzLength}})</span>
|
|
</el-divider>
|
|
<el-form-item label-width="0" prop="yqcgtgjz">
|
|
<div ref="yqcgtgjz" style="width: 100%;"></div>
|
|
</el-form-item>-->
|
|
|
|
<h3>结题申请信息</h3>
|
|
<el-divider content-position="left">
|
|
项目研究实践的主要内容及方法(最多填写400字,当前字数
|
|
<span :style="{color:(zynrLength>400?'red':'')}">{{zynrLength}})</span>
|
|
</el-divider>
|
|
<el-form-item label-width="0" prop="zynr">
|
|
<div ref="zynr" style="width: 100%;"></div>
|
|
</el-form-item>
|
|
|
|
<el-divider content-position="left">
|
|
成果自我评价及应用范围或取得的社会效益(最多填写1000字,当前字数
|
|
<span :style="{color:(zwpjshxyLength>1000?'red':'')}">{{zwpjshxyLength}})</span>
|
|
</el-divider>
|
|
<el-form-item label-width="0" prop="zwpjshxy">
|
|
<div ref="zwpjshxy" style="width: 100%;"></div>
|
|
</el-form-item>
|
|
|
|
<el-divider content-position="left">
|
|
主要成果介绍(突出重点、论点或创新部分,最多填写400字,当前字数
|
|
<span :style="{color:(zycgjsLength>400?'red':'')}">{{zycgjsLength}})</span>
|
|
</el-divider>
|
|
<el-form-item label-width="0" prop="zycgjs">
|
|
<div ref="zycgjs" style="width: 100%;"></div>
|
|
</el-form-item>
|
|
|
|
<el-divider content-position="left">
|
|
成果目录(总结报告、论文、多媒体课件等)(成果以附件形式上传)
|
|
</el-divider>
|
|
<div>
|
|
<div class="text-right">
|
|
<el-button @click="formData.cgml.push({'cgxs': '', 'cgmc': '', 'zywcr': ''})" round
|
|
size="mini"
|
|
type="primary">添加成果
|
|
</el-button>
|
|
</div>
|
|
|
|
<el-table :data="formData.cgml" max-height="300">
|
|
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
|
<el-table-column label="成果形式" prop="cgxs">
|
|
<template slot-scope="scope">
|
|
<el-input size="mini" v-model="scope.row.cgxs"></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="成果名称" prop="cgmc">
|
|
<template slot-scope="scope">
|
|
<el-input size="mini" v-model="scope.row.cgmc"></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="主要完成人" prop="zywcr">
|
|
<template slot-scope="scope">
|
|
<el-input size="mini" v-model="scope.row.zywcr"></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="150">
|
|
<template slot-scope="scope">
|
|
<el-button @click="formData.cgml.splice(scope.$index, 1)"
|
|
icon="el-icon-delete" round
|
|
size="mini"
|
|
type="danger"></el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
|
|
|
|
<el-divider content-position="left">
|
|
经费使用情况(最多填写200字,当前字数
|
|
<span :style="{color:(jfsyqkLength>200?'red':'')}">{{jfsyqkLength}})</span>
|
|
</el-divider>
|
|
<el-form-item label-width="0" prop="jfsyqk">
|
|
<div ref="jfsyqk" style="width: 100%;"></div>
|
|
</el-form-item>
|
|
|
|
<el-divider content-position="left">项目成果及其佐证材料(不超过5个文件。其中,总结报告和论文须上传PDF版)</el-divider>
|
|
<el-form-item label="">
|
|
<wp-upload
|
|
@on-delete="onDeleteFile"
|
|
:file-list="fileList"
|
|
:max-file-number="5"
|
|
:upload-auto="false"
|
|
ref="upload"></wp-upload>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-row class="mt20 text-center">
|
|
<el-button @click="$refs.guava.index()">返回</el-button>
|
|
<el-button @click="doSave" type="primary">保存</el-button>
|
|
<el-button @click="doHandle(true)" 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 yjjctjEditor = null
|
|
let yqcgtgjzEditor = null
|
|
let xmssljffEditor = null
|
|
|
|
let zynrEditor = null
|
|
let cgzwpjshxyEditor = null
|
|
let cgjsEditor = null
|
|
let jfsyqkEditor = null
|
|
|
|
const o = {'username': '', 'zc': '', 'xl': '', 'gzdw': ''}
|
|
const o2 = {'cgxs': '', 'cgmc': '', 'zywcr': ''}
|
|
|
|
let vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
data() {
|
|
const validatorYjjctj = (rule, value, callback) => {
|
|
if (value === '' || value == null) {
|
|
callback(new Error('请填写'))
|
|
} else if (removeHTMLTag(value).length > 400) {
|
|
callback(new Error('字数太多,无法提交。'))
|
|
} else {
|
|
callback()
|
|
}
|
|
}
|
|
const validatorYqcgtgjz = (rule, value, callback) => {
|
|
if (value === '' || value == null) {
|
|
callback(new Error('请填写'))
|
|
} else if (removeHTMLTag(value).length > 300) {
|
|
callback(new Error('字数太多,无法提交。'))
|
|
} else {
|
|
callback()
|
|
}
|
|
}
|
|
|
|
const validatorXmssljff = (rule, value, callback) => {
|
|
if (value === '' || value == null) {
|
|
callback(new Error('请填写'))
|
|
} else if (removeHTMLTag(value).length > 400) {
|
|
callback(new Error('字数太多,无法提交。'))
|
|
} else {
|
|
callback()
|
|
}
|
|
}
|
|
|
|
const validatorZynr = (rule, value, callback) => {
|
|
if (value === '' || value == null) {
|
|
callback(new Error('请填写'))
|
|
} else if (removeHTMLTag(value).length > 400) {
|
|
callback(new Error('字数太多,无法提交。'))
|
|
} else {
|
|
callback()
|
|
}
|
|
}
|
|
|
|
const validatorZwpjshxy = (rule, value, callback) => {
|
|
if (value === '' || value == null) {
|
|
callback(new Error('请填写'))
|
|
} else if (removeHTMLTag(value).length > 1000) {
|
|
callback(new Error('字数太多,无法提交。'))
|
|
} else {
|
|
callback()
|
|
}
|
|
}
|
|
|
|
const validatorZycgjs = (rule, value, callback) => {
|
|
if (value === '' || value == null) {
|
|
callback(new Error('请填写'))
|
|
} else if (removeHTMLTag(value).length > 400) {
|
|
callback(new Error('字数太多,无法提交。'))
|
|
} else {
|
|
callback()
|
|
}
|
|
}
|
|
|
|
const validatorJfsyqk = (rule, value, callback) => {
|
|
if (value === '' || value == null) {
|
|
callback(new Error('请填写'))
|
|
} else if (removeHTMLTag(value).length > 500) {
|
|
callback(new Error('字数太多,无法提交。'))
|
|
} else {
|
|
callback()
|
|
}
|
|
}
|
|
|
|
return {
|
|
fileList: [],
|
|
smm: {
|
|
status: 'table'
|
|
},
|
|
formData: {
|
|
xmzcy: [],
|
|
yjjctj: '',
|
|
yqcgtgjz: '',
|
|
xmssljff: '',
|
|
zynr: '',
|
|
zwpjshxy: '',
|
|
zycgjs: '',
|
|
jfsyqk: ''
|
|
|
|
},
|
|
handleShow: false,
|
|
rules: {
|
|
//birthday: [{required: true, message: '请选择出生年月', trigger: ['blur', 'change']}],
|
|
zwzc: [{required: true, message: '请填写职务职称', trigger: ['blur', 'change']}],
|
|
//mobile: [{required: true, message: '请填写手机号', trigger: ['blur', 'change']}],
|
|
|
|
yjjctj: [{validator: validatorYjjctj, trigger: ['blur', 'change']}],
|
|
xmssljff: [{validator: validatorXmssljff, trigger: ['blur', 'change']}],
|
|
yqcgtgjz: [{validator: validatorYqcgtgjz, trigger: ['blur', 'change']}],
|
|
zynr: [{validator: validatorZynr, trigger: ['blur', 'change']}],
|
|
zwpjshxy: [{validator: validatorZwpjshxy, trigger: ['blur', 'change']}],
|
|
zycgjs: [{validator: validatorZycgjs, trigger: ['blur', 'change']}],
|
|
jfsyqk: [{validator: validatorJfsyqk, trigger: ['blur', 'change']}],
|
|
},
|
|
pageForm: {
|
|
yearType: 'sbyear'
|
|
},
|
|
delFile: [],
|
|
userList: []
|
|
}
|
|
},
|
|
computed: {
|
|
|
|
// yanjiujichuLength() {
|
|
// if (this.formData.yjjctj) {
|
|
// return removeHTMLTag(this.formData.yjjctj).length
|
|
// }
|
|
// return 0
|
|
// },
|
|
// yqcgtgjzLength() {
|
|
// if (this.formData.yqcgtgjz) {
|
|
// return removeHTMLTag(this.formData.yqcgtgjz).length
|
|
// } else {
|
|
// return 0
|
|
// }
|
|
// },
|
|
// xmssljffLength() {
|
|
// if (this.formData.xmssljff) {
|
|
// return removeHTMLTag(this.formData.xmssljff).length
|
|
// } else {
|
|
// return 0
|
|
// }
|
|
// },
|
|
zynrLength() {
|
|
if (this.formData.zynr) {
|
|
return removeHTMLTag(this.formData.zynr).length
|
|
} else {
|
|
return 0
|
|
}
|
|
},
|
|
zwpjshxyLength() {
|
|
if (this.formData.zwpjshxy) {
|
|
return removeHTMLTag(this.formData.zwpjshxy).length
|
|
} else {
|
|
return 0
|
|
}
|
|
},
|
|
zycgjsLength() {
|
|
if (this.formData.zycgjs) {
|
|
return removeHTMLTag(this.formData.zycgjs).length
|
|
} else {
|
|
return 0
|
|
}
|
|
},
|
|
jfsyqkLength() {
|
|
if (this.formData.jfsyqk) {
|
|
return removeHTMLTag(this.formData.jfsyqk).length
|
|
} else {
|
|
return 0
|
|
}
|
|
}
|
|
|
|
},
|
|
components: {
|
|
'syr-table': httpVueLoader('/components/syr/syrtable.vue'),
|
|
'syr-info': httpVueLoader('/components/syr/syrinfo.vue'),
|
|
'syr-info-new': httpVueLoader('/components/syr/SyrInfoNew.vue'),
|
|
},
|
|
methods: {
|
|
async doRevoke(id) {
|
|
const confirm = await this.$confirm('您确定要撤回吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
})
|
|
if ('confirm' !== confirm) return
|
|
const resp = await $.post(loc() + '/doRevoke', {xmid: id})
|
|
if (resp.code === 0) {
|
|
this.$refs.syrTable.pageData()
|
|
this.notifySuccess(resp.msg)
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
console.log(id)
|
|
},
|
|
|
|
onDeleteFile(file) {
|
|
console.log(file)
|
|
if (file.fileDes) {
|
|
this.delFile.push(file.fileDes.filepath)
|
|
}
|
|
},
|
|
addXmzcy() {
|
|
this.formData.xmzcy.push({'username': '', 'zc': '', 'xl': '', 'gzdw': ''})
|
|
},
|
|
async queryUser(val) {
|
|
const data = await searchUser(val)
|
|
this.userList = data
|
|
},
|
|
userChange(scope) {
|
|
const userList = clone(this.userList)
|
|
const user = userList.find(v => v.id == scope.row.userId)
|
|
if (user) {
|
|
scope.row.username = user.username
|
|
scope.row.zc = user.zc
|
|
scope.row.gzdw = user.dwname
|
|
}
|
|
|
|
},
|
|
async initEditor() {
|
|
return await new Promise((resolve, reject) => {
|
|
this.$nextTick(() => {
|
|
setTimeout(() => {
|
|
// if (yjjctjEditor) {
|
|
// yjjctjEditor.destroy()
|
|
// }
|
|
// if (xmssljffEditor) {
|
|
// xmssljffEditor.destroy()
|
|
// }
|
|
// if (yqcgtgjzEditor) {
|
|
// yqcgtgjzEditor.destroy()
|
|
// }
|
|
if (zynrEditor) {
|
|
zynrEditor.destroy()
|
|
}
|
|
if (cgzwpjshxyEditor) {
|
|
cgzwpjshxyEditor.destroy()
|
|
}
|
|
if (cgjsEditor) {
|
|
cgjsEditor.destroy()
|
|
}
|
|
if (jfsyqkEditor) {
|
|
jfsyqkEditor.destroy()
|
|
}
|
|
|
|
// yjjctjEditor = new wangEditor(this.$refs.yjjctj)
|
|
// yjjctjEditor.config.onchange = (html) => {
|
|
// if (removeHTMLTag(html).length > 400) {
|
|
// this.$message.info('项目研究基础及条件最多填写400字')
|
|
// }
|
|
// this.$refs.Form.validateField('yjjctj', (errMsg) => {
|
|
// })
|
|
// this.formData.yjjctj = html
|
|
// }
|
|
// yjjctjEditor.config.uploadImgShowBase64 = true
|
|
// yjjctjEditor.create()
|
|
//
|
|
// xmssljffEditor = new wangEditor(this.$refs.xmssljff)
|
|
// xmssljffEditor.config.onchange = (html) => {
|
|
// if (removeHTMLTag(html).length > 400) {
|
|
// this.$message.info('项目实施路径及方法最多填写400字')
|
|
// }
|
|
// this.$refs.Form.validateField('xmssljff', (errMsg) => {
|
|
// })
|
|
// this.formData.xmssljff = html
|
|
// }
|
|
// xmssljffEditor.config.uploadImgShowBase64 = true
|
|
// xmssljffEditor.create()
|
|
//
|
|
// yqcgtgjzEditor = new wangEditor(this.$refs.yqcgtgjz)
|
|
// yqcgtgjzEditor.config.onchange = (html) => {
|
|
// if (removeHTMLTag(html).length > 300) {
|
|
// this.$message.info('项目预期成果及应用推广价值最多填写300字')
|
|
// }
|
|
// this.$refs.Form.validateField('yqcgtgjz', (errMsg) => {
|
|
// })
|
|
// this.formData.yqcgtgjz = html
|
|
// }
|
|
// yqcgtgjzEditor.config.uploadImgShowBase64 = true
|
|
// yqcgtgjzEditor.create()
|
|
|
|
zynrEditor = new wangEditor(this.$refs.zynr)
|
|
zynrEditor.config.onchange = (html) => {
|
|
if (removeHTMLTag(html).length > 400) {
|
|
this.$message.info('项目研究实践的主要内容及方法(不超过400字)')
|
|
}
|
|
this.$refs.Form.validateField('zynr', (errMsg) => {
|
|
})
|
|
this.formData.zynr = html
|
|
}
|
|
zynrEditor.config.uploadImgShowBase64 = true
|
|
zynrEditor.create()
|
|
|
|
cgzwpjshxyEditor = new wangEditor(this.$refs.zwpjshxy)
|
|
cgzwpjshxyEditor.config.onchange = (html) => {
|
|
if (removeHTMLTag(html).length > 1000) {
|
|
this.$message.info('成果自我评价及应用范围或取得的社会效益(不超过1000字)')
|
|
}
|
|
this.$refs.Form.validateField('zwpjshxy', (errMsg) => {
|
|
})
|
|
this.formData.zwpjshxy = html
|
|
}
|
|
cgzwpjshxyEditor.config.uploadImgShowBase64 = true
|
|
cgzwpjshxyEditor.create()
|
|
|
|
cgjsEditor = new wangEditor(this.$refs.zycgjs)
|
|
cgjsEditor.config.onchange = (html) => {
|
|
if (removeHTMLTag(html).length > 400) {
|
|
this.$message.info('主要成果介绍(突出重点、论点或创新部分,不超过400字)')
|
|
}
|
|
this.$refs.Form.validateField('zycgjs', (errMsg) => {
|
|
})
|
|
this.formData.zycgjs = html
|
|
}
|
|
cgjsEditor.config.uploadImgShowBase64 = true
|
|
cgjsEditor.create()
|
|
|
|
jfsyqkEditor = new wangEditor(this.$refs.jfsyqk)
|
|
jfsyqkEditor.config.onchange = (html) => {
|
|
if (removeHTMLTag(html).length > 200) {
|
|
this.$message.info('经费使用情况(不超过200字)')
|
|
}
|
|
this.$refs.Form.validateField('jfsyqk', (errMsg) => {
|
|
})
|
|
this.formData.jfsyqk = html
|
|
}
|
|
jfsyqkEditor.config.uploadImgShowBase64 = true
|
|
jfsyqkEditor.create()
|
|
|
|
resolve()
|
|
}, 600)
|
|
})
|
|
})
|
|
},
|
|
async openView(row, isView) {
|
|
if (isView) {
|
|
this.$refs.guava.view()
|
|
this.$refs.viewInfo.openView(row.id, row.state > 90 ? '9' : '1')
|
|
} else {
|
|
this.$refs.guava.edit()
|
|
this.$refs.auditInfo.openView(row.id, 'jtsq')
|
|
this.formData = {
|
|
id: row.id,
|
|
userid: row.userid,
|
|
xmid: row.id,
|
|
xmmc: row.xmmc,
|
|
username: row.username,
|
|
sex: row.sex,
|
|
birthday: row.birthday,
|
|
zwzc: row.zwzc,
|
|
dwname: row.dwname,
|
|
mobile: row.mobile,
|
|
ghname: row.ghname,
|
|
xmzcy: [{'username': '', 'zc': '', 'xl': '', 'gzdw': ''}],
|
|
yjjctj: row.yjjctj,
|
|
yqcgtgjz: row.yjjctj,
|
|
xmssljff: row.xmssljff,
|
|
zynr: row.zynr,
|
|
zwpjshxy: row.zwpjshxy,
|
|
zycgjs: row.zycgjs,
|
|
jfsyqk: row.jfsyqk,
|
|
cgml: [{'cgxs': '', 'cgmc': '', 'zywcr': ''}],
|
|
lxlevel: row.lxlevel
|
|
|
|
}
|
|
if (row.yjcgfj && row.yjcgfj.length > 0) {
|
|
for (let f of row.yjcgfj) {
|
|
f.name = f.filename
|
|
f.url = FILE_DOMAIN + '/fileStreamPreview?id=' + f.filepath
|
|
}
|
|
this.fileList = row.yjcgfj
|
|
|
|
this.$nextTick(() => {
|
|
this.$refs.upload.refreshFileList()
|
|
})
|
|
}
|
|
await this.initEditor()
|
|
// yjjctjEditor.txt.html(this.formData.yjjctj)
|
|
// yqcgtgjzEditor.txt.html(this.formData.yqcgtgjz)
|
|
// xmssljffEditor.txt.html(this.formData.xmssljff)
|
|
zynrEditor.txt.html(this.formData.zynr)
|
|
cgzwpjshxyEditor.txt.html(this.formData.zwpjshxy)
|
|
cgjsEditor.txt.html(this.formData.zycgjs)
|
|
jfsyqkEditor.txt.html(this.formData.jfsyqk)
|
|
if (row.xmzcy) {
|
|
this.formData.xmzcy = JSON.parse(row.xmzcy)
|
|
this.formData.xmzcy.forEach(v => {
|
|
this.queryUser(v.username)
|
|
})
|
|
|
|
|
|
}
|
|
if (row.cgml) {
|
|
this.formData.cgml = JSON.parse(row.cgml)
|
|
}
|
|
}
|
|
},
|
|
async doHandle(res) {
|
|
const valid = await this.$refs['Form'].validate()
|
|
if (!valid) return
|
|
|
|
const xmcyHasEmpty = this.formData.xmzcy.some(v => v['username'] === '' || v['zc'] === '' || v['gzdw'] === '')
|
|
if (xmcyHasEmpty) {
|
|
this.$message.info('项目成员信息填写不完整')
|
|
return
|
|
}
|
|
|
|
const cgmlHasEmpty = this.formData.cgml.some(v => v['cgmc'] === '' || v['cgxs'] === '' || v['zywcr'] === '')
|
|
if (cgmlHasEmpty) {
|
|
this.$message.info('成果目录信息填写不完整')
|
|
return
|
|
}
|
|
|
|
const fd = new FormData()
|
|
const jbxx = {
|
|
id: this.formData.xmid,
|
|
userid: this.formData.userid,
|
|
birthday: this.formData.birthday,
|
|
zwzc: this.formData.zwzc,
|
|
mobile: this.formData.mobile,
|
|
xmzcy: JSON.stringify(this.formData.xmzcy),
|
|
yjjctj: this.formData.yjjctj,
|
|
xmssljff: this.formData.xmssljff,
|
|
yqcgtgjz: this.formData.yqcgtgjz
|
|
}
|
|
fd.append("jbxx", JSON.stringify(jbxx))
|
|
const jtxx = {
|
|
xmid: this.formData.xmid,
|
|
zynr: this.formData.zynr,
|
|
zwpjshxy: this.formData.zwpjshxy,
|
|
zycgjs: this.formData.zycgjs,
|
|
jfsyqk: this.formData.jfsyqk,
|
|
cgml: this.formData.cgml
|
|
}
|
|
fd.append("jtxx", JSON.stringify(jtxx))
|
|
for (let f of this.$refs.upload.fileShowArray) {
|
|
fd.append("files", f.file)
|
|
}
|
|
|
|
fd.append("delFile", JSON.stringify(this.delFile))
|
|
$.ajax({
|
|
url: base + '/platfotm/syr/info/jtsq/doHandle',
|
|
type: "post",
|
|
data: fd,
|
|
processData: false,
|
|
contentType: false
|
|
}).then(resp => {
|
|
if (resp.code === 0) {
|
|
this.$refs.guava.index()
|
|
this.notifySuccess(resp.msg)
|
|
this.$refs['syrTable'].doSearch()
|
|
this.formData = {
|
|
cgml: [],
|
|
xmzcy: [],
|
|
yjjctj: '',
|
|
yqcgtgjz: '',
|
|
xmssljff: '',
|
|
zynr: '',
|
|
zwpjshxy: '',
|
|
zycgjs: '',
|
|
jfsyqk: ''
|
|
}
|
|
this.$refs.upload.fileShowArray = []
|
|
}
|
|
})
|
|
},
|
|
doSave() {
|
|
const fd = new FormData()
|
|
const jbxx = {
|
|
id: this.formData.xmid,
|
|
userid: this.formData.userid,
|
|
birthday: this.formData.birthday,
|
|
zwzc: this.formData.zwzc,
|
|
mobile: this.formData.mobile,
|
|
xmzcy: JSON.stringify(this.formData.xmzcy),
|
|
yjjctj: this.formData.yjjctj,
|
|
xmssljff: this.formData.xmssljff,
|
|
yqcgtgjz: this.formData.yqcgtgjz
|
|
}
|
|
fd.append("jbxx", JSON.stringify(jbxx))
|
|
const jtxx = {
|
|
xmid: this.formData.xmid,
|
|
zynr: this.formData.zynr,
|
|
zwpjshxy: this.formData.zwpjshxy,
|
|
zycgjs: this.formData.zycgjs,
|
|
jfsyqk: this.formData.jfsyqk,
|
|
cgml: this.formData.cgml
|
|
}
|
|
fd.append("jtxx", JSON.stringify(jtxx))
|
|
for (let f of this.$refs.upload.fileShowArray) {
|
|
fd.append("files", f.file)
|
|
}
|
|
|
|
fd.append("delFile", JSON.stringify(this.delFile))
|
|
$.ajax({
|
|
url: base + '/platfotm/syr/info/jtsq/doSave',
|
|
type: "post",
|
|
data: fd,
|
|
processData: false,
|
|
contentType: false
|
|
}).then(resp => {
|
|
if (resp.code === 0) {
|
|
this.$refs.guava.index()
|
|
this.notifySuccess(resp.msg)
|
|
this.$refs['syrTable'].doSearch()
|
|
this.formData = {
|
|
cgml: [],
|
|
xmzcy: [],
|
|
yjjctj: '',
|
|
yqcgtgjz: '',
|
|
xmssljff: '',
|
|
zynr: '',
|
|
zwpjshxy: '',
|
|
zycgjs: '',
|
|
jfsyqk: ''
|
|
}
|
|
this.$refs.upload.fileShowArray = []
|
|
}
|
|
})
|
|
},
|
|
exportjtBgs(id) {
|
|
window.open(loc() + '/exportjtBgs?id=' + id)
|
|
}
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<!--#
|
|
}
|
|
#-->
|
|
|