Commit 532386de authored by wangxl's avatar wangxl

444444

parent c3f3973b
......@@ -97,6 +97,9 @@ export default {
case 15:
this.getAuditResultSelect()
break;
case 16:
this.getSexSelect()
break;
}
},
getIsSelect () {
......@@ -106,6 +109,13 @@ export default {
this.selectArray = arr
this.loadValue()
},
getSexSelect () {
let arr = []
arr.push({ title: '男', key: '男' })
arr.push({ title: '女', key: '女' })
this.selectArray = arr
this.loadValue()
},
getAuditTypeSelect () {
let arr = []
arr.push({ title: '项目审核', key: '1' })
......
......@@ -77,7 +77,7 @@
</a-col>
<a-col :span="2">
<div class="special-middle">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteListItem(item,1)">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteArrey(item)">
<a-button type="link" size="small">删除</a-button>
</a-popconfirm>
</div>
......@@ -86,7 +86,7 @@
<a-row type="flex">
<a-col :span="24" style="text-align: center">
<div class="special-middle">
<a-button type="dashed" style="width: 20%" @click="addListItem(1)">
<a-button type="dashed" style="width: 20%" @click="addArrey()">
<a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span>
</a-button>
</div>
......@@ -127,7 +127,15 @@ export default {
},
methods: {
addArrey () {//添加成员
this.managementRuleList.push({ ...ManagementRule })
},
deleteArrey (item) {//移除成员
let index = this.managementRuleList.indexOf(item)
if (index !== -1) {
this.managementRuleList.splice(index, 1)
}
},
},
};
</script>
......
......@@ -14,42 +14,92 @@
<div>序号</div>
</div>
</a-col>
<a-col :span="2" class="bg-gray">
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">姓名</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">身份证号</div>
<div class="required">性别</div>
</div>
</a-col>
<a-col :span="2" class="bg-gray">
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">技术职务</div>
<div class="required">出生年月</div>
</div>
</a-col>
<a-col :span="4" class="bg-gray">
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">专业</div>
<div class="required">证件类型</div>
</div>
</a-col>
<a-col :span="2" class="bg-gray">
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">学位</div>
<div class="required">证件号码</div>
</div>
</a-col>
<a-col :span="4" class="bg-gray">
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">民族</div>
</div>
</a-col>
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">国别或地区</div>
</div>
</a-col>
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">工作单位</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">职称</div>
</div>
</a-col>
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">最高学位</div>
</div>
</a-col>
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">电子邮箱</div>
</div>
</a-col>
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">手机</div>
</div>
</a-col>
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">电话</div>
</div>
</a-col>
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">传真</div>
</div>
</a-col>
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">项目分工</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">每年工作(月)</div>
</div>
</a-col>
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div class="required">从事专业</div>
</div>
</a-col>
<a-col :span="6" class="bg-gray">
<div class="special-middle">
<div>操作</div>
</div>
......@@ -64,7 +114,7 @@
</div>
</div>
</a-col>
<a-col :span="2">
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.name'" :rules="{required: true,message: '*',trigger: 'blur',}">
......@@ -73,34 +123,79 @@
</div>
</div>
</a-col>
<a-col :span="3">
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.sex'" :rules="{required: true,message: '*',trigger: 'change',}">
<base-select v-model="member.sex" :type="16" :isAll="true" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.birthday'" :rules="{required: true,message: '*',trigger: 'change',}">
<a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="member.birthday" style="width: 150px" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.certificateType'" :rules="{required: true,message: '*',trigger: 'blur',}">
<para-select v-model="member.certificateType" :typeId="49" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.certId'" :rules="{required: true,message: '*',trigger: 'blur',}">
<a-input v-model="member.certId" :maxLength="20" placeholder="身份证号" style="width: 80%" />
<a-input v-model="member.certId" :maxLength="20" placeholder="证件号" style="width: 80%" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="2">
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.duty'" :rules="{required: true, message: '*',trigger: 'change',}">
<para-select v-model="member.duty" :typeId="55" />
<a-form-model-item :prop="'members.' + index + '.nation'" :rules="{required: true,message: '*',trigger: 'change',}">
<para-select v-model="member.nation" :typeId="11" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="4">
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.spec'" :rules="{required: true,message: '*',trigger: 'change',}">
<para-multi-select v-model="member.spec" :width="105" :typeId="42" />
<a-form-model-item :prop="'members.' + index + '.country'" :rules="{required: true,message: '*',trigger: 'blur',}">
<a-input v-model="member.country" :maxLength="50" placeholder="国别或地区" style="width: 80%" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="2">
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.workUnit'" :rules="{required: true,message: '*',trigger: 'blur',}">
<a-input v-model="member.workUnit" :maxLength="50" placeholder="工作单位" style="width: 80%" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.title'" :rules="{required: true,message: '*',trigger: 'change',}">
<para-multi-select v-model="member.title" :width="105" :typeId="42" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.degree'" :rules="{required: true,message: '*',trigger: 'change',}">
......@@ -109,25 +204,70 @@
</div>
</div>
</a-col>
<a-col :span="4">
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.workUnit'" :rules="{required: true,message: '*',trigger: 'blur',}">
<a-input v-model="member.workUnit" :maxLength="50" placeholder="工作单位" style="width: 80%" />
<a-form-model-item :prop="'members.' + index + '.email'" :rules="{required: true,message: '*',trigger: 'blur',}">
<a-input v-model="member.email" :maxLength="50" placeholder="电子邮箱" style="width: 80%" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.mobile'" :rules="{required: true,message: '*',trigger: 'blur',}">
<a-input v-model="member.mobile" :maxLength="20" placeholder="手机" style="width: 80%" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="3">
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.telephone'" :rules="{required: true,message: '*',trigger: 'blur',}">
<a-input v-model="member.telephone" :maxLength="20" placeholder="电话号码" style="width: 80%" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.fax'" :rules="{required: true,message: '*',trigger: 'blur',}">
<a-input v-model="member.fax" :maxLength="20" placeholder="传真" style="width: 80%" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.projWork'" :rules="{required: true,message: '*',trigger: 'blur',}">
<a-input v-model="member.projWork" :maxLength="50" placeholder="项目分工" style="width: 80%" />
<a-input v-model="member.projWork" :maxLength="20" placeholder="项目分工" style="width: 80%" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="3">
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.forMonths'" :rules="{required: true,message: '*',trigger: 'blur',}">
<a-input-number v-model="member.forMonths" :min="0" :step="0.1" style="width: 80%" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="1">
<div class="special-middle">
<div>
<a-form-model-item :prop="'members.' + index + '.spec'" :rules="{required: true,message: '*',trigger: 'change',}">
<para-multi-select v-model="member.spec" :width="105" :typeId="42" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="6">
<div class="special-middle">
<div>
<a-button icon="arrow-up" type="primary" shape="circle" size="small" :disabled="index == 0" @click="memberUp(index)"></a-button>
......@@ -158,21 +298,9 @@
import paraMultiSelect from '@/views/components/common/paraMultiSelect'
import paraSelect from '@/views/components/common/paraSelect'
import baseSelect from '@/views/components/common/baseSelect'
const Member = {
showIndex: 1,
name: null,
certId: null,
sex: null,
birthday: null,
age: null,
title: null,
// duty: null,
spec: null,
degree: null,
workUnit: null,
projWork: null,
}
const Member = {name: null,sex: null,birthday: null,certificateType: null,certId: null,nation: null,country: null,workUnit: null,title: null,degree: null,email: null,mobile: null,telephone: null,fax: null,projWork: null,forMonths: null,spec: null}
export default {
name: 'ProjGroupMember',
......@@ -190,8 +318,7 @@ export default {
},
},
components: {
paraMultiSelect,
paraSelect
paraMultiSelect,paraSelect,baseSelect
},
created () {
......@@ -252,23 +379,23 @@ textarea {
margin-left: 6px !important;
}
::v-deep .ant-select .ant-select-selection__rendered .ant-form-item-control {
line-height: 26px !important;
line-height: 26px !important;
}
::v-deep .ant-col .ant-form-item .ant-col {
padding: 0px;
}
::v-deep .from-table .item_inner .ant-col {
text-align: left !important;
text-align: left !important;
}
::v-deep .special-pum-select .ant-form-item-control-wrapper{
::v-deep .special-pum-select .ant-form-item-control-wrapper {
display: flex;
justify-content: center;
align-content: center;
}
::v-deep .special-pum-select .ant-form-item-children{
::v-deep .special-pum-select .ant-form-item-children {
display: block;
}
::v-deep .special-pum-select .ant-form-item-control {
line-height: 26px;
line-height: 26px;
}
</style>
......@@ -596,7 +596,7 @@
</a-row>
<!-- 经费预算 -->
<budget-edit :budget.sync="formData.budget" />
<!-- <budget-edit :budget.sync="formData.budget" /> -->
<!-- 项目课题设置 -->
<project-sub-edit :projectSubList.sync="formData.projectSubList" />
......@@ -627,7 +627,7 @@ import moment from 'moment'
const ManagementRule = { policyName: null, releaseDate: null, documentNumber: null, validityPeriod: null, mainContent: null, fileId: null, downloadId: null, fileName: null, downloadUrl: null }
const ProjectSub = { projName: null, undertakingUnit: null, address: null, director: null, totalBudget: null, govBudget: null, selfBudget: null, cooperativeUnits: null, fileId: null, downloadId: null, fileName: null, downloadUrl: null }
const Cooperative = { id: null, unitName: null, unitCountry: null, unitAddress: null, organizationCode: null, projectWork: null }
const Members = { showIndex: 1, name: null, certId: null, sex: null, birthday: null, age: null, degree: null, title: null, duty: null, spec: null, workUnit: null, projWork: null }
const Members = { name: null, sex: null, birthday: null, certificateType: null, certId: null, nation: null, country: null, workUnit: null, title: null, degree: null, email: null, mobile: null, telephone: null, fax: null, projWork: null, forMonths: null, spec: null }
const Equipments = { name: null, specificationType: null, quantity: null, totalBudget: null, useFrom: null }
const File = { fileName: '', downloadUrl: '', fileExplain: '', downloadId: '' }
......@@ -653,10 +653,10 @@ export default {
formData: {
id: null,
organizationCode: null,
address:null,
address: null,
registeredAddress: null,
postCode: null,
legalPerson:null,
legalPerson: null,
workforce: null,
specializedPersonnel: null,
researchPersonnel: null,
......@@ -672,8 +672,8 @@ export default {
leadUnit: null,
recommendUnit: null,
startDate: null,
endDate:null,
technologyInnovationBase:null,
endDate: null,
technologyInnovationBase: null,
knowledgeId: null,
totalFunding: null,
govFunding: null,
......@@ -739,10 +739,6 @@ export default {
achievementTarget: [{ required: true, message: '请填写项目实施中形成的示范基地、中试线、生产线及其规模等', trigger: 'blur' },],
otherTarget: { required: true, message: '请填写其他应考核的指标', trigger: 'blur' },
},
// 富文本字数
tinymceLimit: 15000,
tinymceWordCount: 0,
flag: false,
}
},
computed: {
......@@ -795,15 +791,6 @@ export default {
this.formData.fileList = []
}
},
addEquipments () {
this.formData.equipments.push({ ...Equipments })
},
removeEquipments (item) {
let index = this.formData.equipments.indexOf(item)
if (index !== -1) {
this.formData.equipments.splice(index, 1)
}
},
save () {
if (this.checkProjName()) {
this.$emit('load', true)
......@@ -828,14 +815,10 @@ export default {
}
this.$refs.form.validate(valid => {
if (valid) {
if (!this.checkApplyMoney()) {
return false
}
this.$emit('load', true)
let state = this.formData.projState
if (state != 30)
this.formData.projState = 10
// this.formData.projDoc = this.projDoc
let pars = isEmptyParams(this.formData)
let par = { ...pars }
this.$api.project.save(par).then(({ data = {} }) => {
......@@ -854,172 +837,6 @@ export default {
}
})
},
tinymceSet () {
tinymce.remove('#tinymce_dom')
tinymce.init({
selector: '#tinymce_dom',
language: 'zh_CN',
content_style: "img {max-width:100%;}",
// menubar: false,
// 隐藏底部状态栏
statusbar: false,
height: 800,
plugins: 'code advlist autolink link image lists preview table wordcount',
toolbar: `undo redo | styleselect | fontsizeselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | link image
| table tabledelete | tableprops tablerowprops tablecellprops | tableinsertrowbefore tableinsertrowafter tabledeleterow
| tableinsertcolbefore tableinsertcolafter tabledeletecol | wordcount`,
// 初始化完成回调
init_instance_callback: (editor) => {
let wordcount = editor.plugins.wordcount
this.tinymceWordCount = wordcount.body.getWordCount()
},
// 图片上传路径
// images_upload_url: 'http://192.168.1.185:8888/profile',
// 图片上传操作
images_upload_handler: (blobInfo, succFun, failFun) => {
this.$api.base.asyncUpload(this.uploadHandle(blobInfo.blob(), blobInfo.filename())).then(({ data = {} }) => {
if (data) {
succFun(data.downloadUrl)
}
}).catch((err) => {
failFun(err)
})
}
})
// 设置富文本内容
// tinymce.activeEditor.setContent(htmlText)
// 监听输入计算字数
let mark = 1
tinymce.activeEditor.on('keyup', (e) => {
if (mark === 1) {
let wordcount = tinymce.activeEditor.plugins.wordcount
this.tinymceWordCount = wordcount.body.getWordCount()
mark = 0
setTimeout(() => {
mark = 1
}, 500)
}
})
},
// 添加附件
addfileList () {
this.formData.fileList.push(Object.assign({ ...File }, { fileExplain: '' }))
},
// 删除附件
removefileList (item) {
let index = this.formData.fileList.indexOf(item)
if (index !== -1) {
this.formData.fileList.splice(index, 1)
}
},
downfileList (item) {
},
fileSelect (item, index) {
let fileElem = this.$refs['fileElem' + index][0]
if (fileElem) {
fileElem.click()
}
},
fileCheck (file) {
//判断是否小于1M
let isLtSize = file.size < 1024 * 1024 * 15;
if (!isLtSize) {
this.$message.error('文件大小不能超过15M!');
return false
}
// var fileNames = file.name.split('.')
// var fileType = fileNames[fileNames.length - 1].toLocaleLowerCase()
// var extList = ['doc', 'docx', 'pdf']
// if (!extList.find((item) => item == fileType)) {
// this.$message.error('文件格式错误!')
// return false
// }
return true
},
handleFiles (item, index) {
let fileElem = this.$refs['fileElem' + index][0]
let files = fileElem.files
if (files.length <= 0) {
this.$message.error('未选中文件,请尝试重新选择')
return
}
if (!this.fileCheck(files[0]))
return
this.$api.base.asyncUpload(this.uploadHandle(files[0], files[0].name)).then(({ data = {} }) => {
if (data) {
item.fileName = files[0].name
item.downloadUrl = '/' + files[0].name
item.downloadId = data.id
} else
this.$message.error('上传失败')
}).catch(() => {
this.$message.error('上传失败')
})
},
inCount () {
let govFunding = 0
let unitFunding = 0
let selfFunding = 0
let otherFunding = 0
if (this.formData.govFunding)
govFunding = this.formData.govFunding
if (this.formData.unitFunding)
unitFunding = this.formData.unitFunding
if (this.formData.selfFunding)
selfFunding = this.formData.selfFunding
if (this.formData.otherFunding)
otherFunding = this.formData.otherFunding
this.formData.totalFunding = (govFunding + unitFunding + selfFunding + otherFunding).toFixed(2)
return this.formData.totalFunding
},
outNumberChange () {
let vartotalBudget = 0
this.formData.budget.forEach(e => {
if (e.totalBudget != null)
vartotalBudget += parseFloat(e.totalBudget)
})
this.formData.totalFunding = vartotalBudget.toFixed(2)
},
deletefile (item, index) {
this.$api.base.deletefile({ id: item.downloadId }).then(({ data = {} }) => {
if (data) {
item.fileName = ''
item.downloadUrl = ''
item.downloadId = ''
if (item.fileExplain != '学术委员会审查意见' && item.fileExplain != '项目组的人员签字') {
item.fileExplain = ''
}
}
}).catch(() => {
this.$message.error('删除失败')
})
},
uploadHandle (file, fileName) {
let formData = new FormData()
formData.append('file', file)
formData.append('fileName', fileName)
return formData
},
// 起止日期选择处理
dateChange (value) {
let statr = this.formData.startDate
let end = this.formData.endDate
if (!statr || !end) {
return
}
if (statr > end) {
this.formData.startDate = end
this.formData.endDate = statr
}
},
checkApplyMoney () {
var m = parseFloat(this.formData.applyMoney)
if (m != this.formData.govFunding) {
alert('项目经费与申请金额不一致!')
return false
}
return true
},
checkProjName () {
if (this.formData.projName == "" || this.formData.projName == null) {
alert('项目名称不能为空')
......@@ -1034,8 +851,6 @@ export default {
}
</script>
<style scoped lang="less">
.d-icon {
margin-right: 10px;
}
</style>
......@@ -107,7 +107,7 @@
</a-col>
<a-col :span="2">
<div class="special-middle">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteListItem(item,1)">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteArrey(item)">
<a-button type="link" size="small">删除</a-button>
</a-popconfirm>
</div>
......@@ -116,7 +116,7 @@
<a-row type="flex">
<a-col :span="24" style="text-align: center">
<div class="special-middle">
<a-button type="dashed" style="width: 20%" @click="addListItem(1)">
<a-button type="dashed" style="width: 20%" @click="addArrey()">
<a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span>
</a-button>
</div>
......@@ -157,7 +157,15 @@ export default {
},
methods: {
addArrey () {//添加成员
this.projectSubList.push({ ...ProjectSub })
},
deleteArrey (item) {//移除成员
let index = this.projectSubList.indexOf(item)
if (index !== -1) {
this.projectSubList.splice(index, 1)
}
},
},
};
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment