Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
be85e2b7
提交
be85e2b7
编写于
9月 19, 2019
作者:
zhentian.jia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
项目编辑页重构
上级
33f767d8
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
178 行增加
和
105 行删除
+178
-105
edit-manager.vue
src/views/education/edit-manager.vue
+178
-97
item-shield.vue
src/views/education/item-shield.vue
+0
-8
未找到文件。
src/views/education/edit-manager.vue
浏览文件 @
be85e2b7
...
...
@@ -272,6 +272,7 @@
<span>
{{
node
.
label
}}
</span>
<span>
<el-button
v-if=
"node.level
<
5
"
type=
"text"
icon=
"el-icon-caret-bottom"
size=
"small"
...
...
@@ -298,25 +299,23 @@
<el-tab-pane
label=
"设定机构"
name=
"second"
>
<el-form
:inline=
"true"
:model=
"formOrganization"
class=
"demo-form-inline"
>
<el-form-item
label
>
<!--
<el-select
size=
"small"
v-model=
"formOrganization.administrativeId"
placeholder=
"全部地区"
v-if=
"idType != 2"
>
<el-option
v-for=
"item in organizationRegion"
:key=
"item.id"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
-->
<el-cascader
<!--
<el-cascader
v-if=
"idType != 2"
size=
"small"
expand-trigger=
"hover"
:options=
"organizationRegion"
v-model=
"formOrganization.administrativeIdList"
></el-cascader>
-->
<el-cascader
size=
"small"
ref=
"cascaderRegion"
:options=
"optionsRegion"
:props=
"props"
v-model=
"formOrganization.administrativeIdList"
@
change=
"handleChangeRegion"
filterable
change-on-select
placeholder=
"请选择地区"
></el-cascader>
</el-form-item>
<el-form-item>
...
...
@@ -336,7 +335,7 @@
<el-button
size=
"small"
type=
"primary"
@
click=
"searchOrganization()"
>
搜索
</el-button>
</el-form-item>
<el-form-item
style=
"float:right;"
>
<el-button-group>
<
!--
<
el-button-group>
<el-button
size=
"small"
type=
"default"
...
...
@@ -347,7 +346,23 @@
type=
"default"
@
click=
"checkAll(false,'multipleOrganization')"
>
全部不选
</el-button>
</el-button-group>
</el-button-group>
-->
<el-upload
v-if=
"idType == 1 && status4Flag != 1"
class=
"upload-excel"
action=
"#"
accept=
".xlsx"
multiple
:limit=
"1"
:before-upload=
"uploadOrganization"
>
<el-button
size=
"small"
>
导入机构名单
</el-button>
<el-button
class=
"down-button"
slot=
"tip"
size=
"small"
@
click=
"download('organization')"
>
下载导入模板
</el-button>
</el-upload>
<div
v-if=
"idType == 1 && status4Flag == 1"
>
<el-button
size=
"small"
@
click=
"dialogUpload = true"
>
导入机构名单
</el-button>
<el-button
class=
"down-button"
slot=
"tip"
size=
"small"
@
click=
"download('organization')"
>
下载导入模板
</el-button>
</div>
</el-form-item>
</el-form>
<el-table
...
...
@@ -357,6 +372,8 @@
tooltip-effect=
"dark"
style=
"width: 100%"
@
selection-change=
"selectionChangeOrganization"
@
select-all=
"selectAllOrganization"
@
select=
"selectOrganization"
:row-key=
"getRowKeys"
>
<el-table-column
...
...
@@ -587,11 +604,27 @@
<el-button
type=
"primary"
size=
"small"
@
click=
"coverData()"
>
确定
</el-button>
</span>
</el-dialog>
<el-dialog
title=
"提醒"
:visible
.
sync=
"dialogWarn"
width=
"30%"
center
>
<p
v-if=
"warnType == 0"
>
该项目
</p>
<el-dialog
title=
"提醒"
:visible
.
sync=
"dialogWarn"
width=
"30%"
center
:show-close=
"false"
:close-on-click-modal=
"false"
>
<p
v-if=
"warnType == 0"
>
该项目
为上架状态,确定要增加“行政范围”吗?
</p>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogWarn = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"openDialog()"
>
确定增加
</el-button>
<el-button
@
click=
"closeCheck()"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogWarn = false"
>
确定增加
</el-button>
</span>
</el-dialog>
<el-dialog
title=
"提醒"
:visible
.
sync=
"dialogUpload"
width=
"30%"
center
>
<p
style=
"text-align:center"
>
该项目为上架状态,确定要导入机构名单吗?
</p>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-upload
class=
"upload-excel"
action=
"#"
accept=
".xlsx"
multiple
:limit=
"1"
:before-upload=
"uploadOrganization"
>
<el-button
class=
"down-button-close"
slot=
"tip"
size=
"small"
@
click=
"dialogUpload = false"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"small"
>
继续导入
</el-button>
</el-upload>
</span>
</el-dialog>
</div>
...
...
@@ -749,6 +782,7 @@ import { mapGetters } from "vuex";
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
*
as
commonUtil
from
"../../utils/utils"
;
import
*
as
operationData
from
"../../utils/operation"
;
import
{
getExeclUrl
}
from
"@/utils/index"
;
import
Sortable
from
'sortablejs'
let
vm
=
null
;
...
...
@@ -778,7 +812,7 @@ export default {
curmbSecond: "
新建项目
",
//页面展示位置
stepData: [true, false, false],
active:
0
,
active:
1
,
activeName: "
first
",
//基层信息 数据
uploadImgMessage: false,
...
...
@@ -960,6 +994,42 @@ export default {
//v2.2.0更新
dialogWarn: false,
warnType: 0,
nowCheck: {},
administrativeValue: '',
optionsRegion: [],
dialogUpload: false,
props: {
lazy: true,
lazyLoad(node, resolve) {
const { level } = node;
console.log("
node
", node);
if (node.level == 1) {
let req = {
provinceId: node.data.value
};
vm.GET("
basic
-
data
/
position
/
cities
", req).then(res => {
let newData = vm.setMoreOption(res.data.cityList, "
cities
");
resolve(newData);
});
} else if (node.level == 2) {
let req = {
cityId: node.data.value
};
vm.GET("
basic
-
data
/
position
/
counties
", req).then(res => {
let newData = vm.setMoreOption(res.data.countyList, "
counties
");
resolve(newData);
});
} else if (node.level == 3) {
let req = {
countyId: node.data.value
};
vm.GET("
basic
-
data
/
position
/
towns
", req).then(res => {
let newData = vm.setMoreOption(res.data.townList, "
towns
");
resolve(newData);
});
}
}
},
//校验工具 数据
rulesComponent: {
component: [
...
...
@@ -1892,6 +1962,7 @@ export default {
this.activeName = "
second
";
this.getOrganization();
this.getCheckedTree();
this.getRegionOption();
}
}
},
...
...
@@ -1907,6 +1978,7 @@ export default {
this.getCheckedTree();
this.getOrganization();
// this.listLevels();
this.getRegionOption();
} else if (tabName == "
third
") {
//设定科室
// if (this.checkTableState.multipleDepartment && this.firstDepartment) {
...
...
@@ -2038,20 +2110,6 @@ export default {
console.log(this.$refs.tree.getCheckedKeys());
},
onChecked() {
// let cData = [],
// oldData = (this.treeData.length && this.treeData.slice()) || [],
// checkedKeys = this.$refs.tree.getCheckedKeys(),
// halfCheckedKeys = this.$refs.tree.getHalfCheckedKeys(),
// savedCheckedKeys = this.handlerCheckedData(oldData, checkedKeys).map(
// key => {
// return { type: 1, key: key };
// }
// ),
// savedHalfCheckedKeys = halfCheckedKeys.map(key => {
// return { type: 2, key: key };
// }),
// allSelectedKeys = savedCheckedKeys.concat(savedHalfCheckedKeys);
//重构归并树
let checkedTree = operationData.getSimpleCheckedNodes(this.$refs.tree.store);
let halfCheckedTree = this.$refs.tree.getHalfCheckedKeys()
...
...
@@ -2066,21 +2124,6 @@ export default {
this.updatedTree = true;
},
getTreeCheck() {
// let cData = [],
// oldData = (this.treeData.length && this.treeData.slice()) || [],
// checkedKeys = this.$refs.tree.getCheckedKeys(),
// halfCheckedKeys = this.$refs.tree.getHalfCheckedKeys(),
// savedCheckedKeys = this.handlerCheckedData(oldData, checkedKeys).map(
// key => {
// return { type: 1, key: key };
// }
// ),
// savedHalfCheckedKeys = halfCheckedKeys.map(key => {
// return { type: 2, key: key };
// }),
// allSelectedKeys = savedCheckedKeys.concat(savedHalfCheckedKeys);
// // console.log('allSelectedKeys值:',allSelectedKeys)
//重构归并树
let checkedTree = operationData.getSimpleCheckedNodes(this.$refs.tree.store);
let halfCheckedTree = this.$refs.tree.getHalfCheckedKeys()
...
...
@@ -2089,41 +2132,6 @@ export default {
//重构内容
return allSelectedKeys;
},
// 递归删除列表中所有子节点
delSubKeysByNode(node, checkedKeys) {
let idIndex;
if (node.children && node.children.length) {
if (node.children && node.children.length) {
node.children.forEach(elm => {
idIndex = checkedKeys.findIndex(id => {
return id === elm.id;
});
if (idIndex > -1) {
checkedKeys.splice(idIndex, 1);
}
if (elm.children && elm.children.length) {
this.delSubKeysByNode(elm, checkedKeys);
}
});
}
}
},
// 去除子节点
handlerCheckedData(oldData, checkedKeys) {
oldData.forEach(element => {
for (let i = 0; i < checkedKeys.length; i++) {
// 如果此节点被选中,则删除所有子节点
if (element.id === checkedKeys[i]) {
this.delSubKeysByNode(element, checkedKeys);
} else {
if (element.children && element.children.length) {
this.handlerCheckedData(element.children, checkedKeys);
}
}
}
});
return checkedKeys;
},
//通过key设置tree
setCheckedKeys(tagsRegion) {
console.log(tagsRegion);
...
...
@@ -2142,15 +2150,6 @@ export default {
this.setCheckedKeys(this.tagsRegion);
}
},
//获取反选数据
getDifference(a, b) {
if (a.constructor === Array && b.constructor === Array) {
let set1 = new Set(a);
let set2 = new Set(b);
return Array.from(new Set([...set1].filter(x => !set2.has(x))));
}
return null;
},
//获取医院等级
listLevels() {
let req = {};
...
...
@@ -2172,6 +2171,9 @@ export default {
//console.log("
scopeReq
",this.scopeReq);
return false;
}
if(row.id == 1200) {
return false;
}
return true;
}
return true;
...
...
@@ -3438,12 +3440,84 @@ export default {
},
//v2.2教培更新
checkUpdate(data,flag) {
if(vm.status4Flag == 1) {
if(vm.status4Flag == 1
&& flag == true
) {
console.log(data,flag,vm.status4Flag);
// vm.
this.$refs.tree.setChecked(data,false)
vm.nowCheck = data;
vm.warnType = 0;
vm.dialogWarn = true;
// this.$refs.tree.setChecked(data,false)
}
},
closeCheck() {
vm.dialogWarn = false;
this.$refs.tree.setChecked(vm.nowCheck,false);
for(let i=0;i<vm.tagsRegion.length;i++) {
if(vm.tagsRegion[i].key == vm.nowCheck.id) {
vm.tagsRegion.splice(i,1);
}
}
},
uploadOrganization(file) {
},
download(type) {
let downloadUrl = "";
if (type == "
organization
") {
downloadUrl = getExeclUrl(
"
%
E6
%
95
%
99
%
E5
%
9
F
%
B9
%
E9
%
A1
%
B9
%
E7
%
9
B
%
AE
%
E8
%
A7
%
92
%
E8
%
89
%
B2
%
E5
%
AF
%
BC
%
E5
%
85
%
A5
%
E6
%
A8
%
A1
%
E6
%
9
D
%
BF
.
xlsx
"
);
}
setTimeout(() => {
window.open(downloadUrl);
}, 500);
},
handleChangeRegion(value) {
let areaId = '000';
for(let i=0;i<value.length;i++) {
areaId += '_'+value[i];
}
vm.administrativeValue = areaId;
console.log(value,vm.administrativeValue);
},
setMoreOption(data, type) {
let option = [];
for (let i = 0; i < data.length; i++) {
let obj = data[i];
if (type == "
cities
") {
obj.label = data[i].cityName;
obj.value = data[i].cityId;
} else if (type == "
counties
") {
obj.label = data[i].countyName;
obj.value = data[i].countyId;
// obj.leaf = true;
} else if (type == "
towns
") {
obj.label = data[i].townName;
obj.value = data[i].townId;
obj.leaf = true;
}
option.push(obj);
}
return option;
},
//获取地区
getRegionOption() {
let req = {};
openLoading(vm);
vm.GET("
basic
-
data
/
position
/
provinces
", req).then(res => {
closeLoading(vm);
if (res.code == "
000000
") {
vm.optionsRegion = operationData.setRegionOption2(
res.data.provinceList
);
}
});
},
selectAllOrganization(selection) {
console.log('selectAll',selection)
},
selectOrganization(selection, row) {
console.log('select',selection,row)
},
}
};
</
script
>
...
...
@@ -3664,6 +3738,13 @@ export default {
color
:
#d4edfe
;
}
}
.down-button
{
margin-left
:
10px
;
}
.down-button-close
{
margin-left
:
100px
;
float
:
left
;
}
}
.third-step
{
margin
:
30px
0
0px
30px
;
...
...
src/views/education/item-shield.vue
浏览文件 @
be85e2b7
...
...
@@ -11,14 +11,6 @@
<el-form
:model=
"formInline"
ref=
"formInline"
label-width=
"75px"
class=
"form-inline"
>
<el-col
:span=
"6"
v-if=
" shieldType == 0"
>
<el-form-item
label=
"地区:"
>
<!--
<el-select
size=
"small"
v-model=
"formInline.administrativeId"
placeholder=
"请选择地区"
>
<el-option
v-for=
"(item, index) in areaList"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
-->
<el-cascader
size=
"small"
ref=
"cascaderRegion"
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录