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