@@ -182,6 +183,9 @@ const getMenuTree = (type,id) => {
if (type == 1) { // 删除数据后默认选中父节点或第一个节点
state.menuTree && state.menuTree.setCurrentKey(state.selectParentData.menu_id);
handleNodeClick(state.selectParentData);
+ nextTick().then(() => {
+ setScroll()
+ })
}else {
state.menuTree && state.menuTree.setCurrentKey(state.data[0].menu_id);
handleNodeClick(state.data[0]);
@@ -193,6 +197,9 @@ const getMenuTree = (type,id) => {
if (state.selectData) {
state.menuTree && state.menuTree.setCurrentKey(state.selectData.menu_id);
handleNodeClick(state.selectData);
+ nextTick().then(() => {
+ setScroll()
+ })
}else {
state.menuTree && state.menuTree.setCurrentKey(state.data[0].menu_id);
handleNodeClick(state.data[0]);
@@ -205,7 +212,21 @@ const getMenuTree = (type,id) => {
}
})
} // 获取菜单树
-
+const setScroll = () => {
+ setTimeout(()=> {
+ var nodeOffsetTop = document.querySelector(
+ ".file-tree .is-current"
+ ).offsetTop
+ var treeScroll = document.querySelector(
+ ".tree"
+ )
+ var parentHeight = treeScroll.clientHeight
+
+ if (nodeOffsetTop > parentHeight) {
+ treeScroll.scrollTop = nodeOffsetTop - parentHeight / 2
+ }
+ },300)
+}
const findData = (arr,id) => {
arr.forEach(e => {
if (e.menu_id == id) {
@@ -309,6 +330,8 @@ const fileAction = (val,data,parent,disabled=false) => {
level: data.level, // 当前的level
p_menu_type: parent ? parent.menu_type : 0, // 父级的类型,用于判断菜单下不能建目录
system_type: "", // 系统类型
+ new_window: 0,
+ remark: "",
}
state.menuTree.insertAfter(newChild,parent? parent.Child[parent.Child.length-1] : state.data[state.data.length -1])
state.menuTree && state.menuTree.setCurrentKey(newChild.menu_id);
@@ -331,6 +354,8 @@ const fileAction = (val,data,parent,disabled=false) => {
p_menu_type: data.menu_type,
level: data.level + 1,
system_type: "", // 系统类型
+ new_window: 0,
+ remark: "",
}
state.menuTree.append(newChild,data)
state.menuTree && state.menuTree.setCurrentKey(newChild.menu_id);
@@ -338,11 +363,15 @@ const fileAction = (val,data,parent,disabled=false) => {
state.selectParentData = data
state.newMenuId++
}else if (val == 3) { // 删除菜单
- if (data.state == 1) {
- ElMessage.error("删除内容中有启用状态的数据,不可删除!")
- return
+ if (data.id) {
+ if (data.state == 1) {
+ ElMessage.error("删除内容中有启用状态的数据,不可删除!")
+ return
+ }
+ state.delDialog = true
+ }else {
+ state.delDialog = true
}
- state.delDialog = true
}else if (val == 4) { // 菜单上移
if (disabled) {
@@ -395,19 +424,33 @@ const fileAction = (val,data,parent,disabled=false) => {
} // 各种操作按钮
const deleteData = () => {
- axios
- .delete(`/apaas/system/v5/menu/${state.selectData.id}`)
- .then((res) => {
- if (res.data.code == 200) {
- ElMessage.success(res.data.msg)
- state.selectData = null
- let type = state.selectParentData ? 1 : 2 // 1--有父级 2--无父级
- getMenuTree(type)
- state.delDialog = false
- }else {
- ElMessage.error(res.data.data)
- }
- })
+ if (state.selectData.id) {
+ axios
+ .delete(`/apaas/system/v5/menu/${state.selectData.id}`)
+ .then((res) => {
+ if (res.data.code == 200) {
+ ElMessage.success(res.data.msg)
+ state.selectData = null
+ let type = state.selectParentData ? 1 : 2 // 1--有父级 2--无父级
+ getMenuTree(type)
+ state.delDialog = false
+ }else {
+ ElMessage.error(res.data.data)
+ }
+ })
+ }else {
+ state.menuTree.remove(state.selectData)
+ state.selectData = null
+ let type = state.selectParentData ? 1 : 2 // 1--有父级 2--无父级
+ if (type == 1) {
+ state.menuTree && state.menuTree.setCurrentKey(state.selectParentData.menu_id);
+ handleNodeClick(state.selectParentData);
+ }else {
+ state.menuTree && state.menuTree.setCurrentKey(state.data[0].menu_id);
+ handleNodeClick(state.data[0]);
+ }
+ state.delDialog = false
+ }
}
const changeSort = (data,nextObj) => {
@@ -449,6 +492,8 @@ const saveMenu = (el,type) => {
menu_logo: el.menuForm.menu_logo,
source: el.menuForm.menu_type == 0 ? "" : el.menuForm.source,
system_type: el.menuForm.system_type,
+ new_window: el.menuForm.new_window,
+ remark: el.menuForm.remark,
}
if (state.selectData.id) { // 编辑
axios
diff --git a/src/page/main/develop/menu/menu-form.vue b/src/page/main/develop/menu/menu-form.vue
index 73310adb3a204c429b7d684dbd016dd3ddc583b0..0b476f548b4d464da2f2f6fce131e896d9281707 100644
--- a/src/page/main/develop/menu/menu-form.vue
+++ b/src/page/main/develop/menu/menu-form.vue
@@ -28,6 +28,15 @@
/>
+
+
+ 当前窗口
+ 新窗口
+
+
+
+
+
-
-
+
+
-
-
+
+
@@ -43,12 +43,28 @@ import bgBreadcrumb from "@/components/bg-breadcrumb.vue";
const router = useRouter()
const route = useRoute()
const formRef = ref(null);
+
+const checkPhone = (rule,value,callback) => {
+ let reg = /^((1[0-9]{10})|(((([0-9]{3}-)?[0-9]{8})|(([0-9]{4}-)?[0-9]{7}))(-[0-9]{1,4})?))$/
+ if (value !== '') {
+ console.log(1)
+ if (!reg.test(value)) {
+ console.log(2)
+ callback(new Error("电话号码格式不正确,请重新输入"))
+ }else {
+ console.log(3)
+ callback()
+ }
+ }else {
+ callback()
+ }
+}
const state = reactive({
formData: {
company_name: "",
company_address: "",
- company_logo: [],
- company_phone: ""
+ logo: [],
+ contact_phone: ""
},
formRules: {
company_name: [
@@ -58,40 +74,52 @@ const state = reactive({
company_address: [
],
- company_logo: [
+ logo: [
],
- company_phone: [
-
+ contact_phone: [
+ { validator: checkPhone, trigger: "blur"}
],
}
})
const getFootInfo = () => {
- // axios
- // .get(`/apaas/system/v5/banner/${id}`)
- // .then(res => {
- // if (res.data.code == 200) {
- // const data = res.data.data
- // bannerFormRef.value.setForm({
- // company_name: data.company_name,
- // company_address: data.company_address,
- // company_logo: data.company_logo ? [{url: data.company_logo}] : [],
- // company_phone: data.company_phone
- // })
- // }else {
- // ElMessage.error(res.data.data)
- // }
- // })
- // .catch(err => {
- // console.log(err)
- // })
+ axios
+ .get(`/apaas/system/v5/config/get`)
+ .then(res => {
+ if (res.data.code == 200) {
+ const data = res.data.data
+ state.formData = {
+ company_name: data.company_name,
+ company_address: data.company_address,
+ logo: data.logo ? [{url: data.logo}] : [],
+ contact_phone: data.contact_phone
+ }
+ }else {
+ ElMessage.error(res.data.data)
+ }
+ })
+ .catch(err => {
+ console.log(err)
+ })
}
const submit = () => {
formRef.value.validate((valid, fields) => {
if (valid) {
-
+ let params = {
+ ...state.formData,
+ logo: state.formData.logo && state.formData.logo.length > 0 ? state.formData.logo[0].url : '',
+ }
+ axios
+ .post(`/apaas/system/v5/config/set`,params)
+ .then(res => {
+ if (res.data.code == 200) {
+ ElMessage.success(res.data.msg)
+ }else {
+ ElMessage.error(res.data.data)
+ }
+ })
}
})
}
@@ -139,6 +167,18 @@ const {
.form {
.el-form-item {
display: block;
+ :deep().bg-upload {
+ .el-upload--picture-card {
+ width: 80px;
+ height: 80px;
+ background-color: #fff;
+ border: 1px solid #dadee7;
+ }
+ .el-upload-list--picture-card .el-upload-list__item {
+ width: 80px;
+ height: 80px;
+ }
+ }
}
}
}
diff --git a/src/page/main/home-config/recommend/edit/index.vue b/src/page/main/home-config/recommend/edit/index.vue
index d1d994ae2b4241e73fc1ca6beff4a482519d51ff..cee76053b16f9c89345a168785a64c464162d8db 100644
--- a/src/page/main/home-config/recommend/edit/index.vue
+++ b/src/page/main/home-config/recommend/edit/index.vue
@@ -3,8 +3,34 @@
-
-
+
+
+
+
+ 已选择能力(0/9)
+
+
+
+
+
+
+
+ 是否启用
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ data.name }}
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+ {{item.name}}
+
+
+ 已选择
+ ({{selection.length}}/9)
+ 项
+ 清空
+
+
+
+
+
+
+
+
+
+
+ 取 消
+ 确 定
+
+
+
@@ -144,7 +497,44 @@ const {
display: flex;
flex-direction: column;
overflow: auto;
- padding: 24px;
+ padding: 30px 40px 20px;
+ .ability_select {
+ .title {
+ font-size: 14px;
+ color: #202531;
+ margin-bottom: 6px;
+ &::before {
+ content: "*";
+ color: var(--el-color-danger);
+ margin-right: 4px;
+ }
+ }
+ .select_arr {
+ width: 1200px;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ .empty_card {
+ cursor: pointer;
+ width: 384px;
+ height: 242px;
+ border: 1px dashed #dadee7;
+ border-radius: 4px;
+ margin-bottom: 24px;
+ color: #dadee7;
+ text-align: center;
+ line-height: 242px;
+ font-size: 48px;
+ font-weight: 100;
+ }
+ }
+ }
+ .state_box {
+ font-size: 14px;
+ span {
+ margin-right: 16px;
+ }
+ }
}
.content_bottom {
height: 68px;
@@ -157,5 +547,113 @@ const {
}
}
}
+ .select_dialog {
+ .select_box {
+ width: 100%;
+ height: 680px;
+ .topFilter {
+ height: 68px;
+ padding: 16px;
+ border-bottom: 1px solid #e6e9ef;
+ display: flex;
+ font-size: 14px;
+ align-items: center;
+ flex-direction: row-reverse;
+ // .left {
+ // width: 240px;
+ // padding-left: 15px;
+ // color: #404a62;
+ // .num {
+ // color: #202531;
+ // font-weight: 700;
+ // margin: 0 3px;
+ // }
+ // }
+ .right {
+ width: 912px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .el-button {
+ margin: 0;
+ width: 64px;
+ }
+ }
+ }
+ .table_box {
+ padding: 10px 0;
+ height: calc(100% - 68px);
+ background-color: #f8f9fb;
+ .collation{
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+ padding: 6px 16px 16px;
+ font-size: 14px;
+ color: #202531;
+
+ .collation-text{
+ font-size: 14px;
+ color: #404a62;
+ margin-right: 32px;
+ position: relative;
+ cursor: pointer;
+
+ &::after{
+ content: '';
+ display: block;
+ position: absolute;
+ top: 2px;
+ right: -16px;
+ width: 1px;
+ cursor:auto;
+ height: 16px;
+ background-color: #cbced7;
+ }
+
+ &:nth-last-of-type(1)::after{
+ display: none;
+ }
+ }
+ .current{
+ color:#3759be!important;
+ }
+ .can_click_text {
+ margin-left: 24px;
+ }
+ }
+ .user_table {
+ max-height: calc(100% - 31px);
+ padding: 0 16px;
+ :deep().bg-table {
+ .el-scrollbar {
+ --el-scrollbar-bg-color: #fff
+ }
+ .el-table__empty-block {
+
+ .empty_container {
+ height: calc(100% - 45px);
+ }
+ }
+ }
+ }
+ }
+ }
+ .bg-pagination {
+ float: left;
+ margin-top: 0;
+ }
+ }
+}
+
+
\ No newline at end of file
diff --git a/src/page/main/home-config/recommend/edit/type-form.vue b/src/page/main/home-config/recommend/edit/type-form.vue
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0ea1d35d0e9d39551e81820721ae12741a0709a7 100644
--- a/src/page/main/home-config/recommend/edit/type-form.vue
+++ b/src/page/main/home-config/recommend/edit/type-form.vue
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/page/main/home-config/recommend/index.vue b/src/page/main/home-config/recommend/index.vue
index 252e1f3b96a577b6cd1b52ca76d3135d5cb5842f..710ccf6889799ad8bf0c754d8606284a2cdff7fc 100644
--- a/src/page/main/home-config/recommend/index.vue
+++ b/src/page/main/home-config/recommend/index.vue
@@ -191,7 +191,8 @@ const getOperations = (row) => {
} // 表格操作按钮
const addBanner = () => {
- console.log("新增banner")
+ console.log("新建")
+ router.push("/home-config/recommend/add")
}
const edit_row = (row) => {
diff --git a/src/page/main/system/organization/directory-form.vue b/src/page/main/system/organization/directory-form.vue
index 0a576a599cb29614e9826b668359b778d9a9c2d3..736b54ea5d0e05408ef6c9d16b5ce1f1506781c1 100644
--- a/src/page/main/system/organization/directory-form.vue
+++ b/src/page/main/system/organization/directory-form.vue
@@ -79,7 +79,7 @@ import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance, nextTick }
label: 'name',
children: 'Child',
value: 'organization_id',
- // disabled: 'disabled'
+ disabled: 'disabled'
}
const getOrgTree = () => {
$axios.get(`/apaas/system/v5/org/tree`)
diff --git a/src/page/main/system/organization/index.vue b/src/page/main/system/organization/index.vue
index a7dcf7583cc4e2a53ee11430d5f516854f72871c..c1c70582f3603892bd6be96df63cefdb01099ca0 100644
--- a/src/page/main/system/organization/index.vue
+++ b/src/page/main/system/organization/index.vue
@@ -88,23 +88,23 @@