提交 0da483be 编写于 作者: bo.dang's avatar bo.dang

Merge branch 'dev-merged-20201015' into 'release'

Dev merged 20201015, code review: bo.dang



See merge request !224
......@@ -91,13 +91,39 @@
<el-form-item label="圈子类型" prop="type">
<el-radio-group v-model="formData.type" size="small" @change="changeType">
<!--<el-radio-group v-model="formData.type" size="small" @change="changeType">-->
<el-radio-group v-model="formData.type" size="small">
<el-radio :label="0" class="label-type">封闭 - 只对圈子成员可见,成员只能由管理员添加、删除</el-radio>
<el-radio :label="1" class="label-type">半开放 - 对任何人可见,用户请求加入后需管理员同意,成员可自行退出</el-radio>
<el-radio :label="2" class="label-type">开放 - 对任何人可见,用户请求加入后无需管理员同意,成员可自行退出</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="允许分享圈子" prop="allowShare" v-if="formData.type == 1 || formData.type == 2 " class="required-label">
<el-radio-group v-model="formData.allowShare" size="small">
<el-radio :label="0" class="label-type">不允许</el-radio>
<el-radio :label="1" class="label-type">允许</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="对接部门" prop="deptId" v-if="deptFlag" class="required-label">
<el-select
v-model="formData.deptId"
@change="returnTypeData('deptId')"
placeholder="请选择该小圈的对接部门"
size="small">
<el-option
v-for="(item,index) in deptList"
:key="index"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<div style="margin-top: 60px;margin-left: 250px;">
<el-button type="primary" @click="save()" center>保存</el-button>
<el-button @click="cancle()">取 消</el-button>
......@@ -126,6 +152,7 @@
let vm = null;
import { openLoading, closeLoading } from "../../utils/utils";
import { doUpload, getFilePath } from "../../utils/qiniu-util";
import { getCircleDept } from "../../utils/yqrange/yqrangeApi";
import Cropper from '@/components/common/cropper.vue'
export default {
name: "baseinfo",
......@@ -142,6 +169,17 @@
},
created() {
vm = this;
this.isDept();
// const mobilePhone = localStorage.getItem("mobilePhone");
//
// if(mobilePhone == "13341740525" || mobilePhone == "18251938586"){
// this.deptFlag = true;
// }
// else {
// this.deptFlag = false;
// }
},
data() {
let checkProjectStr = (rule, value, callback) => {
......@@ -202,6 +240,9 @@
],
type: [
{ required: true, message: "请选择圈子类型", trigger: "blur" },
],
deptId: [
{ required: true, message: "请选择对接部门", trigger: "blur" }
]
},
imgMouseOver1: false,
......@@ -215,6 +256,20 @@
label: '管理员可发布'
},
],
deptList: [
{
value: 1,
label: '铁军部'
}, {
value: 2,
label: '医疗事业部'
},{
value: 3,
label: '商业化部'
},
],
deptFlag: false,
shareFlag: false
}
},
......@@ -233,14 +288,21 @@
if (!this.formData.headUrl){
this.uploadImgMessage1 = true;
}
this.$refs[formName].validate(valid => {
if (valid&&this.formData.headUrl!="") {
if (valid && vm.formData.headUrl!="") {
flag = true;
} else {
console.log("error submit!!");
flag = false;
}
});
if(flag){
if(this.formData.deptId == ""){
this.formData.deptId = 0;
}
}
this.$emit('returnIsNext', flag);
},
//上传圈子头像
......@@ -354,6 +416,30 @@
},
changeType(){
if(vm.formData.type == 1 || vm.formData.type == 2){
vm.shareFlag = true;
}
else {
vm.shareFlag = false;
}
},
isDept(){
let params = {
type: 2
};
openLoading(vm);
getCircleDept(params).then(res => {
closeLoading(vm);
if (res.code == "000000") {
vm.deptFlag = res.data;
// vm.deptFlag = true;
// this.$message.success('操作成功');
}
}).catch(err => {
this.$message.error('请求失败');
});
}
}
}
......
<template>
<div class="organization-alert">
<div class="organization-left">
<div>已选:{{allSelect.length}}个机构</div>
<div v-if="checked">已选:{{totalOrganizationAll}}个机构</div>
<div v-else>已选:{{allSelect.length}}个机构</div>
<div class="hcd">
<div class="tag-list">
<el-tag
......@@ -26,26 +27,27 @@
<el-form-item label>
<el-cascader size="small" ref="cascaderRegion" :options="optionsRegion" :props="props"
v-model="formOrganization.administrativeIdList" @change="handleChangeRegion" filterable change-on-select
placeholder="请选择地区"></el-cascader>
placeholder="请选择地区" :disabled='checked'></el-cascader>
</el-form-item>
<el-form-item>
<el-select size="small" v-model="formOrganization.level" placeholder="全部医院级别">
<el-select size="small" v-model="formOrganization.level" placeholder="全部医院级别" :disabled='checked'>
<el-option v-for="(item, index) in organizationRank" :key="index" :label="item.label" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label>
<el-input style="width:140px;" size="small" v-model="formOrganization.name" placeholder="请输入机构名称"></el-input>
<el-input style="width:140px;" size="small" v-model="formOrganization.name" placeholder="请输入机构名称" :disabled='checked'></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="searchOrganization()">搜索</el-button>
<el-button size="small" type="primary" @click="searchOrganization()" :disabled="checked">搜索</el-button>
</el-form-item>
<el-form-item>
<el-button size="small" @click="resetOrgOrPerson()">取消搜索</el-button>
<el-button size="small" @click="resetOrgOrPerson()" :disabled="checked"huang>取消搜索</el-button>
</el-form-item>
</el-form>
<el-checkbox v-if="showSelectAll" v-model="checked" @change="handleCheckAllChange" >全部({{ totalOrganization }})</el-checkbox>
<el-table class="rim" ref="multipleOrganization" :data="tableOrganization" tooltip-effect="dark" @select-all="selectAllOrganization" @select="selectOrganization" >
<el-table-column type="selection" :selectable="selectableTableList" ></el-table-column>
<el-table-column type="selection" :selectable="selectableTableList"></el-table-column>
<el-table-column prop="orgName" label="医院名称" align="center"></el-table-column>
<el-table-column prop="orgLevelName" label="医院级别" align="center"></el-table-column>
<el-table-column prop="provinceName" label="所属省份" align="center"></el-table-column>
......@@ -73,7 +75,7 @@ import { openLoading, closeLoading } from "@/utils/utils";
import { doUpload, getFilePath } from "@/utils/qiniu-util";
import * as operationData from "@/utils/operation";
import { getCircleProvincesReq } from '@/utils/yqrange/rangeApi';
import { moOption, moOrgSearch, moSave, clearCacheOrg} from '@/utils/yqrange/memberApi';
import { moOption, moOptionAll, moOrgSearch, moSave, moSaveAll, clearCacheOrg} from '@/utils/yqrange/memberApi';
let vm = null;
export default {
props: {
......@@ -125,6 +127,7 @@ export default {
tableOrganization: new Array(),
currentOrganization: 1,
totalOrganization: 10,
totalOrganizationAll:0,//全选可以添加机构的总数量
pageSizeOrganization: 2,
selectionList:[],
formOrganization: {
......@@ -136,6 +139,8 @@ export default {
pageNum: 1,
pageSize: 10
},
showSelectAll:false,//只有运营人员显示全部按钮
checked: false,
allSelect: []
}
},
......@@ -148,8 +153,64 @@ export default {
this.initRange();
//Idtype:1,内部 2.外部
vm.idType = localStorage.getItem("storageIdType");
if (vm.idType == 1) {
//只有内部人员显示全选按钮
vm.showSelectAll = true;
}
},
methods: {
// 选中全部
handleCheckAllChange(){
console.log(this.checked)
this.requestSelectAll();
if (!this.checked){
this.allSelect = [];
this.checked = false;
return
}
},
// 设置全选列表
setSeletAllList(){
let item = {
id:"0",
orgName:"全部",
};
this.allSelect = [];
if (this.totalOrganizationAll > 0) {
this.allSelect.push(item)
}
console.log(this.allSelect)
},
requestSelectAll(){
let administrativeIdItem = operationData.setAdministrativeId(
this.formOrganization.administrativeIdList
);
if (administrativeIdItem == "000_0"){
administrativeIdItem=""
}
let req = {
circleId: this.circleId,
districtIds: administrativeIdItem,
orgLevel: this.formOrganization.level,
orgName: this.formOrganization.name,
type: this.checked === false ? 0 : 1
};
openLoading(vm);
moOptionAll(req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
this.totalOrganizationAll = res.data;
this.setSeletAllList()
} else {
this.$message(res.message);
}
}).catch(err => {
this.$message.error('请求失败');
});
},
clear() {
clearCacheOrg(this.circleId)
.then(()=>{
......@@ -264,6 +325,12 @@ export default {
},
// 获取机构列表的机构状态(是否被选中)
initOrganizationStatus() {
// 判断是否显示全选按钮
if (this.idType == 1 && this.totalOrganization > 0) {
this.showSelectAll = true
}else {
this.showSelectAll = false
}
let tableStatus = this.tableOrganization;
tableStatus.forEach(row => {
if (row.status == 1 || row.status == 2) {
......@@ -276,6 +343,9 @@ export default {
},
//机构搜索
getOrganizationChoose() {
// if (this.checked) {
// return;
// }
let administrativeIdItem = operationData.setAdministrativeId(
this.formOrganization.administrativeIdList
);
......@@ -352,7 +422,7 @@ export default {
},
// 更改当前页数
handleCurrentOrganization(val) {
//console.log(`当前页: ${val}`);
console.log(`当前页: ${val}`);
this.formOrganization.pageNum = val;
if (this.searchOrganizationType == "choose") {
this.getOrganizationChoose();
......@@ -362,6 +432,10 @@ export default {
},
//机构table中勾选一页
selectAllOrganization(selection) {
if(this.checked){
this.$refs.multipleOrganization.clearSelection()//这个是清除所有选择项,当选择全部时,清除所有选择项
return
}
this.selectionList = selection;
let setList = [];
let selectList = [];
......@@ -379,7 +453,7 @@ export default {
typeStatus = 1;
}
// let = this.$refs.multipleTable.selection
console.log(selection, setList, selectList);
console.log(selection,"00",setList,"33",selectList,"11",intersect,22,typeStatus);
if (setList.length > 0) {
let req = {
ids: setList,
......@@ -426,10 +500,15 @@ export default {
});
},
selectableTableList(row, index) {
if (this.checked) {
return false;
}
// if (this.status4Flag == 1) {
if (row.status == 2) {
return false;
}
return true;
// }
// return true;
......@@ -474,6 +553,12 @@ export default {
},
//删除已选中的tag
handleClose(item) {
if (this.checked){
this.allSelect = [];
this.checked = false;
this.requestSelectAll();
return;
}
this.selectOrganization([],item)
this.$refs.multipleOrganization.toggleRowSelection(item);
},
......@@ -483,7 +568,16 @@ export default {
this.$message.error('已选列表为空');
return
}
let params = {
// 内部人员或者全部选中 且是全选
if (this.idType == 1&&this.checked) {
this.requestaddFnAll();
}else {
this.requestaddFn();
}
},
requestaddFn(){
let params = {
circleId: this.circleId
}
moSave(params)
......@@ -494,6 +588,32 @@ export default {
this.$message.error('保存失败,请重试');
})
},
requestaddFnAll(){
let administrativeIdItem = operationData.setAdministrativeId(
this.formOrganization.administrativeIdList
);
if (administrativeIdItem == "000_0"){
administrativeIdItem=""
}
let req = {
circleId: this.circleId,
districtIds: administrativeIdItem,
orgLevel: this.formOrganization.level,
orgName: this.formOrganization.name,
type: this.checked === false ? 0 : 1
};
moSaveAll(req)
.then(res => {
if (res.code == "000000") {
this.$emit('addOrg');
}else {
this.$message(res.message);
}
})
.catch(() => {
this.$message.error('保存失败,请重试');
})
},
// 取消
canclefn() {
this.$emit('handleClose')
......
......@@ -6,14 +6,14 @@
<i class="text" @click="dialogOrgFn()">添加机构</i>
</el-col>
<el-col class="add-organization" v-if="showImportFlag">
<el-upload
class="bg-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeUploadOrg">
<!--<el-upload-->
<!--class="bg-uploader"-->
<!--action="#"-->
<!--:show-file-list="false"-->
<!--:before-upload="beforeUploadOrg">-->
<i class="el-icon-document-add"></i>
<i class="text">批量导入</i>
</el-upload>
<i class="text" @click="batchImport()">批量导入</i>
<!--</el-upload>-->
</el-col>
<el-col class="organization-search">
<el-form :inline="true" :model="formOrganization" class="demo-form-inline" >
......@@ -93,23 +93,90 @@
>
<p style="text-align: center;">{{detelMessage}}</p>
<span slot="footer" class="dialog-footer">
<el-button @click="confirmDelete">删 除</el-button>
<el-button type="primary" @click="hideDeleteFrom">取 消</el-button>
<el-button type="primary" @click="confirmDelete">删 除</el-button>
<el-button @click="hideDeleteFrom">取 消</el-button>
</span>
</el-dialog>
<el-dialog
title="导入错误提示"
:title="dialogTitle"
:visible.sync="dialogVisible"
width="500px"
:close-on-click-modal="false"
@close="handleErrorClose"
center
>
<el-table :data="dialogErrorData" align="center">
<el-table-column property="rowNumber" label="行数" align="center"></el-table-column>
<el-table-column property="wrongData" label="错误提示" align="center"></el-table-column>
</el-table>
center>
<!--<el-table :data="dialogErrorData" align="center">-->
<!--<el-table-column property="rowNumber" label="行数" align="center"></el-table-column>-->
<!--<el-table-column property="wrongData" label="错误提示" align="center"></el-table-column>-->
<!--</el-table>-->
<div v-if="importSuccessFlag" style="text-align: center;">
<div>本次成功导入<span style="color: green;">&nbsp;{{importNum}}条&nbsp;</span>数据</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleErrorClose" style="margin-top: 20px;">关闭</el-button>
</span>
</div>
<div v-if="!importSuccessFlag" style="text-align: center;">
<div v-if="importNum == 0">数据不符合格式要求,请修正后再次导入</div>
<div v-if="importNum != 0"><span style="color: red;">&nbsp;{{importNum}}条&nbsp;</span>数据不符合格式要求,请修正后再次导入</div>
<br>
<div>
<span>
<el-button @click="downloadFile" type="text" size="small" style="color: #449284 !important;">下载错误数据></el-button>
<!--<a @click="downloadFile">下载错误数据</a>-->
</span>
</div>
<div style="margin-top: 20px;">
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleErrorClose" style="float: left;margin-left: 130px;">取 消</el-button>
<el-upload
class="bg-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeUploadOrg">
<el-button type="primary" size="small" style="margin-left: -100px;">重新导入</el-button>
</el-upload>
</span>
</div>
</div>
</el-dialog>
<el-dialog
title="批量导入"
:visible.sync="dialogImportVisible"
width="650px"
:close-on-click-modal="false"
@close="handleImportClose"
center>
<div style="float:left;width: 250px;">
<span>1.下载模板,填写信息</span>
<br>
<div>
<el-button type="primary" size="small" style="float:left; margin-top: 30px;" @click="download1">下载模板1</el-button>
<span style="float:left; margin-top: 72px;margin-left: -90px;">填写机构明细导入</span>
</div>
<div>
<el-button type="primary" size="small" style="margin-top: 30px;margin-left: 48px;" @click="download2">下载模板2</el-button>
<span style="float: right;margin-top:10px;">填写机构ID导入</span>
</div>
</div>
<div style="float:left;margin-left: 90px;width: 1px;height: 100px; background: #c8cbd2;"></div>
<div style="margin-left: 400px;height: 130px;">
<span>2.上传填写好的文件</span>
<br>
<el-upload
class="bg-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeUploadOrg">
<el-button type="primary" size="small" style="margin-top: 30px;">上传文件</el-button>
</el-upload>
</div>
</el-dialog>
</div>
......@@ -192,6 +259,12 @@ export default {
dialogVisible: false,
dialogErrorData: [],
showImportFlag: false,
dialogImportVisible: false,
importMsg: "",
importSuccessFlag: false,
importNum: 0,
dialogTitle: "",
errorFileUrl: ""
}
},
components: {
......@@ -206,7 +279,48 @@ export default {
this.showImportFlag = true;
}
else {
this.showImportFlag = false;
// window.addEventListener("setItemEvent", function (e) {
//
// let highMainManager = 0;
// if(e.key == "highMainManager"){
// highMainManager = e.newValue;
// }
//
// let mainManager = 0;
// if(e.key == "mainManager"){
// mainManager = e.newValue;
// }
//
// let manager = 0;
// if(e.key == "manager"){
// manager = e.newValue;
// }
//
// if(highMainManager == 1 || mainManager == 1 || manager == 1){
// vm.showImportFlag = true;
// }
// else {
// vm.showImportFlag = false;
// }
//
//
// console.log('key: '+e.key);
// console.log('newValue: '+e.newValue);
// console.log('oldValue: '+e.oldValue);
// });
setTimeout(() => {
let highMainManager = localStorage.getItem('highMainManager');
let mainManager = localStorage.getItem('mainManager');
let manager = localStorage.getItem('manager');
if(highMainManager == 1 || mainManager == 1 || manager == 1){
this.showImportFlag = true;
}
else {
this.showImportFlag = false;
}
},3500)
}
},
mounted() {
......@@ -401,7 +515,7 @@ export default {
}
},
detel(item) {
this.detelMessage = `删除后 "${item.orgName}" 将无法访问本圈,确定删除吗?`
this.detelMessage = `删除后 "${item.orgName}" 将无法访问本圈,确定删除吗?`
this.deleteVisible = true
this.clickItem = item
},
......@@ -448,6 +562,11 @@ export default {
// 批量导入
beforeUploadOrg(file) {
// // 机构数已超10000,无法导入机构
// if(vm.totalOrganization > 10000){
// this.$message.warning('机构数已超10000,无法导入机构');
// return;
// }
let name = file.name;
let type = name.substring(name.lastIndexOf('.') + 1);
......@@ -470,23 +589,33 @@ export default {
closeLoading(vm);
if (res.code == "000000") {
vm.dialogImportVisible = false;
if(res.data.successNum == 0 && res.data.wrongDataList.length > 0){
this.dialogVisible = true;
// 导入成功
if(res.data.status){
this.dialogErrorData = res.data.wrongDataList;
}
else {
this.$message({
type: 'success',
message: '导入成功!'
});
vm.dialogVisible = true;
vm.dialogTitle = "导入成功";
vm.importSuccessFlag = true;
vm.importNum = res.data.successNum;
vm.initRange();
vm.searchOrganization();
vm.$emit('refreshRenYuan');
}
else {
vm.dialogVisible = true;
vm.dialogTitle = "导入失败";
vm.importSuccessFlag = false;
vm.importNum = res.data.failNum;
vm.errorFileUrl = res.data.file;
// this.$message({
// type: 'success',
// message: '导入成功!'
// });
}
}
else {
this.$message({
......@@ -503,15 +632,38 @@ export default {
handleErrorClose() {
this.dialogVisible = false;
},
// 批量导入
batchImport(){
this.dialogImportVisible = true;
},
handleImportClose(){
this.dialogImportVisible = false;
},
// 下载模板1
download1(){
const url = "https://files.yunqueyi.com/template/import_hospital_by_detail_1.xlsx";
window.location.href = url;
},
// 下载模板2
download2(){
const url = "https://files.yunqueyi.com/template/import_hospital_by_id.xlsx";
window.location.href = url;
},
// 下载错误数据文件
downloadFile(){
window.location.href = vm.errorFileUrl;
}
}
}
</script>
<style >
.organization .el-dialog {
max-height: 90%;
overflow: scroll;
}
/*.organization .el-dialog {*/
/*max-height: 90%;*/
/*overflow: scroll;*/
/*}*/
</style>
<style lang="scss" scoped>
.organization {
......
......@@ -6,14 +6,14 @@
<i class="text" @click="dialogMemberFn()">添加人员</i>
</el-col>
<el-col class="add-organization" v-if="showImportFlag">
<el-upload
class="bg-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeUploadDoc">
<!--<el-upload-->
<!--class="bg-uploader"-->
<!--action="#"-->
<!--:show-file-list="false"-->
<!--:before-upload="beforeUploadDoc">-->
<i class="el-icon-document-add"></i>
<i class="text">批量导入</i>
</el-upload>
<i class="text" @click="batchImport()">批量导入</i>
<!--</el-upload>-->
</el-col>
<el-col class="organization-search">
<el-form :inline="true" :model="formOrganization" class="demo-form-inline" >
......@@ -99,21 +99,98 @@
</span>
</el-dialog>
<!--<el-dialog-->
<!--title="导入错误提示"-->
<!--:visible.sync="dialogVisible"-->
<!--width="500px"-->
<!--:close-on-click-modal="false"-->
<!--@close="handleErrorClose"-->
<!--center-->
<!--&gt;-->
<!--<el-table :data="dialogErrorData" align="center">-->
<!--<el-table-column property="rowNumber" label="行数" align="center"></el-table-column>-->
<!--<el-table-column property="wrongData" label="错误提示" align="center"></el-table-column>-->
<!--</el-table>-->
<!--</el-dialog>-->
<el-dialog
title="导入错误提示"
:title="dialogTitle"
:visible.sync="dialogVisible"
width="500px"
:close-on-click-modal="false"
@close="handleErrorClose"
center
>
<el-table :data="dialogErrorData" align="center">
<el-table-column property="rowNumber" label="行数" align="center"></el-table-column>
<el-table-column property="wrongData" label="错误提示" align="center"></el-table-column>
</el-table>
center>
<!--<el-table :data="dialogErrorData" align="center">-->
<!--<el-table-column property="rowNumber" label="行数" align="center"></el-table-column>-->
<!--<el-table-column property="wrongData" label="错误提示" align="center"></el-table-column>-->
<!--</el-table>-->
<div v-if="importSuccessFlag" style="text-align: center;">
<div>本次成功导入<span style="color: green;">&nbsp;{{importNum}}条&nbsp;</span>数据</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleErrorClose" style="margin-top: 20px;">关闭</el-button>
</span>
</div>
<div v-if="!importSuccessFlag" style="text-align: center;">
<div v-if="importNum == 0">数据不符合格式要求,请修正后再次导入</div>
<div v-if="importNum != 0"><span style="color: red;">&nbsp;{{importNum}}条&nbsp;</span>数据不符合格式要求,请修正后再次导入</div>
<br>
<div>
<span>
<el-button @click="downloadFile" type="text" size="small" style="color: #449284 !important;">下载错误数据></el-button>
<!--<a @click="downloadFile">下载错误数据</a>-->
</span>
</div>
<div style="margin-top: 20px;">
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleErrorClose" style="float: left;margin-left: 130px;">取 消</el-button>
<el-upload
class="bg-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeUploadDoc">
<el-button type="primary" size="small" style="margin-left: -100px;">重新导入</el-button>
</el-upload>
</span>
</div>
</div>
</el-dialog>
<el-dialog
title="批量导入"
:visible.sync="dialogImportVisible"
width="650px"
:close-on-click-modal="false"
@close="handleImportClose"
center>
<div style="float:left;width: 250px;">
<span>1.下载模板,填写信息</span>
<br>
<div>
<el-button type="primary" size="small" style="float:left; margin-top: 30px;" @click="download1">下载模板</el-button>
</div>
</div>
<div style="float:left;margin-left: 40px;width: 1px;height: 100px; background: #c8cbd2;"></div>
<div style="margin-left: 400px;height: 130px;">
<span>2.上传填写好的文件</span>
<br>
<el-upload
class="bg-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeUploadDoc">
<el-button type="primary" size="small" style="margin-top: 30px;">上传文件</el-button>
</el-upload>
</div>
</el-dialog>
</div>
</template>
......@@ -203,7 +280,13 @@ export default {
detelMessage: '',
dialogVisible: false,
dialogErrorData: [],
showImportFlag: false
showImportFlag: false,
dialogImportVisible: false,
importMsg: "",
importSuccessFlag: false,
importNum: 0,
dialogTitle: "",
errorFileUrl: ""
}
},
created() {
......@@ -215,12 +298,21 @@ export default {
this.showImportFlag = true;
}
else {
this.showImportFlag = false;
setTimeout(() => {
let highMainManager = localStorage.getItem('highMainManager');
let mainManager = localStorage.getItem('mainManager');
let manager = localStorage.getItem('manager');
if(highMainManager == 1 || mainManager == 1 || manager == 1){
this.showImportFlag = true;
}
else {
this.showImportFlag = false;
}
},1000);
}
},
mounted() {
},
methods: {
initRange() {
......@@ -228,7 +320,7 @@ export default {
this.formOrganization.name = "";
this.formOrganization.orgName = "";
this.formOrganization.source = 0
this.getList()
this.getList(1)
},
setMoreOption(data, type) {
let option = [];
......@@ -253,7 +345,7 @@ export default {
this.formOrganization.pageNum = 1;
this.getList()
},
getList() {
getList(first) {
let idType = localStorage.getItem("storageIdType");
let req = {
circleId: this.circleId,
......@@ -266,7 +358,10 @@ export default {
};
openLoading(vm);
mpRelSearch(req).then(res => {
closeLoading(vm);
if (!first) {
closeLoading(vm);
}
if (res.code == "000000") {
this.peoplesDtoList = res.data.peoplesDtoList;
this.totalPeople = res.data.total;
......@@ -295,7 +390,7 @@ export default {
this.getList();
},
detel(item) {
this.detelMessage = `删除后 "${item.name}" 将无法访问本圈, 确定删除么?`
this.detelMessage = `删除后 "${item.name}" 将无法访问本圈, 确定删除么?`
this.deleteVisible = true
this.clickItem = item
},
......@@ -340,6 +435,11 @@ export default {
beforeUploadDoc(file) {
// // 人员数已超10000,无法导入机构
// if(vm.totalPeople > 10000){
// this.$message.warning('人员数已超10000,无法导入机构');
// return;
// }
let name = file.name;
let type = name.substring(name.lastIndexOf('.') + 1);
if (type !== 'xls' && type !== 'xlsx') {
......@@ -361,22 +461,32 @@ export default {
closeLoading(vm);
if (res.code == "000000") {
vm.dialogImportVisible = false;
// 导入成功
if(res.data.status){
vm.dialogVisible = true;
vm.dialogTitle = "导入成功";
vm.importSuccessFlag = true;
vm.importNum = res.data.successNum;
vm.initRange();
// vm.searchOrganization();
// vm.$emit('refreshRenYuan');
}
else {
if(res.data.successNum == 0 && res.data.wrongDataList.length > 0){
vm.dialogVisible = true;
vm.dialogTitle = "导入失败";
vm.importSuccessFlag = false;
vm.importNum = res.data.failNum;
vm.errorFileUrl = res.data.file;
this.dialogVisible = true;
// this.$message({
// type: 'success',
// message: '导入成功!'
// });
this.dialogErrorData = res.data.wrongDataList;
}
else {
this.$message({
type: 'success',
message: '导入成功!'
});
vm.initRange();
}
}
else {
this.$message({
......@@ -384,6 +494,32 @@ export default {
message: res.message
});
}
// if (res.code == "000000") {
//
//
// if(res.data.successNum == 0 && res.data.wrongDataList.length > 0){
//
// this.dialogVisible = true;
//
// this.dialogErrorData = res.data.wrongDataList;
// }
// else {
// this.$message({
// type: 'success',
// message: '导入成功!'
// });
// vm.initRange();
// }
//
// }
// else {
// this.$message({
// type: 'error',
// message: res.message
// });
// }
// vm.setDialog(res);
});
// };
......@@ -393,6 +529,25 @@ export default {
handleErrorClose() {
this.dialogVisible = false;
},
// 批量导入
batchImport(){
this.dialogImportVisible = true;
},
handleImportClose(){
this.dialogImportVisible = false;
},
// 下载模板
download1(){
const url = "https://files.yunqueyi.com/template/import_people_by_name_mobile.xlsx";
window.location.href = url;
},
// 下载错误数据文件
downloadFile(){
window.location.href = vm.errorFileUrl;
}
}
}
</script>
......
......@@ -67,7 +67,15 @@ export const moOption = (params) => {
description: '添加机构- 勾选操作',
})
};
export const moOptionAll = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/memberSelect/org/option/all`),
method: 'post',
data: params,
description: '添加机构- 全选勾选/反选操作',
})
};
export const moOptionBlackList = (params) => {
return fetch({
headers,
......@@ -87,7 +95,15 @@ export const moSave = (params) => {
description: '添加机构-保存',
})
};
export const moSaveAll = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/memberSelect/org/save/all`),
method: 'post',
data: params,
description: '添加机构- 全选-保存',
})
};
export const moSaveBlackList = (params) => {
return fetch({
headers,
......
......@@ -161,4 +161,14 @@ export const applyUpdate = (params) => {
})
};
export const getCircleDept = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/circle/judge/menu/${params.type}`),
method: 'get',
data: params,
description: '参数为类型目前2为是否有圈子设置所属部门的权限,返回结果为true/false',
})
};
......@@ -40,30 +40,38 @@
</el-col>
</el-form-item>
<el-form-item label="发起机构名称:">
<!-- <el-form-item label="发起机构名称:" prop="organizationNameList"> -->
<el-col :span="13" v-for="(item, index) in formData.organizationNameList" :key="index">
<el-input
size="small"
v-model="formData.organizationNameList[index]"
placeholder="请输入发起机构名称"
style="width:70%;"
maxlength=16
maxlength="16"
:disabled="peopleLevel == 'L3'"
@input="changeOrganizationName"
@blur = "blurName"
@focus = "focusName(index)"
@blur="blurName"
@focus="focusName(index)"
></el-input>
<span class="word-num">{{(formData.organizationNameList[index]).replace(/\s+/g,"").length}}/16</span>
<span
class="word-num"
>{{(formData.organizationNameList[index]).replace(/\s+/g,"").length}}/16</span>
<img @click="plusOrg(index)" class="edit-img" src="../../assets/image/plus.png" />
<img @click="deleteOrg(index)" v-if="index >= 1" class="edit-img" src="../../assets/image/trash.png" />
<img
@click="deleteOrg(index)"
v-if="index >= 1"
class="edit-img"
src="../../assets/image/trash.png"
/>
</el-col>
<el-popover
class="popover-content" :style="{'top': orgListIndex * 41 + 'px'}"
class="popover-content"
:style="{'top': orgListIndex * 41 + 'px'}"
placement="bottom"
:content="organizationContent"
v-model="visibleName"
@click="checkDefault">
<p @click="checkDefault"> 我的机构: {{ organizationContent }} </p>
@click="checkDefault"
>
<p @click="checkDefault">我的机构: {{ organizationContent }}</p>
</el-popover>
</el-form-item>
<el-form-item label="项目时间:" required>
......@@ -123,13 +131,25 @@
:before-upload="beforeUploadListPic"
:disabled="peopleLevel == 'L3'"
>
<img v-if="formData.attachmentUrl1" @mouseover.stop="imgMouseOver=true && peopleLevel != 'L3'" :src="formData.attachmentUrl1" class="bg-img">
<img
v-if="formData.attachmentUrl1"
@mouseover.stop="imgMouseOver=true && peopleLevel != 'L3'"
:src="formData.attachmentUrl1"
class="bg-img"
/>
<img
v-if="!formData.attachmentUrl1"
class="bg-img"
src="../../assets/image/small.png"
/>
<div
class="img-delete"
v-show="imgMouseOver"
@click.stop="deleteImg(1)"
@mouseout.stop="imgMouseOver=false"
>
<div class="img-delete" v-show="imgMouseOver" @click.stop="deleteImg(1)" @mouseout.stop="imgMouseOver=false"><i class="el-icon-delete"></i></div>
<i class="el-icon-delete"></i>
</div>
<div class="limit-text">
<p>尺寸:230*172</p>
<p>限制大小: 500Kb</p>
......@@ -166,7 +186,7 @@
:src="formData.attachmentUrl2"
@mouseover.stop="imgMouseOver2=true && peopleLevel != 'L3'"
class="bg-img"
>
/>
<video
v-if="formData.type == 2 && formData.attachmentUrl2"
width="100"
......@@ -174,14 +194,21 @@
class="bg-video"
@mouseover.stop="imgMouseOver2=true && peopleLevel != 'L3'"
>
<source :src="formData.attachmentUrl2" type="video/mp4">浏览器不支持mp4
<source :src="formData.attachmentUrl2" type="video/mp4" />浏览器不支持mp4
</video>
<img
v-if="!formData.attachmentUrl2"
class="bg-img"
src="../../assets/image/small.png"
/>
<div
class="img-delete"
v-show="imgMouseOver2"
@click.stop="deleteImg(2)"
@mouseout.stop="imgMouseOver2=false"
>
<div class="img-delete" v-show="imgMouseOver2" @click.stop="deleteImg(2)" @mouseout.stop="imgMouseOver2=false"><i class="el-icon-delete"></i></div>
<i class="el-icon-delete"></i>
</div>
<div v-show="formData.type == 1" class="limit-text">
<p>尺寸:750*420</p>
<p>限制大小: 2.0 Mb</p>
......@@ -197,22 +224,14 @@
<p class="upload-message" v-if="uploadImgMessage2">请选择封面</p>
</div>
<el-form-item label="项目结束后:">
<el-radio-group
size="small"
v-model="formData.allowLearn"
:disabled="showAllowType()"
>
<el-radio-group size="small" v-model="formData.allowLearn" :disabled="showAllowType()">
<el-radio :label="1">允许继续学习(停止发证)</el-radio>
<el-radio :label="2">不允许继续学习</el-radio>
</el-radio-group>
</el-form-item>
<p class="p_label">项目范围来源:(一经选择无法更改)</p>
<el-form-item label="">
<el-radio-group
size="small"
v-model="formData.scopeType"
:disabled="showScopeType()"
>
<el-form-item label>
<el-radio-group size="small" v-model="formData.scopeType" :disabled="showScopeType()">
<el-radio :label="0">使用地区范围</el-radio>
<el-radio :label="1">使用小生态范围</el-radio>
</el-radio-group>
......@@ -248,11 +267,7 @@
</el-radio-group>
</el-form-item>
<el-form-item label="项目上线通知">
<el-radio-group
size="small"
v-model="formData.sendOption"
:disabled="showNoticeType()"
>
<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>
......@@ -291,17 +306,11 @@
</el-form>
</div>
<div class="second-step" v-else-if="active === 1">
<div v-if='formData.scopeType != 1'>
<div v-if="formData.scopeType != 1">
<el-tabs v-model="activeName" @tab-click="handleClickTabs">
<el-tab-pane v-if="idType != 2" label="设定行政范围" name="first">
<el-row :gutter="20">
<el-col class="rim" :span="12">
<!--
:load="loadNode"
lazy
default-expand-all
@check-change="checkUpdate"
-->
<el-tree
default-expand-all
:data="treeData"
......@@ -327,9 +336,7 @@
</el-tree>
</el-col>
<el-col :span="11">
<p class="area-p">
项目范围包含下列区域所有机构和人员({{ tagsRegion.length }})
</p>
<p class="area-p">项目范围包含下列区域所有机构和人员({{ tagsRegion.length }})</p>
<el-tag
v-for="tag in tagsRegion"
:key="tag.name"
......@@ -343,13 +350,6 @@
<el-tab-pane label="设定机构" name="second">
<el-form :inline="true" :model="formOrganization" class="demo-form-inline">
<el-form-item label>
<!-- <el-cascader
v-if="idType != 2"
size="small"
expand-trigger="hover"
:options="organizationRegion"
v-model="formOrganization.administrativeIdList"
></el-cascader> -->
<el-cascader
size="small"
ref="cascaderRegion"
......@@ -373,7 +373,12 @@
</el-select>
</el-form-item>
<el-form-item label>
<el-input style="width:140px;" size="small" v-model="formOrganization.name" placeholder="请输入机构名称"></el-input>
<el-input
style="width:140px;"
size="small"
v-model="formOrganization.name"
placeholder="请输入机构名称"
></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="searchOrganization()">搜索</el-button>
......@@ -392,19 +397,24 @@
:before-upload="uploadOrganization"
>
<el-button size="small">导入机构名单</el-button>
<el-button class="down-button" slot="tip" size="small" @click="download('organization')">下载导入模板</el-button>
<el-button
class="down-button"
slot="tip"
size="small"
@click="download('organization')"
>下载导入模板</el-button>
</el-upload>
<div v-if="idType == 1 && status4Flag == 1">
<el-button size="small" @click="dialogUpload = true">导入机构名单</el-button>
<el-button class="down-button" slot="tip" size="small" @click="download('organization')">下载导入模板</el-button>
<el-button
class="down-button"
slot="tip"
size="small"
@click="download('organization')"
>下载导入模板</el-button>
</div>
</el-form-item>
</el-form>
<!--
:row-key="getRowKeys"
:reserve-selection="true"
@selection-change="selectionChangeOrganization"
-->
<el-table
class="rim"
ref="multipleOrganization"
......@@ -414,11 +424,7 @@
@select-all="selectAllOrganization"
@select="selectOrganization"
>
<el-table-column
type="selection"
width="55"
:selectable="selectableTableList"
></el-table-column>
<el-table-column type="selection" width="55" :selectable="selectableTableList"></el-table-column>
<el-table-column prop="name" label="医院名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="hospitalLevelName" label="医院级别" align="center"></el-table-column>
<el-table-column prop="provinceName" label="所属省份" align="center"></el-table-column>
......@@ -427,7 +433,7 @@
<el-table-column prop="townName" label="所属街道" align="center"></el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<img src="../../assets/image/no-content1.png" />
<p>没有机构信息</p>
</div>
</div>
......@@ -464,15 +470,12 @@
></el-table-column>
<el-table-column prop="name" label="科室名称" align="center">
<template slot="header" slot-scope="scope">
<el-input
v-model="searchName"
size="mini"
placeholder="输入科室名称"/>
<el-input v-model="searchName" size="mini" placeholder="输入科室名称" />
</template>
</el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<img src="../../assets/image/no-content1.png" />
<p>没有科室信息</p>
</div>
</div>
......@@ -481,16 +484,6 @@
</el-tab-pane>
<el-tab-pane label="设定人员" name="fourth">
<el-form :inline="true" :model="formPerson" class="demo-form-inline">
<!-- <el-form-item>
<el-select size="small" v-model="formPerson.departmentId" placeholder="全部科室">
<el-option
v-for="item in departmentList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item> -->
<el-form-item label>
<el-input size="small" v-model="formPerson.hospitalName" placeholder="请输入机构名称"></el-input>
</el-form-item>
......@@ -514,19 +507,24 @@
:before-upload="uploadPerson"
>
<el-button size="small">导入人员名单</el-button>
<el-button class="down-button" slot="tip" size="small" @click="download('person')">下载导入模板</el-button>
<el-button
class="down-button"
slot="tip"
size="small"
@click="download('person')"
>下载导入模板</el-button>
</el-upload>
<div v-if="idType == 1 && status4Flag == 1">
<el-button size="small" @click="dialogUpload = true">导入人员名单</el-button>
<el-button class="down-button" slot="tip" size="small" @click="download('person')">下载导入模板</el-button>
<el-button
class="down-button"
slot="tip"
size="small"
@click="download('person')"
>下载导入模板</el-button>
</div>
</el-form-item>
</el-form>
<!--
:row-key="getRowKeys"
:reserve-selection="true"
@selection-change="selectionChangePerson"
-->
<el-table
class="rim"
ref="multiplePerson"
......@@ -536,11 +534,7 @@
@select-all="selectAllPerson"
@select="selectPerson"
>
<el-table-column
type="selection"
width="55"
:selectable="selectableTableList"
></el-table-column>
<el-table-column type="selection" width="55" :selectable="selectableTableList"></el-table-column>
<el-table-column prop="name" label="人员名称" align="center"></el-table-column>
<el-table-column prop="hospitalName" label="所属医院" align="center"></el-table-column>
<el-table-column prop="departmentName" label="所属科室" align="center"></el-table-column>
......@@ -549,7 +543,7 @@
<el-table-column prop="countyName" label="所属区县" align="center"></el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<img src="../../assets/image/no-content1.png" />
<p>没有人员信息</p>
</div>
</div>
......@@ -569,74 +563,16 @@
</el-tab-pane>
</el-tabs>
</div>
<!-- <div v-else>
<el-form :inline="true" :model="formOrganization" class="demo-form-inline">
<el-form-item label>
<el-select
size="small"
v-model="formEcology.ecology"
placeholder="选择小生态"
@change="selectChangeEcology"
:disabled="status4Flag == 1"
>
<el-option
v-for="item in ecologySelect"
:key="item.id"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<span class="span_ecology">{{ checkedEcology }}</span>
</el-form>
<el-table
class="rim"
ref="multipleEcology"
:data="tableEcology"
tooltip-effect="dark"
style="width: 100%"
>
<el-table-column
type="selection"
width="55"
:selectable="selectableTableEcology"
:reserve-selection="true"
></el-table-column>
<el-table-column prop="name" label="医院名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="hospitalLevelName" label="医院级别" align="center"></el-table-column>
<el-table-column prop="provinceName" label="所属省份" align="center"></el-table-column>
<el-table-column prop="cityName" label="所属城市" align="center"></el-table-column>
<el-table-column prop="countyName" label="所属区县" align="center"></el-table-column>
<el-table-column prop="townName" label="所属街道" align="center"></el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有机构信息!</p>
</div>
</div>
</el-table>
<div class="pagination">
<el-pagination
background
@size-change="handleSizeEcology"
@current-change="handleCurrentEcology"
:current-page="formEcology.pageNum"
:page-sizes="[10, 20, 40]"
:page-size="formEcology.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalEcology"
></el-pagination>
</div>
</div> -->
<div v-else>
<el-form :model="formCircle" label-width="130px" class="demo-form-inline">
<el-form-item label="关联小圈:" required>
<el-select
filterable
size="small"
v-model="formCircle.microecologyId"
placeholder="请选择关联小圈"
:disabled="status4Flag == 1"
>
<!-- :disabled="status4Flag == 1" -->
<el-option
v-for="item in circleList"
:key="item.id"
......@@ -646,11 +582,7 @@
</el-select>
</el-form-item>
<el-form-item v-show="formCircle.microecologyId" label="圈内可见范围:" required>
<el-select
size="small"
v-model="formCircle.groupType"
placeholder="请选择圈内可见范围"
>
<el-select size="small" v-model="formCircle.groupType" placeholder="请选择圈内可见范围">
<el-option label="全体成员" :value="1"></el-option>
</el-select>
</el-form-item>
......@@ -664,14 +596,21 @@
<el-button type="primary" size="small" @click="coverData()">确定</el-button>
</span>
</el-dialog>
<el-dialog title="提醒" :visible.sync="dialogWarn" width="30%" center :show-close="false" :close-on-click-modal="false">
<el-dialog
title="提醒"
:visible.sync="dialogWarn"
width="30%"
center
:show-close="false"
:close-on-click-modal="false"
>
<p v-if="warnType == 0">该项目为上架状态,确定要增加“行政范围”吗?</p>
<span slot="footer" class="dialog-footer">
<el-button @click="closeCheck()">取消</el-button>
<el-button type="primary" @click="dialogWarn = false">确定增加</el-button>
</span>
</el-dialog>
<el-dialog title="提醒" :visible.sync="dialogUpload" width="30%" center >
<el-dialog title="提醒" :visible.sync="dialogUpload" width="30%" center>
<p v-if="activeName == 'second'" style="text-align:center">该项目为上架状态,确定要导入机构名单吗?</p>
<p v-if="activeName == 'fourth'" style="text-align:center">该项目为上架状态,确定要导入人员名单吗?</p>
<span slot="footer" class="dialog-footer">
......@@ -683,7 +622,12 @@
:limit="1"
:before-upload="uploadOrganization"
>
<el-button class="down-button-close" slot="tip" size="small" @click="dialogUpload = false">取消</el-button>
<el-button
class="down-button-close"
slot="tip"
size="small"
@click="dialogUpload = false"
>取消</el-button>
<el-button @click="closeUpload()" type="primary" size="small">继续导入</el-button>
</el-upload>
<el-upload
......@@ -694,7 +638,12 @@
:limit="1"
:before-upload="uploadPerson"
>
<el-button class="down-button-close" slot="tip" size="small" @click="dialogUpload = false">取消</el-button>
<el-button
class="down-button-close"
slot="tip"
size="small"
@click="dialogUpload = false"
>取消</el-button>
<el-button @click="closeUpload()" type="primary" size="small">继续导入</el-button>
</el-upload>
</span>
......@@ -737,7 +686,12 @@
:limit="1"
:before-upload="uploadOrganization"
>
<el-button slot="tip" class="down-button-close" size="small" @click="dialogFail = false">取消</el-button>
<el-button
slot="tip"
class="down-button-close"
size="small"
@click="dialogFail = false"
>取消</el-button>
<el-button
stype="position: absolute;top: -14px;"
type="primary"
......@@ -754,7 +708,12 @@
:limit="1"
:before-upload="uploadPerson"
>
<el-button slot="tip" class="down-button-close" size="small" @click="dialogFail = false">取消</el-button>
<el-button
slot="tip"
class="down-button-close"
size="small"
@click="dialogFail = false"
>取消</el-button>
<el-button
stype="position: absolute;top: -14px;"
type="primary"
......@@ -798,7 +757,7 @@
<el-form-item label="已选择:" class="check-component">
<el-col :span="20" class="tags-list">
<el-tag
class = "tags-component"
class="tags-component"
v-for="tag in tagsComponent"
v-bind:class="{'tags-component-online': tag.disabled === true }"
:key="tag.value"
......@@ -811,171 +770,230 @@
</el-form-item>
<el-form-item required label="学习时长:" class="time-contrl">
<el-col :span="10">
<el-radio-group class="el-time-ctr" v-model="formComponent.courseRequire" :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6">
<el-radio-group
class="el-time-ctr"
v-model="formComponent.courseRequire"
:disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
>
<el-radio :label="1">是(必须达到课程配置的观看时长要求才算通过)</el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-col>
</el-form-item>
</el-form>
<el-form
ref="formExam"
label-width="150px"
:model="formExam"
class="achievement"
>
<el-form ref="formExam" label-width="150px" :model="formExam" class="achievement">
<el-form-item required label="项目通过标准" :class="customError.standard.className">
<el-select
v-model="formExam.passType"
placeholder="请选择"
style="width: 350px"
@change="updateCertificateType"
:disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
>
<el-option
v-for="item in certificateTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<div class="el-form-item__error" v-if="customError.standard.error != ''">{{customError.standard.error}}</div>
v-model="formExam.passType"
placeholder="请选择"
style="width: 350px"
@change="updateCertificateType"
:disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
>
<el-option
v-for="item in certificateTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<div
class="el-form-item__error"
v-if="customError.standard.error != ''"
>{{customError.standard.error}}</div>
</el-form-item>
<el-form-item required label="累计学习时长大于等于:" v-show="formExam.passType == 3" :class="customError.passTotalLearnTime.className">
<el-input placeholder="请输入" :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6" v-model="formComponent.passTotalLearnTime" style="width:200px" @input="focusFun($event,'passTotalLearnTime')">
<el-form-item
required
label="累计学习时长大于等于:"
v-show="formExam.passType == 3"
:class="customError.passTotalLearnTime.className"
>
<el-input
placeholder="请输入"
:disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
v-model="formComponent.passTotalLearnTime"
style="width:200px"
@input="focusFun($event,'passTotalLearnTime')"
>
<template slot="append">分钟</template>
</el-input>
<div class="el-form-item__error" v-if="customError.passTotalLearnTime.error != ''">{{customError.passTotalLearnTime.error}}</div>
<div
class="el-form-item__error"
v-if="customError.passTotalLearnTime.error != ''"
>{{customError.passTotalLearnTime.error}}</div>
</el-form-item>
<!--add 选择平均分展示-->
<div v-show="formExam.passType == 2" >
<div class="mleft60" v-show="formExam.passType == 2">
<div class="mini-source" style="overflow: hidden;">
<el-form-item label="项目中最高" label-width="80px" style="float: left;" :class="customError.passExamCount.className" class="min-label">
<div class="source-item">
<el-input placeholder="请输入数字" :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6" size="mini" v-model="formComponent.passExamCount" style="width:150px" @input="focusFun($event,'passExamCount')">
<template slot="append"></template>
</el-input>
</div>
<div class="el-form-item__error" v-if="customError.passExamCount.error != ''">{{customError.passExamCount.error}}</div>
</el-form-item>
<div style="float: left;padding:0 5px;line-height: 26px;font-size: 12px;color:#606266">考试成绩的平均分大于等于</div>
<el-form-item label="" label-width="0px" style="float: left;" :class="customError.passAverageScore.className" class="min-label">
<div class="source-item">
<el-input placeholder="请输入数字" :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6" size="mini" v-model="formComponent.passAverageScore" style="width:150px" @input="focusFun($event,'passAverageScore')">
<template slot="append"></template>
</el-input>
</div>
<div class="el-form-item__error" v-if="customError.passAverageScore.error != ''">{{customError.passAverageScore.error}}</div>
</el-form-item>
<div style="float: left;padding:0 5px;line-height: 26px;font-size: 12px;color:#606266">则项目通过</div>
</div>
<div v-show="formExam.passType == 2">
<div class="mleft60" v-show="formExam.passType == 2">
<div class="mini-source" style="overflow: hidden;">
<el-form-item
label="项目中最高"
label-width="80px"
style="float: left;"
:class="customError.passExamCount.className"
class="min-label"
>
<div class="source-item">
<el-input
placeholder="请输入数字"
:disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
size="mini"
v-model="formComponent.passExamCount"
style="width:150px"
@input="focusFun($event,'passExamCount')"
>
<template slot="append"></template>
</el-input>
</div>
<div
class="el-form-item__error"
v-if="customError.passExamCount.error != ''"
>{{customError.passExamCount.error}}</div>
</el-form-item>
<div
style="float: left;padding:0 5px;line-height: 26px;font-size: 12px;color:#606266"
>考试成绩的平均分大于等于</div>
<el-form-item
label
label-width="0px"
style="float: left;"
:class="customError.passAverageScore.className"
class="min-label"
>
<div class="source-item">
<el-input
placeholder="请输入数字"
:disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
size="mini"
v-model="formComponent.passAverageScore"
style="width:150px"
@input="focusFun($event,'passAverageScore')"
>
<template slot="append"></template>
</el-input>
</div>
<div
class="el-form-item__error"
v-if="customError.passAverageScore.error != ''"
>{{customError.passAverageScore.error}}</div>
</el-form-item>
<div
style="float: left;padding:0 5px;line-height: 26px;font-size: 12px;color:#606266"
>则项目通过</div>
</div>
</div>
</div>
<el-form-item required label="配置证书:">
<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="2"></el-radio>
</el-radio-group>
<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="2"></el-radio>
</el-radio-group>
</el-col>
</el-form-item>
<!--edit 选择配置证书展示-->
<div v-show="formComponent.configure == 1 && formExam.passType == 2" v-for="(item , index) in formExam.exam" :key="index">
<div
v-show="formComponent.configure == 1 && formExam.passType == 2"
v-for="(item , index) in formExam.exam"
:key="index"
>
<div class="mleft60">
<div class="soure-configure">
<div class="configure-item">
<el-form-item label="平均分:" label-width="65px" style="float: left;" :class="item.minClass" class="min-label">
<el-col :span="5">
<el-input :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6" placeholder="请输入数字" size="mini" v-model="item.rangeMin" style="width:215px" @input="focusFun($event,'rangeMin',index)">
<template slot="append"></template>
</el-input>
</el-col>
<div class="el-form-item__error" v-if="item.minError">{{item.minError}}</div>
</el-form-item>
<div style="float: left;padding:0 5px;line-height: 26px;">~</div>
<el-form-item label-width="0" style="float: left;margin-left:0px;" :class="item.maxClass" class="min-label">
<el-col :span="5">
<el-input :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6" placeholder="请输入数字" size="mini" v-model="item.rangeMax" style="width:215px" @input="focusFun($event,'rangeMax',index)">
<template slot="append"></template>
</el-input>
</el-col>
<div class="el-form-item__error" v-if="item.maxError">{{item.maxError}}</div>
</el-form-item>
</div>
<div class="configure-item">
<el-form-item label="发放证书:" style="margin-left: -85px;" :class="item.certClass">
<el-select
v-model="item.certificateId"
placeholder="请选择证书"
size="mini"
style="width: 450px;"
@change="updateCertificate(index)"
:disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
>
<el-option
v-for="item in optionsCertificate"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<div class="el-form-item__error" v-if="item.certError">{{item.certError}}</div>
</el-form-item>
</div>
<!-- <el-form-item label="发放证书" style="width:100px;">
<el-col :span="3">
<el-button @click="addCertificate" icon="el-icon-plus" circle></el-button>
<el-button @click="reduceCertificate(index)" icon="el-icon-minus" circle></el-button>
</el-col>
</el-form-item> -->
<div class="configure-option">
<el-button size="mini" @click="addCertificate" icon="el-icon-plus" circle :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"></el-button>
<el-button size="mini" @click="reduceCertificate(index)" icon="el-icon-minus" circle :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"></el-button>
</div>
<div class="configure-item">
<el-form-item
label="平均分:"
label-width="65px"
style="float: left;"
:class="item.minClass"
class="min-label"
>
<el-col :span="5">
<el-input
:disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
placeholder="请输入数字"
size="mini"
v-model="item.rangeMin"
style="width:215px"
@input="focusFun($event,'rangeMin',index)"
>
<template slot="append"></template>
</el-input>
</el-col>
<div class="el-form-item__error" v-if="item.minError">{{item.minError}}</div>
</el-form-item>
<div style="float: left;padding:0 5px;line-height: 26px;">~</div>
<el-form-item
label-width="0"
style="float: left;margin-left:0px;"
:class="item.maxClass"
class="min-label"
>
<el-col :span="5">
<el-input
:disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
placeholder="请输入数字"
size="mini"
v-model="item.rangeMax"
style="width:215px"
@input="focusFun($event,'rangeMax',index)"
>
<template slot="append"></template>
</el-input>
</el-col>
<div class="el-form-item__error" v-if="item.maxError">{{item.maxError}}</div>
</el-form-item>
</div>
<div class="configure-item">
<el-form-item label="发放证书:" style="margin-left: -85px;" :class="item.certClass">
<el-select
v-model="item.certificateId"
placeholder="请选择证书"
size="mini"
style="width: 450px;"
@change="updateCertificate(index)"
:disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
>
<el-option
v-for="item in optionsCertificate"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<div class="el-form-item__error" v-if="item.certError">{{item.certError}}</div>
</el-form-item>
</div>
<div class="configure-option">
<el-button
size="mini"
@click="addCertificate"
icon="el-icon-plus"
circle
:disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
></el-button>
<el-button
size="mini"
@click="reduceCertificate(index)"
icon="el-icon-minus"
circle
:disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
></el-button>
</div>
</div>
</div>
<!-- <el-form-item label="项目中最高">
<el-col :span="3">
<el-input v-model="item.examCount" @change="updateCount(index)" :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"></el-input>
</el-col>
<el-col class="line" :span="3.5" > &nbsp 门考试平均分:</el-col>
<el-col :span="3">
<el-input v-model="item.rangeMin" @change="updateMin(index)" :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"></el-input>
</el-col>
<el-col class="line" :span="1.5"> &nbsp 分~ &nbsp</el-col>
<el-col :span="3">
<el-input v-model="item.rangeMax" @change="updateMax(index)" :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"></el-input>
</el-col>
</el-form-item> -->
</div>
<el-form-item required v-show="formComponent.configure == 1 && (formExam.passType == 1 || formExam.passType == 3)" label="发放证书" :class="customError.certificate.className">
<el-form-item
required
v-show="formComponent.configure == 1 && (formExam.passType == 1 || formExam.passType == 3)"
label="发放证书"
:class="customError.certificate.className"
>
<el-select
v-model="formComponent.certificate"
placeholder="请选择证书"
......@@ -989,7 +1007,10 @@
:value="item.value"
></el-option>
</el-select>
<div class="el-form-item__error" v-if="customError.certificate.error != ''">{{customError.certificate.error}}</div>
<div
class="el-form-item__error"
v-if="customError.certificate.error != ''"
>{{customError.certificate.error}}</div>
</el-form-item>
</el-form>
</div>
......@@ -1018,7 +1039,6 @@ export default {
data() {
let checkProjectStr = (rule, value, callback) => {
if (value.indexOf("\\") != -1) {
//存在
callback(new Error("请勿输入字符“ \\ "));
} else if (value.indexOf(".") != -1) {
callback(new Error("请勿输入字符“ . "));
......@@ -1029,7 +1049,6 @@ export default {
let checkNormalInt = (rule, value, callback) => {
const val = parseFloat(value);
const isInteger = Number.isInteger(val);
// if((isInteger && val > 0) || checkNeedRule(val)){
if (!value || (isInteger && val >= 0 && val <= 100)) {
callback();
} else {
......@@ -1039,14 +1058,6 @@ export default {
let checkOrgListName = (rule, value, callback) => {
console.log(rule, value, callback);
// const val = parseFloat(value);
// const isInteger = Number.isInteger(val);
// // if((isInteger && val > 0) || checkNeedRule(val)){
// if (!value || (isInteger && val >= 0 && val <= 100)) {
// callback();
// } else {
// callback(new Error(`请输入0~100正整数`));
// }
};
return {
......@@ -1102,7 +1113,7 @@ export default {
attachmentMore2: {},
scopeType: 0,
organizationName: "",
organizationNameList: [''],
organizationNameList: [""],
sendOption: 1,
receiveOption: 1,
visibleFlag: 1,
......@@ -1234,9 +1245,9 @@ export default {
changedEcology2: [],
// 小圈
formCircle: {
microecologyId: '', // 小圈id
microecologyId: "", // 小圈id
groupType: 1, // 关联类型:1 全部 2:分组
groupIds: [], // 分组id,全部为[]
groupIds: [] // 分组id,全部为[]
},
circleList: [],
//选择项目组件 数据
......@@ -1360,18 +1371,6 @@ export default {
},
{ validator: checkProjectStr, trigger: "blur" }
],
// organizationName: [
// { required: true, message: "请填写发起机构名称", trigger: "blur" },
// {
// min: 1,
// max: 16,
// message: "超过12个最大字数限制,请精简字数或使用简称",
// trigger: "blur"
// }
// ],
// organizationNameList: [
// { validator: checkOrgListName, trigger: "blur" }
// ],
duringTime: [
{
required: true,
......@@ -1440,7 +1439,7 @@ export default {
},
methods: {
plusOrg(index) {
vm.formData.organizationNameList.splice(index + 1, 0, '');
vm.formData.organizationNameList.splice(index + 1, 0, "");
},
deleteOrg(index) {
vm.formData.organizationNameList.splice(index, 1);
......@@ -1482,16 +1481,16 @@ export default {
checkOrgNameList() {
let nameList = this.formData.organizationNameList;
for(let i = 0; i < nameList.length; i ++) {
if(!nameList[i]) {
this.$message.error('发起机构名称不可以为空');
for (let i = 0; i < nameList.length; i++) {
if (!nameList[i]) {
this.$message.error("发起机构名称不可以为空");
return false;
}
}
for(let i = 0; i < nameList.length - 1; i ++) {
for(let j = i + 1; j < nameList.length; j ++) {
if(nameList[i] == nameList[j]) {
this.$message.error('发起机构名称不能重复');
for (let i = 0; i < nameList.length - 1; i++) {
for (let j = i + 1; j < nameList.length; j++) {
if (nameList[i] == nameList[j]) {
this.$message.error("发起机构名称不能重复");
return false;
}
}
......@@ -1642,9 +1641,8 @@ export default {
let projectId = vm.getUrlSearch(window.location.href, "projectId");
if (projectId != null && projectId != "") {
openLoading(vm);
vm
.GET("portal/portalInfo/getProjectInfo/" + projectId, req)
.then(res => {
vm.GET("portal/portalInfo/getProjectInfo/" + projectId, req).then(
res => {
closeLoading(vm);
if (res.code == "000000" && res.data.projectData != null) {
let editData = res.data;
......@@ -1659,11 +1657,11 @@ export default {
if (this.projectStatus == 1) {
this.showStorage = true;
}
//console.log('projectStatus:',this.projectStatus);
} else {
console.log(res);
}
});
}
);
} else {
this.showStorage = true;
}
......@@ -1719,7 +1717,7 @@ export default {
}
//}
if (option == "add" && this.projectId) {
projectModel.id = this.projectId
projectModel.id = this.projectId;
}
if (option == "edit" || option == "storageEdit") {
//编辑
......@@ -1785,12 +1783,10 @@ export default {
//查询上次设定范围
operationLast() {
let req = {};
vm
.GET("portal/scope/v1/" + this.projectId + "/operation/last", req)
.then(res => {
vm.GET("portal/scope/v1/" + this.projectId + "/operation/last", req).then(
res => {
if (res.code == "000000") {
this.scopeReq = res.data.scopeReq;
//console.log(this.scopeReq);
//operationData.getDivision(res.data.scopeReq.scopeOfAdministrative);
this.setKindOfOrganizationLast = this.scopeReq.setKindOfOrganization;
this.setKindOfPeopleLast = this.scopeReq.setKindOfPeople;
......@@ -1802,7 +1798,8 @@ export default {
);
//this.changedOrganization = list;
}
});
}
);
},
//查询组件证书信息
getComponentInfo() {
......@@ -1811,33 +1808,34 @@ export default {
if (projectIdValue == null) {
projectIdValue = 0;
}
vm
.GET("portal/portalInfo/getComponentInfo/" + projectIdValue, param)
.then(res => {
if (res.code == "000000") {
//console.log(res);
let componentList = res.data.componentList;
let certificateList = res.data.certificateList;
let optionsComponent = [],
optionsCertificate = [];
for (let index = 0; index < componentList.length; index++) {
optionsComponent[index] = {};
optionsComponent[index].value = componentList[index].id;
optionsComponent[index].label = componentList[index].name;
optionsComponent[index].name = componentList[index].name;
}
for (let index = 0; index < certificateList.length; index++) {
optionsCertificate[index] = {};
optionsCertificate[index].value = certificateList[index].id;
optionsCertificate[index].label = certificateList[index].name;
optionsCertificate[index].name = certificateList[index].name;
}
this.optionsComponent = optionsComponent;
this.optionsCertificate = optionsCertificate;
this.organizationContent = res.data.creatorOrganizationName;
vm.GET(
"portal/portalInfo/getComponentInfo/" + projectIdValue,
param
).then(res => {
if (res.code == "000000") {
//console.log(res);
let componentList = res.data.componentList;
let certificateList = res.data.certificateList;
let optionsComponent = [],
optionsCertificate = [];
for (let index = 0; index < componentList.length; index++) {
optionsComponent[index] = {};
optionsComponent[index].value = componentList[index].id;
optionsComponent[index].label = componentList[index].name;
optionsComponent[index].name = componentList[index].name;
}
this.editManager();
});
for (let index = 0; index < certificateList.length; index++) {
optionsCertificate[index] = {};
optionsCertificate[index].value = certificateList[index].id;
optionsCertificate[index].label = certificateList[index].name;
optionsCertificate[index].name = certificateList[index].name;
}
this.optionsComponent = optionsComponent;
this.optionsCertificate = optionsCertificate;
this.organizationContent = res.data.creatorOrganizationName;
}
this.editManager();
});
},
//项目组件信息 暂存/完成
componentDraft(type) {
......@@ -1939,7 +1937,9 @@ export default {
this.$message.error("输入长度为2-24的内容");
return;
}
let urlProjectId = vm.getUrlSearch(window.location.href, "projectId") || this.projectId;
let urlProjectId =
vm.getUrlSearch(window.location.href, "projectId") ||
this.projectId;
if (urlProjectId == null) {
let param = {
......@@ -1954,8 +1954,8 @@ export default {
this.$message.info(res.message);
}
});
} else if (this.projectId){
this.formData.id = this.projectId
} else if (this.projectId) {
this.formData.id = this.projectId;
this.insertOrUpdate("storageEdit");
} else {
//console.log('urlProjectId'+urlProjectId);
......@@ -1968,20 +1968,7 @@ export default {
//暂存步骤2
if (this.formData.scopeType == 1) {
//小生态暂存
// if (this.formEcology.ecology == "") {
// vm.$message.info("完成");
// } else {
// let req = {};
// req.ecology = [];
// req.ecology[0] = this.formEcology.ecology;
// vm
// .POST("portal/scope/v1/" + this.projectId + "/organization", req)
// .then(res => {
// //console.log('设定小生态范围',res);
// vm.$message.info(res.message);
// });
// }
this.sendCircleData('storage');
this.sendCircleData("storage");
return;
}
if (this.tagsRegion.length == 0) {
......@@ -1993,31 +1980,11 @@ export default {
}
let req = {
projectId: this.projectId,
// setKindOfAdministrative: this.getKind("administrativeScope"),
// setKindOfOrganization: this.getKind("organization"),
// setKindOfDepartment: this.getKind("department"),
// setKindOfPeople: this.getKind("person"),
// flag: this.flagCover,
scopeOfAdministrative: this.getScope("administrativeUpdate"),
scopeOfDepartment: this.getScopeDepartment(),
flag: 1 //0:下一步 1:暂存
};
// if (req.setKindOfAdministrative == 3) {
// req.scopeOfAdministrative = this.getScope("administrativeUpdate");
// }
// if (req.setKindOfOrganization == 2 || req.setKindOfOrganization == 3) {
// req.scopeOfOrganization = this.getScopeOrganization(
// req.setKindOfOrganization
// );
// }
// if (req.setKindOfDepartment == 3) {
// req.scopeOfDepartment = this.getScopeDepartment();
// }
// if (req.setKindOfPeople == 2 || req.setKindOfPeople == 3) {
// req.scopeOfPeople = this.getScopePeople(req.setKindOfPeople);
// }
openLoading(vm);
// vm.POST("portal/scope", req).then(res => {
vm.POST("portal/new/scope", req).then(res => {
//暂存范围
closeLoading(vm);
......@@ -2035,11 +2002,6 @@ export default {
//点击完成
complete() {
//type 1:暂存 2:完成
// 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("完成");
......@@ -2063,7 +2025,7 @@ export default {
nextStep() {
if (this.active == 0) {
let formName = "formData";
if(!this.checkOrgNameList()) return;
if (!this.checkOrgNameList()) return;
let removeState = this.submitForm(formName);
if (!vm.formData.attachmentUrl1) {
vm.uploadImgMessage = true;
......@@ -2082,7 +2044,9 @@ export default {
vm.formData.attachmentUrl2 != ""
) {
//校验名字
let projectId = vm.getUrlSearch(window.location.href, "projectId") || this.projectId;
let projectId =
vm.getUrlSearch(window.location.href, "projectId") ||
this.projectId;
if (projectId == null) {
//新建
let param = {
......@@ -2093,15 +2057,12 @@ export default {
//移动到第二页 选择范围
// this.operationLast();
this.insertOrUpdate();
// this.active++;
// this.stepData = [false, true, false];
//this.initRange();
} else {
this.$message.info(res.message);
}
});
} else if (this.projectId){
this.insertOrUpdate('add');
} else if (this.projectId) {
this.insertOrUpdate("add");
} else {
//编辑
// this.operationLast();
......@@ -2111,70 +2072,22 @@ export default {
} else if (this.active == 1) {
//进入第三步
if (this.formData.scopeType == 1) {
//设定小生态范围
// if (this.formEcology.ecology == "") {
// vm.$message({
// type: "info",
// message: "请选择小生态范围"
// });
// return;
// }
// let req = {};
// req.ecology = [];
// req.ecology[0] = this.formEcology.ecology;
// vm
// .POST("portal/scope/v1/" + this.projectId + "/organization", req)
// .then(res => {
// console.log("设定小生态范围", res);
// if (res.code == "000000") {
// this.active++;
// this.stepData = [false, false, true];
// this.tagDrop();
// }
// });
// 设定小圈范围
this.sendCircleData('next');
this.sendCircleData("next");
return;
}
if (this.idType == 1) {
//内部管理员
// if (this.tagsRegion.length > 0 || this.idTypeProject == 2) {
//选择了范围
let req = {
projectId: this.projectId,
// setKindOfAdministrative: this.getKind("administrativeScope"),
// setKindOfOrganization: this.getKind("organization"),
// setKindOfDepartment: this.getKind("department"),
// setKindOfPeople: this.getKind("person"),
// flag: this.flagCover,
scopeOfAdministrative: this.getScope("administrativeUpdate"),
scopeOfDepartment: this.getScopeDepartment(),
flag: 0 //0:下一步 1:暂存
};
// if (req.setKindOfAdministrative == 3) {
// req.scopeOfAdministrative = this.getScope("administrativeUpdate");
// }
// if (
// req.setKindOfOrganization == 2 ||
// req.setKindOfOrganization == 3
// ) {
// req.scopeOfOrganization = this.getScopeOrganization(
// req.setKindOfOrganization
// );
// }
// if (req.setKindOfDepartment == 3) {
// req.scopeOfDepartment = this.getScopeDepartment();
// }
// if (req.setKindOfPeople == 2 || req.setKindOfPeople == 3) {
// req.scopeOfPeople = this.getScopePeople(req.setKindOfPeople);
// }
openLoading(vm);
// vm.POST("portal/scope", req).then(res => {
vm.POST("portal/new/scope", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
//移动到选择项目组件
//console.log(res);
let statusMove = this.scopeStatus(res.data.status);
if (statusMove === 0) {
this.active++;
......@@ -2190,43 +2103,14 @@ export default {
});
}
});
// }
// else {
// //没有选择范围
// vm.$message({
// showClose: true,
// message: "项目范围不能为空",
// type: "error"
// });
// }
} else {
//外部人员
let req = {
projectId: this.projectId,
// setKindOfAdministrative: 0,
// setKindOfOrganization: this.getKind("organization"),
// setKindOfDepartment: this.getKind("department"),
// setKindOfPeople: this.getKind("person"),
// flag: this.flagCover,
scopeOfAdministrative: null,
scopeOfDepartment: this.getScopeDepartment(),
flag: 0 //0:下一步 1:暂存
};
// if (
// req.setKindOfOrganization == 2 ||
// req.setKindOfOrganization == 3
// ) {
// req.scopeOfOrganization = this.getScopeOrganization(
// req.setKindOfOrganization
// );
// }
// if (req.setKindOfDepartment == 3) {
// req.scopeOfDepartment = this.getScopeDepartment();
// }
// if (req.setKindOfPeople == 2 || req.setKindOfPeople == 3) {
// req.scopeOfPeople = this.getScopePeople(req.setKindOfPeople);
// }
// vm.POST("portal/scope", req).then(res => {
openLoading(vm);
vm.POST("portal/new/scope", req).then(res => {
closeLoading(vm);
......@@ -2366,7 +2250,8 @@ export default {
image.src = theFile.target.result;
image.onload = function() {
let _this = this;
if ( false
if (
false
// _this.width != fileLimit.width ||
// _this.height != fileLimit.height
) {
......@@ -2447,10 +2332,6 @@ export default {
this.getRegionOption();
} else if (tabName == "third") {
//设定科室
// if (this.checkTableState.multipleDepartment && this.firstDepartment) {
// this.$refs.multipleDepartment.toggleAllSelection();
// this.firstDepartment = false;
// }
} else if (tabName == "fourth") {
//设定人员
this.formPerson.pageNum = 1;
......@@ -2458,7 +2339,6 @@ export default {
this.formPerson.hospitalName = "";
// this.getHospital();
this.departmentList = this.getDepartmentList();
//console.log('departmentList',this.departmentList);
this.getPeople();
}
},
......@@ -2470,11 +2350,6 @@ export default {
let organizationArea = operationData.treeHandler(allTree, changedTags);
console.log("多级树:", organizationArea);
this.organizationRegion = organizationArea;
//改
// this.organizationRegion = operationData.getOrganizationList(
// this.tagsRegion
// );
//console.log(this.organizationRegion);
}
},
//初始化范围树
......@@ -2500,22 +2375,18 @@ export default {
vm.GET("portal/scope/v1/administrative", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
//console.log(res.data);
let administrativeAll = res.data.administrativeAll;
let administrative = res.data.administrative;
this.treeData = [];
this.treeData[0] = administrativeAll;
this.setTreeData(administrative);
this.getCheckedTree();
//console.log("treeData", this.treeData);
}
});
},
//列举选中地区
initCheckList(allSelectedKeys) {
this.tagsRegion = [];
// console.log(allSelectedKeys);
// console.log(this.$refs.tree.getCheckedNodes());
let nodeData = this.$refs.tree.getCheckedNodes();
for (let i = 0; i < nodeData.length; i++) {
for (let j = 0; j < allSelectedKeys.length; j++) {
......@@ -2533,13 +2404,11 @@ export default {
},
//子节点选中
appendCheck(administrative, checked) {
//console.log(checked,administrative)
let checkList = [];
checkList = this.$refs.tree.getCheckedKeys();
if (checked) {
for (let i = 0; i < administrative.length; i++) {
checkList.push(administrative[i].id);
// console.log(checkList);
}
}
this.$nextTick(function() {
......@@ -2551,7 +2420,6 @@ export default {
console.log("data:", data);
console.log("node:", node);
if (data.children.length == 0) {
//let id = data.id + "add";
let statusValue = 0;
if (node.checked == true) {
statusValue = 1;
......@@ -2564,7 +2432,6 @@ export default {
vm.GET("portal/scope/v1/administrative/children", req).then(res => {
if (res.code == "000000") {
let administrative = res.data.administrative;
//console.log(administrative);
data.children = administrative;
this.appendCheck(administrative, node.checked);
}
......@@ -2589,7 +2456,6 @@ export default {
this.allSelectedKeys = allSelectedKeys;
this.initCheckList(allSelectedKeys);
//console.log("allSelectedKeys", allSelectedKeys);
//改变行政范围后,更新设定机构和设定人员
this.updateOrganizationAndPerson(allSelectedKeys);
this.updatedTree = true;
......@@ -2610,12 +2476,10 @@ export default {
},
//通过key设置tree
setCheckedKeys(tagsRegion) {
console.log(tagsRegion);
let treeKeyList = [];
for (let index = 0; index < tagsRegion.length; index++) {
treeKeyList[index] = tagsRegion[index].key;
}
console.log(treeKeyList);
this.$refs.tree.setCheckedKeys(treeKeyList);
},
......@@ -2631,7 +2495,6 @@ export default {
let req = {};
vm.GET("contents/courseDoctor/listLevels?sysCode=10", req).then(res => {
if (res.code == "000000") {
// console.log(res);
this.organizationRank = operationData.getLevelList(res.data.list);
} else {
this.organizationRank = [
......@@ -2644,13 +2507,10 @@ export default {
});
},
selectableTableList(row, index) {
// if (this.status4Flag == 1) {
if (row.modifyFlag == 1) {
return false;
}
return true;
// }
// return true;
},
selectableTableList2(row, index) {
if (this.status4Flag == 1) {
......@@ -2863,7 +2723,6 @@ export default {
}
}
}
//console.log(scope);
if (scope == "") {
return null;
}
......@@ -2907,7 +2766,6 @@ export default {
tableStatus.forEach(row => {
let idList = [];
idList[0] = row.id;
//console.log('this.changedOrganization2',this.changedOrganization2);
let intersect = operationData.getIntersect(
idList,
this.changedOrganization
......@@ -2932,7 +2790,6 @@ export default {
},
//机构搜索
getOrganizationChoose() {
// console.log('formOrganization',this.formOrganization);
let administrativeIdItem = operationData.setAdministrativeId(
this.formOrganization.administrativeIdList
);
......@@ -2946,7 +2803,6 @@ export default {
scope: this.getScope("administrative")
};
openLoading(vm);
// vm.POST("portal/scope/v1/organization/choose", req).then(res => {
vm.POST("portal/new/scope/org/v1/organization/search", req).then(res => {
closeLoading(vm);
console.log(res);
......@@ -2972,7 +2828,6 @@ export default {
pageSize: this.formOrganization.pageSize
};
openLoading(vm);
// vm.POST("portal/scope/v1/organization", req).then(res => {
vm.POST("portal/new/scope/org/v1/organization", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
......@@ -3011,17 +2866,14 @@ export default {
let scope = "";
//2:去掉 3:选中
if (type == 2) {
// console.log(this.scopeOfOrganizationLast,this.changedOrganization);
let differenceScope = operationData.getDifference(
this.scopeOfOrganizationLast,
this.changedOrganization
);
//console.log('differenceScope',differenceScope);
let unionScope = operationData.getUnion(
this.changedOrganization2,
differenceScope
);
//console.log('unionScope',unionScope);
for (let i = 0; i < unionScope.length; i++) {
scope += unionScope[i] + "|";
}
......@@ -3052,7 +2904,6 @@ export default {
this.scopeOfPeopleLast,
this.changedPerson
);
//console.log('differenceScope',differenceScope);
let unionScope = operationData.getUnion(
this.changedPerson2,
differenceScope
......@@ -3061,7 +2912,6 @@ export default {
scope += unionScope[i] + "|";
}
} else if (type == 3) {
//console.log(this.changedPerson2,this.scopeOfPeople);
let differenceScope = operationData.getDifference(
this.scopeOfPeopleLast,
this.changedPerson2
......@@ -3156,7 +3006,6 @@ export default {
},
//人员搜索
getPeopleChoose() {
// console.log('formOrganization',this.formOrganization);
let req = {
projectId: this.projectId,
pageNum: this.formPerson.pageNum,
......@@ -3167,7 +3016,6 @@ export default {
scopeOfDepartment: this.getScopeDepartment()
};
openLoading(vm);
// vm.POST("portal/scope/v1/people/choose", req).then(res => {
vm.POST("portal/new/scope/doctor/v1/doctor/search", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
......@@ -3201,11 +3049,9 @@ export default {
pageSize: this.formPerson.pageSize
};
openLoading(vm);
// vm.POST("portal/scope/v1/people", req).then(res => {
vm.POST("portal/new/scope/doctor/v1/doctor", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
console.log(res);
this.tablePerson = res.data.people;
this.totalPerson = res.data.total;
vm.initPeopleStatus();
......@@ -3264,7 +3110,6 @@ export default {
//选择小生态
selectChangeEcology(value) {
this.formEcology.pageNum = 1;
//console.log('select',value);
for (let i = 0; i < this.ecologySelect.length; i++) {
if (this.ecologySelect[i].value == value) {
this.checkedEcology = this.ecologySelect[i].label;
......@@ -3275,16 +3120,16 @@ export default {
},
getEcologySelect() {
let req = {};
vm
.GET("portal/scope/v1/" + this.projectId + "/ecology", req)
.then(res => {
vm.GET("portal/scope/v1/" + this.projectId + "/ecology", req).then(
res => {
console.log("查询小生态列表", res);
this.ecologySelect = operationData.getEcologySelect(res.data.list);
if (res.data.chooseIdList.length > 0) {
this.formEcology.ecology = res.data.chooseIdList[0];
this.getEcology();
}
});
}
);
},
initEcology() {
let tableStatus = this.tableEcology;
......@@ -3317,9 +3162,8 @@ export default {
let req = {};
req = this.formEcology;
openLoading(vm);
vm
.GET("portal/scope/v1/" + this.projectId + "/organization", req)
.then(res => {
vm.GET("portal/scope/v1/" + this.projectId + "/organization", req).then(
res => {
closeLoading(vm);
console.log("根基小生态查询机构列表信息", res);
this.tableEcology = res.data.organizationList;
......@@ -3329,35 +3173,32 @@ export default {
tableStatus.forEach(row => {
this.$refs.multipleEcology.toggleRowSelection(row);
});
});
}
);
},
// 获取圈子列表
getCircleList() {
vm
.GET("circle/portal/circle/list", {})
.then(res => {
// console.log("查询小圈列表", res);
this.circleList = res.data;
});
vm.GET("circle/portal/circle/list", {}).then(res => {
this.circleList = res.data;
});
},
// 获取圈子数据
getCircleData() {
vm
.GET("portal/portalMicroEcology/relation/query", { projectId: this.projectId })
.then(res => {
// console.log("获取圈子数据", res);
if (res.code == "000000" && res.data) {
this.formCircle.microecologyId = res.data.microecologyId;
this.formCircle.groupType = res.data.groupType;
this.formCircle.groupIds = res.data.groupIds;
}
});
vm.GET("portal/portalMicroEcology/relation/query", {
projectId: this.projectId
}).then(res => {
if (res.code == "000000" && res.data) {
this.formCircle.microecologyId = res.data.microecologyId;
this.formCircle.groupType = res.data.groupType;
this.formCircle.groupIds = res.data.groupIds;
}
});
},
// 提交、修改圈子数据
sendCircleData(type = 'next') {
sendCircleData(type = "next") {
const { microecologyId, groupType, groupIds } = this.formCircle;
if (!microecologyId) {
if (type == 'next') {
if (type == "next") {
vm.$message({
type: "info",
message: "请选择关联小圈"
......@@ -3374,24 +3215,26 @@ export default {
projectId: this.projectId,
microecologyId,
groupType,
groupIds: groupType === 1 ? [0] : groupIds,
}
groupIds: groupType === 1 ? [0] : groupIds
};
openLoading(vm);
vm.POST("portal/portalMicroEcology/relation/saveOrUpdate", postData).then(res => {
closeLoading(vm);
if (res.code == "000000") {
if (type == 'next') {
this.active++;
this.stepData = [false, false, true];
this.tagDrop();
} else {
vm.$message({
type: "info",
message: "成功"
});
vm.POST("portal/portalMicroEcology/relation/saveOrUpdate", postData).then(
res => {
closeLoading(vm);
if (res.code == "000000") {
if (type == "next") {
this.active++;
this.stepData = [false, false, true];
this.tagDrop();
} else {
vm.$message({
type: "info",
message: "成功"
});
}
}
}
});
);
},
//机构table修改
handleSizeOrganization(val) {
......@@ -3400,7 +3243,6 @@ export default {
this.searchOrganization();
},
handleCurrentOrganization(val) {
//console.log(`当前页: ${val}`);
this.formOrganization.pageNum = val;
if (this.searchOrganizationType == "choose") {
this.getOrganizationChoose();
......@@ -3450,9 +3292,7 @@ export default {
},
//scope的不同status操作
scopeStatus(data) {
//console.log('范围提交status:'+data);
let status = data;
//console.log('范围提交status:'+status);
if (status === 0) {
this.flagCover = 0;
} else if (status === 1) {
......@@ -3477,7 +3317,6 @@ export default {
//选择项目组件
//改变组件选择情况
changeValue(value) {
//console.log('value',value,'optionsComponent',this.optionsComponent);
this.tagsComponent = [];
let len = 0;
for (let i = 0; i < value.length; i++) {
......@@ -3491,11 +3330,9 @@ export default {
}
}
}
//console.log('this.tagsComponent',this.tagsComponent);
vm.tagDrop();
},
initTags(value) {
//console.log('value',value,'optionsComponent',this.optionsComponent);
this.tagsComponent = [];
let len = 0;
for (let i = 0; i < value.length; i++) {
......@@ -3519,13 +3356,11 @@ export default {
if (tag.disabled == true) {
return;
}
// if (this.projectStatus == 1 || this.projectStatus == 2) {
this.tagsComponent.splice(this.tagsComponent.indexOf(tag), 1);
this.formComponent.component = [];
for (let j = 0; j < this.tagsComponent.length; j++) {
this.formComponent.component[j] = this.tagsComponent[j].value;
}
// }
},
addCertificate() {
if (vm.formExam.exam.length == 5) {
......@@ -3768,10 +3603,6 @@ export default {
//校验考试通过平均分配置
checkCertificate() {
// if(vm.formComponent.configure == 2) {
// return true;
// }
console.log(vm.formExam.exam);
if (vm.formExam.passType == 2) {
if (vm.formComponent.passExamCount == "") {
this.customError.passExamCount = {
......@@ -3897,32 +3728,8 @@ export default {
className: "",
error: ""
};
//checkIdList[i] = vm.formExam.exam[i].certificateId;
this.$set(vm.formExam.exam, i, vm.formExam.exam[i]);
}
// 判断证书不能重复
// checkIdList = checkIdList.sort();
// for(let j=0;j<checkIdList.length-1;j++) {
// if (checkIdList[j] == checkIdList[j+1]) {
// //vm.$message('证书不能重复选择');
// this.$message({
// message: '请重新选择,不能出现重复证书',
// type: 'warning'
// });
// return false;
// }
// }
// 考试门数必须相同
// for(let i=0;i<vm.formExam.exam.length-1;i++) {
// if (vm.formExam.exam[i].examCount != vm.formExam.exam[i+1].examCount) {
// // vm.$message('考试门数必须相同');
// this.$message({
// message: '考试门数必须相同',
// type: 'warning'
// });
// return false;
// }
// }
} else {
if (this.formComponent.certificate == "") {
vm.customError.certificate = {
......@@ -3934,19 +3741,12 @@ export default {
}
} else if (vm.formExam.certificateType == 1) {
//组件通过即发放 证书必填
// if(vm.formComponent.configure == 1 && vm.formExam.certificateType == 1) {
// if(vm.formComponent.certificate == '') {
// vm.$message('证书不能为空!');
// return false;
// }
// }
}
return true;
},
blurName() {
vm.visibleName = false;
setTimeout(function() {
// console.log('失去焦点');
vm.submitForm("formData");
}, 200);
},
......@@ -3969,18 +3769,17 @@ export default {
}
},
checkDefault() {
// vm.formData.organizationNameList[0] = vm.organizationContent;
vm.formData.organizationNameList.splice(this.orgListIndex, 1, vm.organizationContent);
// vm.formData.organizationNameList.push(vm.organizationContent);
// vm.formData.organizationName = vm.organizationContent;
vm.formData.organizationNameList.splice(
this.orgListIndex,
1,
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];
......@@ -4006,11 +3805,6 @@ export default {
vm.dialogWarn = false;
this.$refs.tree.setChecked(vm.nowCheck, false, true);
vm.initCheckList(vm.getTreeCheck());
// for(let i=0;i<vm.tagsRegion.length;i++) {
// if(vm.tagsRegion[i].key == vm.nowCheck.id) {
// vm.tagsRegion.splice(i,1);
// }
// }
},
closeFail() {
vm.dialogFail = false;
......
......@@ -61,7 +61,9 @@
dynamicFlag: '',
idType: localStorage.getItem("storageIdType"),
roleType: null,
type: 0
type: 0,
deptId: "",
allowShare: 1
}
}
},
......@@ -143,11 +145,11 @@
// 修改编辑基础信息
returnIsNext(flag) {
if (flag == true) {
this.commitQuanziInfo();
vm.commitQuanziInfo();
}
},
returnTypeData(item) {
this.formData[item.name] = item.val
vm.formData[item.name] = item.val
},
//获取圈子详情
getCircleInfo() {
......@@ -155,15 +157,18 @@
// closeLoading(this);
if (res.code == "000000") {
this.formData = { ...this.formData, ...res.data };
if(vm.formData.deptId == 0){
vm.formData.deptId = "";
}
} else {
this.$message(res.message);
vm.$message(res.message);
}
}).catch(err => {
this.$message.error('请求失败');
vm.$message.error('请求失败');
});
},
commitQuanziInfo() {
let req = this.formData;
let req = vm.formData;
console.log("commitQuanziInfo() : name = " + req.name + ", headUrl = " + req.headUrl
+ ", coverUrl = " + req.coverUrl + ", introduce = " + req.introduce + ", dynamicFlag = " + req.dynamicFlag)
vm.POST("circle/circle/save", req).then(res => {
......
......@@ -122,7 +122,7 @@
},
created() {
this.initPrivilege();
this.search();
this.search(1);
},
methods: {
......@@ -167,16 +167,17 @@
},
// 搜索
search(){
search(first){
this.searchForm.pageNo = 1;
this.searchList();
this.searchList(first);
},
searchList() {
openLoading(this);
searchList(first) {
if(!first) {
console.log('查询圈子')
openLoading(this);
}
let params = this.searchForm;
console.log('查询圈子')
applyList(params).then((res) => {
closeLoading(this);
if(res.code == "000000") {
......
......@@ -135,8 +135,8 @@
</template>
<script>
import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "@/components/breadcrumb.vue";
import { getRangeList,updateRangeStatus, getCircleSettingList, saveCircleSetting} from "../../utils/yqrange/yqrangeApi";
import BreadCrumb from "@/components/breadcrumb.vue";
import { getRangeList,updateRangeStatus, getCircleSettingList, saveCircleSetting} from "../../utils/yqrange/yqrangeApi";
import ElTabPane from "element-ui/packages/tabs/src/tab-pane";
import RangeApply from "./range-apply";
export default {
......@@ -401,7 +401,6 @@ export default {
// 应用配置
setting(row){
this.dialogSettingVisible = true;
this.settingForm.circleId = row.id;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册