提交 588faa4a 编写于 作者: guangjun.yang's avatar guangjun.yang

Merge branch 'dev-coop-phase2-0808' into release

...@@ -7945,6 +7945,11 @@ ...@@ -7945,6 +7945,11 @@
"is-plain-obj": "^1.0.0" "is-plain-obj": "^1.0.0"
} }
}, },
"sortablejs": {
"version": "1.10.0-rc3",
"resolved": "http://192.168.110.93:4873/sortablejs/-/sortablejs-1.10.0-rc3.tgz",
"integrity": "sha1-L+Y0Y6OLXNEuyRT8PgNYMEhJb0I="
},
"source-list-map": { "source-list-map": {
"version": "0.1.8", "version": "0.1.8",
"resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz",
......
...@@ -54,7 +54,7 @@ service.interceptors.request.use(config => { ...@@ -54,7 +54,7 @@ service.interceptors.request.use(config => {
} }
if( process.env.BUILD_ENV == "development" ){ // 本地开发环境 if( process.env.BUILD_ENV == "development" ){ // 本地开发环境
// console.log('环境变量>>>> ', process.env.BUILD_ENV); // console.log('环境变量>>>> ', process.env.BUILD_ENV);
config.headers['token'] = 'A97A609C1A98467C9372ACF55DD3BA35'; config.headers['token'] = 'D2E29BE9FF794703A482518A04D344E2';
}else{ }else{
config.headers['token'] = localStorage.getItem('storageToken') config.headers['token'] = localStorage.getItem('storageToken')
} }
......
...@@ -572,3 +572,10 @@ export function getAvgTime(data) { ...@@ -572,3 +572,10 @@ export function getAvgTime(data) {
} }
return list; return list;
} }
export function getComponent(data) {
let list = [];
for(let i=0;i<data.length;i++) {
list.push(data[i].value);
}
return list;
}
\ No newline at end of file
...@@ -36,9 +36,32 @@ ...@@ -36,9 +36,32 @@
style="width:83%;" style="width:83%;"
:disabled="peopleLevel == 'L3'" :disabled="peopleLevel == 'L3'"
></el-input> ></el-input>
<span class="word-num">{{(formData.projectName).replace(/\s+/g,"").length}}/20</span> <span class="word-num">{{(formData.projectName).replace(/\s+/g,"").length}}/24</span>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="发起机构名称:" prop="organizationName">
<el-col :span="13">
<el-input
size="small"
v-model="formData.organizationName"
placeholder="请输入发起机构名称"
style="width:83%;"
:disabled="peopleLevel == 'L3'"
@input="changeOrganizationName"
@blur = "blurName"
@focus = "focusName"
></el-input>
<span class="word-num">{{(formData.organizationName).replace(/\s+/g,"").length}}/12</span>
</el-col>
<el-popover
class="popover-content"
placement="bottom"
:content="organizationContent"
v-model="visibleName"
@click="checkDefault">
<p @click="checkDefault"> 我的机构: {{ organizationContent }} </p>
</el-popover>
</el-form-item>
<el-form-item label="项目时间:" required> <el-form-item label="项目时间:" required>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="projectBegintime"> <el-form-item prop="projectBegintime">
...@@ -82,7 +105,7 @@ ...@@ -82,7 +105,7 @@
style="width:83%;" style="width:83%;"
:disabled="peopleLevel == 'L3'" :disabled="peopleLevel == 'L3'"
></el-input> ></el-input>
<span class="word-num">{{(formData.projectIntro).replace(/\s+/g,"").length}}/150</span> <span class="word-num">{{(formData.projectIntro).replace(/\s+/g,"").length}}/200</span>
</el-col> </el-col>
</el-form-item> </el-form-item>
<div class="basic-item-icon"> <div class="basic-item-icon">
...@@ -180,6 +203,26 @@ ...@@ -180,6 +203,26 @@
<el-radio :label="1">使用小生态范围</el-radio> <el-radio :label="1">使用小生态范围</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="项目上线通知">
<el-radio-group
size="small"
v-model="formData.sendOption"
:disabled="showNoticeType()"
>
<el-radio :label="1">通知</el-radio>
<el-radio :label="2">不通知</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="formData.sendOption != 2" label="通知范围">
<el-radio-group
size="small"
v-model="formData.receiveOption"
:disabled="showNoticeType()"
>
<el-radio :label="1">次级负责人</el-radio>
<el-radio :label="2">所有人</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="添加下载文件:"> <el-form-item label="添加下载文件:">
<el-col :span="10"> <el-col :span="10">
<el-upload <el-upload
...@@ -544,12 +587,13 @@ ...@@ -544,12 +587,13 @@
<div class="third-step" v-else-if="active === 2"> <div class="third-step" v-else-if="active === 2">
<el-form <el-form
ref="formComponent" ref="formComponent"
class="form-component"
label-width="150px" label-width="150px"
:model="formComponent" :model="formComponent"
:rules="rulesComponent" :rules="rulesComponent"
> >
<el-form-item label="选择组件:" prop="component"> <el-form-item label="选择组件:" prop="component">
<el-col :span="20"> <el-col :span="10">
<el-select <el-select
v-model="formComponent.component" v-model="formComponent.component"
multiple multiple
...@@ -568,11 +612,12 @@ ...@@ -568,11 +612,12 @@
</el-select> </el-select>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="已选择:"> <el-form-item label="已选择:" class="check-component">
<el-col :span="20"> <el-col :span="20">
<el-tag <el-tag
class = "tags-component"
v-for="tag in tagsComponent" v-for="tag in tagsComponent"
:key="tag.name" :key="tag.value"
closable closable
:type="tag.type" :type="tag.type"
style="margin-left: 10px;" style="margin-left: 10px;"
...@@ -581,10 +626,12 @@ ...@@ -581,10 +626,12 @@
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="配置证书:"> <el-form-item label="配置证书:">
<el-radio-group v-model="formComponent.configure" :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"> <el-col :span="10">
<el-radio-group class="el-configure" v-model="formComponent.configure" :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6">
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio> <el-radio :label="2"></el-radio>
</el-radio-group> </el-radio-group>
</el-col>
</el-form-item> </el-form-item>
<!-- <el-form-item v-show="formComponent.configure == 1" label="选择证书:"> <!-- <el-form-item v-show="formComponent.configure == 1" label="选择证书:">
<el-col :span="20"> <el-col :span="20">
...@@ -691,28 +738,15 @@ import { mapGetters } from "vuex"; ...@@ -691,28 +738,15 @@ import { mapGetters } from "vuex";
import { openLoading, closeLoading } from "../../utils/utils"; import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils"; import * as commonUtil from "../../utils/utils";
import * as operationData from "../../utils/operation"; import * as operationData from "../../utils/operation";
import Sortable from 'sortablejs'
let vm = null; let vm = null;
export default { export default {
components: { components: {
BreadCrumb BreadCrumb
}, },
data() { data() {
// const itemOrganization = {
// name: "上海市第一人民医院",
// grade: "二甲医院",
// province: "上海市",
// city: "上海市",
// district: "浦东新区",
// street: "张江街道"
// };
// const itemPerson = {
// name: "云小鹊",
// hospital: "上海市第一人民医院",
// department: "全科",
// province: "上海市",
// city: "上海市",
// district: "长宁区"
// };
let checkProjectStr = (rule, value, callback) => { let checkProjectStr = (rule, value, callback) => {
if(value.indexOf("\\") != -1) {//存在 if(value.indexOf("\\") != -1) {//存在
callback(new Error('请勿输入字符“ \\ ”')); callback(new Error('请勿输入字符“ \\ ”'));
...@@ -725,8 +759,7 @@ export default { ...@@ -725,8 +759,7 @@ export default {
return { return {
idTypeValue: 1, idTypeValue: 1,
idTypeProject: '', idTypeProject: '',
// itemOrganization: itemOrganization,
// itemPerson: itemPerson,
projectId: null, projectId: null,
peopleLevel: null, peopleLevel: null,
//面包屑 //面包屑
...@@ -754,6 +787,9 @@ export default { ...@@ -754,6 +787,9 @@ export default {
attachmentMore1: {}, attachmentMore1: {},
attachmentMore2: {}, attachmentMore2: {},
scopeType: 0, scopeType: 0,
organizationName: '',
sendOption: 1,
receiveOption: 1,
}, },
pickerOptions0: { pickerOptions0: {
disabledDate: time => { disabledDate: time => {
...@@ -908,6 +944,8 @@ export default { ...@@ -908,6 +944,8 @@ export default {
value: 1, value: 1,
} }
], ],
visibleName: false,
organizationContent: '',
//校验工具 数据 //校验工具 数据
rulesComponent: { rulesComponent: {
component: [ component: [
...@@ -922,12 +960,16 @@ export default { ...@@ -922,12 +960,16 @@ export default {
{ required: true, message: "请输入项目名称", trigger: "blur" }, { required: true, message: "请输入项目名称", trigger: "blur" },
{ {
min: 2, min: 2,
max: 20, max: 24,
message: "输入长度为2-20的内容,可包含中英文、数字及特殊符号", message: "输入长度为2-24的内容,可包含中英文、数字及特殊符号",
trigger: "blur" trigger: "blur"
}, },
{ validator: checkProjectStr, trigger: 'blur' } { validator: checkProjectStr, trigger: 'blur' }
], ],
organizationName: [
{ required: true, message: "请填写发起机构名称", trigger: "blur" },
{ min: 1, max: 12, message: "超过12个最大字数限制,请精简字数或使用简称", trigger: "blur" }
],
duringTime: [ duringTime: [
{ {
required: true, required: true,
...@@ -962,7 +1004,7 @@ export default { ...@@ -962,7 +1004,7 @@ export default {
], ],
projectIntro: [ projectIntro: [
{ required: true, message: "请填写项目简介", trigger: "blur" }, { required: true, message: "请填写项目简介", trigger: "blur" },
{ min: 1, max: 150, message: "超出可输入的最大长度", trigger: "blur" } { min: 1, max: 200, message: "超出可输入的最大长度", trigger: "blur" }
], ],
attachmentUrl1: [ attachmentUrl1: [
{ required: true, message: "请选择列表图片", trigger: "blur" } { required: true, message: "请选择列表图片", trigger: "blur" }
...@@ -1057,7 +1099,12 @@ export default { ...@@ -1057,7 +1099,12 @@ export default {
attachmentSize: editData.attachmentData[1].attachmentSize attachmentSize: editData.attachmentData[1].attachmentSize
}, },
scopeType: editData.projectData.scopeType, scopeType: editData.projectData.scopeType,
organizationName: editData.projectData.organizationName,
notifyId: editData.notifyData.notifyId,
sendOption: editData.notifyData.sendOption,
receiveOption: editData.notifyData.receiveOption,
}; };
this.organizationContent = editData.projectData.creatorOrganizationName;
if (editData.attachmentData.length > 2) { if (editData.attachmentData.length > 2) {
for (let i = 2; i < editData.attachmentData.length; i++) { for (let i = 2; i < editData.attachmentData.length; i++) {
let pdfItem = { let pdfItem = {
...@@ -1136,6 +1183,7 @@ export default { ...@@ -1136,6 +1183,7 @@ export default {
projectEndtime: this.formData.projectEndtime, projectEndtime: this.formData.projectEndtime,
projectIntro: this.formData.projectIntro, projectIntro: this.formData.projectIntro,
scopeType: this.formData.scopeType, scopeType: this.formData.scopeType,
organizationName: this.formData.organizationName,
}; };
let attachmentModel = [ let attachmentModel = [
{ {
...@@ -1183,10 +1231,20 @@ export default { ...@@ -1183,10 +1231,20 @@ export default {
} }
//idTypeProject //idTypeProject
} }
//教培项目v2.1.0新增通知优化
let notifyData = {
notifyId: 0,
receiveOption: this.formData.receiveOption,
sendOption: this.formData.sendOption,
};
if(option == "edit" || option == "storageEdit") {
notifyData.notifyId = this.formData.notifyId;
}
let postData = { let postData = {
projectModel: JSON.stringify(projectModel), projectModel: JSON.stringify(projectModel),
attachmentModel: JSON.stringify(attachmentModel), attachmentModel: JSON.stringify(attachmentModel),
attachmentPDFModel: JSON.stringify(attachmentPDFModel) attachmentPDFModel: JSON.stringify(attachmentPDFModel),
notifyData: JSON.stringify(notifyData),
}; };
//console.log(postData); //console.log(postData);
openLoading(vm); openLoading(vm);
...@@ -1262,6 +1320,7 @@ export default { ...@@ -1262,6 +1320,7 @@ export default {
} }
this.optionsComponent = optionsComponent; this.optionsComponent = optionsComponent;
this.optionsCertificate = optionsCertificate; this.optionsCertificate = optionsCertificate;
this.organizationContent = res.data.creatorOrganizationName;
} }
this.editManager(); this.editManager();
}); });
...@@ -1269,7 +1328,8 @@ export default { ...@@ -1269,7 +1328,8 @@ export default {
//项目组件信息 暂存/完成 //项目组件信息 暂存/完成
componentDraft(type) { componentDraft(type) {
let param = { let param = {
componentIds: this.formComponent.component, // componentIds: this.formComponent.component,
componentIds: operationData.getComponent(vm.tagsComponent),
// certificateId: this.formComponent.certificate, // certificateId: this.formComponent.certificate,
certificateId: [], certificateId: [],
projectId: this.projectId, projectId: this.projectId,
...@@ -1278,6 +1338,7 @@ export default { ...@@ -1278,6 +1338,7 @@ export default {
certificateType: this.formExam.certificateType, certificateType: this.formExam.certificateType,
getCertificateRule: [], getCertificateRule: [],
}; };
// console.log('排序后',vm.tagsComponent,'param',param);
if(this.formComponent.configure == 1) { if(this.formComponent.configure == 1) {
// 2.多证书有规 // 2.多证书有规
if(this.formExam.certificateType == 2) { if(this.formExam.certificateType == 2) {
...@@ -1328,6 +1389,7 @@ export default { ...@@ -1328,6 +1389,7 @@ export default {
this.getDepartment(); this.getDepartment();
} else if (active == 2) { } else if (active == 2) {
this.stepData = [false, false, true]; this.stepData = [false, false, true];
this.tagDrop();
} }
}, },
//点击暂存 //点击暂存
...@@ -1430,7 +1492,13 @@ export default { ...@@ -1430,7 +1492,13 @@ export default {
//点击完成 //点击完成
complete() { complete() {
//type 1:暂存 2:完成 //type 1:暂存 2:完成
if (this.status4Flag == 1) { // if (this.status4Flag == 1) {
// vm.$message.info("完成");
// vm.$router.push({ path: "item-manager" });
// return;
// }
console.log('this.peopleLevel',this.peopleLevel);
if (this.peopleLevel == 'L3') {
vm.$message.info("完成"); vm.$message.info("完成");
vm.$router.push({ path: "item-manager" }); vm.$router.push({ path: "item-manager" });
return; return;
...@@ -1510,6 +1578,7 @@ export default { ...@@ -1510,6 +1578,7 @@ export default {
if (res.code == "000000") { if (res.code == "000000") {
this.active++; this.active++;
this.stepData = [false, false, true]; this.stepData = [false, false, true];
this.tagDrop();
} }
} }
); );
...@@ -1559,6 +1628,7 @@ export default { ...@@ -1559,6 +1628,7 @@ export default {
if(statusMove === 0) { if(statusMove === 0) {
this.active++; this.active++;
this.stepData = [false, false, true]; this.stepData = [false, false, true];
this.tagDrop();
} else { } else {
console.log('不能改变范围status:'+res.data.status) console.log('不能改变范围status:'+res.data.status)
} }
...@@ -1608,6 +1678,7 @@ export default { ...@@ -1608,6 +1678,7 @@ export default {
if(statusMove === 0) { if(statusMove === 0) {
this.active++; this.active++;
this.stepData = [false, false, true]; this.stepData = [false, false, true];
this.tagDrop();
} else { } else {
console.log('不能改变范围status:'+res.data.status) console.log('不能改变范围status:'+res.data.status)
} }
...@@ -2883,6 +2954,15 @@ export default { ...@@ -2883,6 +2954,15 @@ export default {
} }
return true; return true;
}, },
//判断通知展示问题
showNoticeType() {
if(this.projectStatus == '' || this.projectStatus == 1 || this.projectStatus == 2) {
if(this.peopleLevel != 'L3') {
return false;
}
}
return true;
},
//选择小生态 //选择小生态
selectChangeEcology(value) { selectChangeEcology(value) {
this.formEcology.pageNum = 1; this.formEcology.pageNum = 1;
...@@ -3074,6 +3154,7 @@ export default { ...@@ -3074,6 +3154,7 @@ export default {
} }
} }
//console.log('this.tagsComponent',this.tagsComponent); //console.log('this.tagsComponent',this.tagsComponent);
vm.tagDrop();
}, },
initTags(value) { initTags(value) {
//console.log('value',value,'optionsComponent',this.optionsComponent); //console.log('value',value,'optionsComponent',this.optionsComponent);
...@@ -3090,6 +3171,9 @@ export default { ...@@ -3090,6 +3171,9 @@ export default {
} }
} }
//console.log('this.tagsComponent',this.tagsComponent); //console.log('this.tagsComponent',this.tagsComponent);
// if(vm.tagsComponent.length > 0) {
// vm.tagDrop();
// }
}, },
//选择组件数据绑定 //选择组件数据绑定
handleCloseComponent(tag) { handleCloseComponent(tag) {
...@@ -3233,6 +3317,9 @@ export default { ...@@ -3233,6 +3317,9 @@ export default {
}, },
//校验考试通过平均分配置 //校验考试通过平均分配置
checkCertificate () { checkCertificate () {
if(vm.formComponent.configure == 2) {
return true;
}
//空判断 //空判断
if(vm.formExam.certificateType == 2) { if(vm.formExam.certificateType == 2) {
let checkIdList = []; let checkIdList = [];
...@@ -3276,7 +3363,51 @@ export default { ...@@ -3276,7 +3363,51 @@ export default {
} }
} }
return true; return true;
} },
blurName() {
vm.visibleName = false;
setTimeout(function(){
// console.log('失去焦点');
vm.submitForm('formData');
},200)
},
focusName() {
let textLength = vm.formData.organizationName.length;
if(textLength == 0) {
vm.visibleName = true;
} else {
vm.visibleName = false;
}
},
changeOrganizationName() {
let textLength = vm.formData.organizationName.length;
console.log('文字长度',textLength);
if(textLength == 0) {
vm.visibleName = true;
} else {
vm.visibleName = false;
}
},
checkDefault() {
// console.log('点击checkDefault')
vm.formData.organizationName = vm.organizationContent;
vm.visibleName = false;
},
tagDrop() {
this.$nextTick(function() {
if(vm.tagsComponent.length > 0) {
const ele = document.querySelector('.check-component .el-col-20');
// console.log('ele',ele);
// Sortable.create(ele,{});
Sortable.create(ele, {
onEnd({ newIndex, oldIndex }) {
const currRow = vm.tagsComponent.splice(oldIndex, 1)[0]
vm.tagsComponent.splice(newIndex, 0, currRow)
}
})
}
});
},
} }
}; };
</script> </script>
...@@ -3418,6 +3549,10 @@ export default { ...@@ -3418,6 +3549,10 @@ export default {
color: #409eff; color: #409eff;
border: 1px solid #409eff; border: 1px solid #409eff;
} }
.el-popover--plain {
padding: 18px 20px;
top: 40px;
}
} }
.second-step { .second-step {
margin: 10px 0 0 20px; margin: 10px 0 0 20px;
...@@ -3496,6 +3631,22 @@ export default { ...@@ -3496,6 +3631,22 @@ export default {
.achievement { .achievement {
margin-top: 60px; margin-top: 60px;
} }
.form-component {
position: relative;
}
.check-component {
top: 0px;
left: 550px;
position: absolute;
z-index: 999;
}
.el-tag {
margin-top: 5px;
display: table;
}
.el-configure {
width: 200px;
}
} }
} }
</style> </style>
\ No newline at end of file
...@@ -1094,7 +1094,9 @@ export default { ...@@ -1094,7 +1094,9 @@ export default {
vm.$nextTick(() => { vm.$nextTick(() => {
for(let i=0;i<vm.componentList.moduleModelList.length;i++) { for(let i=0;i<vm.componentList.moduleModelList.length;i++) {
if(!vm.componentList.moduleModelList[i].name) { if(!vm.componentList.moduleModelList[i].name) {
return if(flag == 2) {
return
}
} }
} }
console.log(vm.componentList.moduleModelList) console.log(vm.componentList.moduleModelList)
......
...@@ -109,12 +109,22 @@ ...@@ -109,12 +109,22 @@
></el-pagination> ></el-pagination>
</div> </div>
<el-dialog title :visible.sync="dialog.show" width="30%" center> <el-dialog title :visible.sync="dialog.show" width="30%" center>
<p v-if="numL3 > 1" class="dialog-p"> <!-- <p v-if="numL3 > 1" class="dialog-p">
确认将{{ dialog.role }} 确认将{{ dialog.role }}
<span class="user-name">"{{ dialog.name }}"</span> <span class="user-name">"{{ dialog.name }}"</span>
{{ dialog.option }}吗?" {{ dialog.option }}吗?"
</p> </p>
<p v-else >该用户为此机构仅有的次级负责人,确认需要降级吗?</p> <p v-else >该用户为此机构仅有的次级负责人,确认需要降级吗?</p> -->
<p v-if="numL3 <= 1 && scopeRow.projeceRole == 'L3'" class="dialog-p">
该用户为此机构仅有的次级负责人,确认需要降级吗?
</p>
<p v-else>
确认将{{ dialog.role }}
<span class="user-name">"{{ dialog.name }}"</span>
{{ dialog.option }}吗?"
</p>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="default" size="small" @click="dialog.show = false">取消</el-button> <el-button type="default" size="small" @click="dialog.show = false">取消</el-button>
<el-button type="primary" size="small" @click="changeRole()">确定</el-button> <el-button type="primary" size="small" @click="changeRole()">确定</el-button>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册