Commit d5d1480b authored by 赵伟庚's avatar 赵伟庚

合并dev至dev0217

parents 2479f9a2 5113c325
...@@ -32,12 +32,12 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 ...@@ -32,12 +32,12 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
- name: build # 项目打包 - name: build # 项目打包
image: registry.cn-qingdao.aliyuncs.com/wod/devops-node:16.16.0-slim image: registry.cn-qingdao.aliyuncs.com/wod/devops-node:16.16.0-slim
# 将宿主机中文件夹挂载到容器中,宿主机文件夹中的文件会被容器访问并修改,起到使用缓存的作用,避免每次运行都要重现下载依赖,提高运行速度 # 将宿主机中文件夹挂载到容器中,宿主机文件夹中的文件会被容器访问并修改,起到使用缓存的作用,避免每次运行都要重现下载依赖,提高运行速度
commands: commands:
- yarn - yarn
- export NODE_ENV=production - export NODE_ENV=production
- yarn build - yarn build
- name: s3-cache-build - name: s3-cache-build
image: registry.cn-qingdao.aliyuncs.com/wod/devops-s3-cache:1.0 image: registry.cn-qingdao.aliyuncs.com/wod/devops-s3-cache:1.0
network_mode: host network_mode: host
...@@ -54,7 +54,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 ...@@ -54,7 +54,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
- name: docker - name: docker
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker:1.0 image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker:1.0
# 将宿主机的 docker和配置挂载到运行的 docker 容器中,那么在容器中运行 docker 命令时,等同于在宿主机中运行该docker命令 # 将宿主机的 docker和配置挂载到运行的 docker 容器中,那么在容器中运行 docker 命令时,等同于在宿主机中运行该docker命令
volumes: volumes:
- name: docker-sock - name: docker-sock
path: /var/run/docker.sock # 将下载依赖的目录挂载出来,防止重复下载 path: /var/run/docker.sock # 将下载依赖的目录挂载出来,防止重复下载
...@@ -70,7 +70,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 ...@@ -70,7 +70,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
from_secret: REGISTRY_USER_ALIYUN from_secret: REGISTRY_USER_ALIYUN
registry_password: # 密码 registry_password: # 密码
from_secret: REGISTRY_PASSWORD_ALIYUN from_secret: REGISTRY_PASSWORD_ALIYUN
- name: deploy-cloud - name: deploy-cloud
image: registry.cn-qingdao.aliyuncs.com/wod/devops-kubernetes:1.0 image: registry.cn-qingdao.aliyuncs.com/wod/devops-kubernetes:1.0
settings: settings:
...@@ -131,8 +131,8 @@ steps: ...@@ -131,8 +131,8 @@ steps:
REGISTRY_PASSWORD: REGISTRY_PASSWORD:
from_secret: REGISTRY_PASSWORD_ALIYUN from_secret: REGISTRY_PASSWORD_ALIYUN
settings: settings:
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.5-alpha source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.10-alpha
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.5 target: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.10
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
- name: harbor-arm64 - name: harbor-arm64
...@@ -149,8 +149,8 @@ steps: ...@@ -149,8 +149,8 @@ steps:
REGISTRY_PASSWORD: REGISTRY_PASSWORD:
from_secret: REGISTRY_PASSWORD_ALIYUN from_secret: REGISTRY_PASSWORD_ALIYUN
settings: settings:
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.5-alpha-arm64 source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.10-alpha-arm64
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.5-arm64 target: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.10-arm64
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
##--------------对于需要保密的信息隐藏,减少账户信息的泄密⬇-----------------## ##--------------对于需要保密的信息隐藏,减少账户信息的泄密⬇-----------------##
--- ---
...@@ -202,4 +202,4 @@ kind: secret ...@@ -202,4 +202,4 @@ kind: secret
name: REGISTRY_PASSWORD_ALIYUN name: REGISTRY_PASSWORD_ALIYUN
get: get:
name: PASSWORD name: PASSWORD
path: devops-registry-aliyun path: devops-registry-aliyun
\ No newline at end of file
...@@ -19,17 +19,17 @@ ...@@ -19,17 +19,17 @@
<login></login> <login></login>
</div> </div>
</div> </div>
<div class="container" v-else-if="$route.path=='/registe'"> <div class="container" v-else-if="$route.path == '/registe'">
<div class="bg-main view"> <div class="bg-main view">
<registe></registe> <registe></registe>
</div> </div>
</div> </div>
<div class="container" v-else-if="$route.path=='/password'"> <div class="container" v-else-if="$route.path == '/password'">
<div class="bg-main view"> <div class="bg-main view">
<password></password> <password></password>
</div> </div>
</div> </div>
<div class="container" v-else-if="$route.path=='/404'"> <div class="container" v-else-if="$route.path == '/404'">
<div class="bg-main view"> <div class="bg-main view">
<page404></page404> <page404></page404>
</div> </div>
...@@ -40,18 +40,18 @@ ...@@ -40,18 +40,18 @@
</template> </template>
<script> <script>
import bgMenu from '@/components/bg-menu.vue' import bgMenu from "@/components/bg-menu.vue";
import login from '@/page/login/index.vue' import login from "@/page/login/index.vue";
import page404 from '@/page/404.vue' import page404 from "@/page/404.vue";
import registe from '@/page/registe/index.vue' import registe from "@/page/registe/index.vue";
import password from '@/page/password/index.vue' import password from "@/page/password/index.vue";
export default { export default {
components: { components: {
bgMenu, bgMenu,
login, login,
page404, page404,
registe, registe,
password password,
}, },
computed: { computed: {
msgBoxFlag() { msgBoxFlag() {
...@@ -66,11 +66,11 @@ export default { ...@@ -66,11 +66,11 @@ export default {
menuObj() { menuObj() {
return this.$store.state.menuObj; return this.$store.state.menuObj;
}, },
navShow(){ navShow() {
return false||!['/','/404','/login','/registe','/password'].includes(this.$route.path) return false || !["/", "/404", "/login", "/registe", "/password"].includes(this.$route.path);
}, },
pageShow(){ pageShow() {
return false||!['/404','/login','/registe','/password'].includes(this.$route.path) return false || !["/404", "/login", "/registe", "/password"].includes(this.$route.path);
}, },
rowPath() { rowPath() {
if (this.pageShow && this.$store.state.userInfo) { if (this.pageShow && this.$store.state.userInfo) {
...@@ -81,9 +81,6 @@ export default { ...@@ -81,9 +81,6 @@ export default {
}, },
nowParent() { nowParent() {
if (this.pageShow && this.$store.state.userInfo) { if (this.pageShow && this.$store.state.userInfo) {
// console.log(2222222)
// console.log(this.navMenu)
// console.log(this.rowPath)
return this.rowPath ? this.navMenu[this.rowPath.slice(1, 2)] : ""; return this.rowPath ? this.navMenu[this.rowPath.slice(1, 2)] : "";
} else { } else {
return ""; return "";
...@@ -154,9 +151,7 @@ export default { ...@@ -154,9 +151,7 @@ export default {
highlightParentRule(pathArr) { highlightParentRule(pathArr) {
return pathArr.includes(this.$route.path); return pathArr.includes(this.$route.path);
}, },
ada() { ada() {},
console.log(12312);
},
}, },
}; };
</script> </script>
......
...@@ -85,7 +85,6 @@ const codeChange = () => { ...@@ -85,7 +85,6 @@ const codeChange = () => {
onMounted(() => { onMounted(() => {
let obj = ""; let obj = "";
// console.log(typeof JSON.parse(this.datas));
try { try {
if (typeof JSON.parse(props.modelValue) == "object") { if (typeof JSON.parse(props.modelValue) == "object") {
obj = JSON.stringify(JSON.parse(props.modelValue), null, "\t"); obj = JSON.stringify(JSON.parse(props.modelValue), null, "\t");
......
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
<script setup> <script setup>
import { reactive, ref, onBeforeMount, toRefs, watch } from "vue"; import { reactive, ref, onBeforeMount, toRefs, watch } from "vue";
import helper from "./utils/index.js"; import helper from "./utils/index.js";
console.log(helper);
const props = defineProps({ const props = defineProps({
data: { data: {
type: Array, type: Array,
...@@ -82,7 +81,6 @@ watch( ...@@ -82,7 +81,6 @@ watch(
const down_file = (url) => { const down_file = (url) => {
if (url) { if (url) {
console.log(url);
const a = document.createElement("a"); // 创建a标签 const a = document.createElement("a"); // 创建a标签
a.setAttribute("download", ""); // download属性 a.setAttribute("download", ""); // download属性
a.setAttribute("href", url); // href链接 a.setAttribute("href", url); // href链接
......
...@@ -121,6 +121,7 @@ const copyText = (text, e) => { ...@@ -121,6 +121,7 @@ const copyText = (text, e) => {
const copyIcon = (data) => { const copyIcon = (data) => {
navigator.clipboard.writeText(data).then( navigator.clipboard.writeText(data).then(
ElMessage.success("复制成功"),
function () {}, function () {},
function () {} function () {}
); );
......
<template> <template>
<ul class="nav-list" v-if="list && list.length"> <ul class="nav-list bg-no-scroll" v-if="list && list.length">
<li v-for="(item, index) in list" v-show="item.menuType !== 2" :key="'nav_' + index"> <li v-for="(item, index) in list" v-show="item.menuType !== 2" :key="'nav_' + index">
<template v-if="item.children && item.children.length && item.menuType == 0"> <template v-if="item.children && item.children.length && item.menuType == 0">
<div <div
......
...@@ -65,9 +65,6 @@ const calcTabs = () => { ...@@ -65,9 +65,6 @@ const calcTabs = () => {
if (tabSlots) { if (tabSlots) {
tabSlots.forEach((e, idx) => { tabSlots.forEach((e, idx) => {
if (idx + 2 > props.limit && tabSlots.length > props.limit && e.props) { if (idx + 2 > props.limit && tabSlots.length > props.limit && e.props) {
// console.log(e);
// console.log(e.props);
state.lastChildren.push(e.props); state.lastChildren.push(e.props);
} }
}); });
......
...@@ -213,8 +213,6 @@ const updateFileList = (fileList) => { ...@@ -213,8 +213,6 @@ const updateFileList = (fileList) => {
state.fileList = fileList; state.fileList = fileList;
console.log(values);
emit("update:modelValue", values); emit("update:modelValue", values);
emit("change", values); emit("change", values);
}; };
......
...@@ -522,7 +522,7 @@ a { ...@@ -522,7 +522,7 @@ a {
} }
> .bg-nav-list { > .bg-nav-list {
height: calc(100% - 135px); height: calc(100% - 10px);
box-sizing: border-box; box-sizing: border-box;
ul.nav-list { ul.nav-list {
...@@ -644,17 +644,20 @@ a { ...@@ -644,17 +644,20 @@ a {
&::before { &::before {
display: none; display: none;
} }
.empty_container { .el-table__empty-block {
height: 500px; height: 500px!important;
padding-top: 247px; .empty_container {
img { height: 500px;
width: 257px; padding-top: 247px;
height: 145px; img {
} width: 257px;
.text { height: 145px;
font-size: 16px; }
color: #616f94; .text {
line-height: 1; font-size: 16px;
color: #616f94;
line-height: 1;
}
} }
} }
th, th,
......
...@@ -12,12 +12,14 @@ ...@@ -12,12 +12,14 @@
v-model="props.item.checked" v-model="props.item.checked"
@change="change_check"></el-checkbox> @change="change_check"></el-checkbox>
<div class="logo"> <div class="logo">
<img v-if="props.item.ability_logo" :src="props.item.ability_logo" alt="" /> <img v-if="props.item.ability_logo" :src="JSON.parse(props.item.ability_logo)[0].url" alt="" />
<img v-else src="../assets/imgs/img_cover_ability.png" alt="" /> <img v-else src="../assets/imgs/img_cover_ability.png" alt="" />
</div> </div>
<div class="info"> <div class="info">
<div class="name"> <div class="name">
<span class="ability_name">{{ props.item.ability_name }}</span> <el-tooltip class="box-item" effect="light" :content="props.item.ability_name" placement="top">
<span class="ability_name">{{ props.item.ability_name }}</span>
</el-tooltip>
<span class="icon_box openness" :class="openClassObj[props.item.openness_id]">{{ props.item.openness }}</span> <span class="icon_box openness" :class="openClassObj[props.item.openness_id]">{{ props.item.openness }}</span>
<span class="icon_box mock" v-if="props.item.include_mock_service">mock</span> <span class="icon_box mock" v-if="props.item.include_mock_service">mock</span>
</div> </div>
......
...@@ -234,7 +234,6 @@ export default { ...@@ -234,7 +234,6 @@ export default {
}, },
created() { created() {
console.log(this.userInfo);
this.getLogo() this.getLogo()
if (this.userInfo) { if (this.userInfo) {
// this.getUserDetail(this.userInfo.user_id) // this.getUserDetail(this.userInfo.user_id)
...@@ -243,7 +242,6 @@ export default { ...@@ -243,7 +242,6 @@ export default {
} }
}, },
mounted() { mounted() {
console.log(this.currentMenuIndex);
this.$nextTick(this.scrollAction); this.$nextTick(this.scrollAction);
window.addEventListener("scroll", this.scrollAction, true); window.addEventListener("scroll", this.scrollAction, true);
......
...@@ -85,7 +85,6 @@ Promise.all([getUser(), getMenu("dadb2d3f-e263-48d1-9389-42acb9ea49f8")]) ...@@ -85,7 +85,6 @@ Promise.all([getUser(), getMenu("dadb2d3f-e263-48d1-9389-42acb9ea49f8")])
// if (res[0].data.data.userType == 1) {//超管 // if (res[0].data.data.userType == 1) {//超管
store.commit("setMenu", data); store.commit("setMenu", data);
console.log("data", data);
menu.menuToRouter(data); menu.menuToRouter(data);
store.commit("setRoute", data); store.commit("setRoute", data);
......
...@@ -68,7 +68,6 @@ const transitionOptions = (_options, options) => { ...@@ -68,7 +68,6 @@ const transitionOptions = (_options, options) => {
} }
const install = (Vue, options = {}) => { const install = (Vue, options = {}) => {
console.log("执行以下")
init(options); init(options);
if (Vue.prototype) { if (Vue.prototype) {
Vue.prototype.$trace = { ...methods,option }; Vue.prototype.$trace = { ...methods,option };
......
...@@ -86,7 +86,6 @@ import detailTable2 from "./detail-table2.vue"; ...@@ -86,7 +86,6 @@ import detailTable2 from "./detail-table2.vue";
import MarkdownIt from "markdown-it"; import MarkdownIt from "markdown-it";
import axios from "axios"; import axios from "axios";
import { h } from 'vue' import { h } from 'vue'
console.log(h);
var md = new MarkdownIt(); var md = new MarkdownIt();
export default { export default {
// model: { // model: {
...@@ -152,7 +151,6 @@ export default { ...@@ -152,7 +151,6 @@ export default {
}, },
watch: { watch: {
modelValue(n,o){ modelValue(n,o){
console.log(n)
if(n==true){ if(n==true){
this.getUnreadNum(); this.getUnreadNum();
this.changeRead(0) this.changeRead(0)
...@@ -226,8 +224,6 @@ export default { ...@@ -226,8 +224,6 @@ export default {
getDetail(id) { getDetail(id) {
this.dialogVisible = true; this.dialogVisible = true;
//刷新未读数量 //刷新未读数量
console.log(id);
axios axios
.get(`${this.$trace.option.requestUrl}/msg/api/my/msg/detail`, { .get(`${this.$trace.option.requestUrl}/msg/api/my/msg/detail`, {
params: { params: {
......
...@@ -28,6 +28,10 @@ ...@@ -28,6 +28,10 @@
<bg-filter-group @search="changeSearch" v-model="filter.search" placeholder="请输入关键字"> <bg-filter-group @search="changeSearch" v-model="filter.search" placeholder="请输入关键字">
<template v-slot:left_action v-if="nodeClassifyId != '263758a4-0349-4d49-a816-e8ff8d33a8bb'"> <template v-slot:left_action v-if="nodeClassifyId != '263758a4-0349-4d49-a816-e8ff8d33a8bb'">
<div class="apaas_button"> <div class="apaas_button">
<el-button class="register_btn" type="primary" @click="backDict" v-if="dictLevel != 1">
<!-- <bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon> -->
返回上级
</el-button>
<el-button class="register_btn" type="primary" @click="register"> <el-button class="register_btn" type="primary" @click="register">
<bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon> <bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon>
新增 新增
...@@ -56,7 +60,15 @@ ...@@ -56,7 +60,15 @@
</bg-filter-group> </bg-filter-group>
<div class="table_container"> <div class="table_container">
<div class="table bg-scroll"> <div class="table bg-scroll">
<bg-table ref="bgTable" :headers="headers" :rows="tableRows" :isIndex="true" :stripe="true"> <bg-table ref="bgTable" :headers="isLang && dictLevel == 1 ? langHeaders : headers" :rows="tableRows" :isIndex="true" :stripe="true">
<template v-slot:name="{ row }">
<span class="can_click_text" @click="getChildren(row)" v-if="isLang && dictLevel == 1">
{{ row.name }}
</span>
<span v-else>
{{ row.name }}
</span>
</template>
<template v-slot:updated_time="{ row }"> <template v-slot:updated_time="{ row }">
{{ row.updated_time.split("+")[0].replace("T", " ").replace("Z", " ") }} {{ row.updated_time.split("+")[0].replace("T", " ").replace("Z", " ") }}
</template> </template>
...@@ -204,6 +216,36 @@ const state = reactive({ ...@@ -204,6 +216,36 @@ const state = reactive({
fixed: "right", fixed: "right",
}, },
], // 表格数据表头 ], // 表格数据表头
langHeaders: [
{
label: "名称",
prop: "name",
},
{
label: "版本数",
prop: "total_children",
},
{
label: "描述",
prop: "describe",
minWidth: 360,
},
{
label: "更新时间",
prop: "updated_time",
width: 220,
},
{
label: "是否启用",
prop: "state",
},
{
label: "操作",
prop: "action",
width: 176,
fixed: "right",
},
],
tableRows: [], // 表格数据 tableRows: [], // 表格数据
tableTotal: 0, // 表格数据条数 tableTotal: 0, // 表格数据条数
filter: { filter: {
...@@ -234,6 +276,7 @@ const state = reactive({ ...@@ -234,6 +276,7 @@ const state = reactive({
name: "", name: "",
describe: "", describe: "",
state: 1, state: 1,
p_dict_id: "",
}, },
rules: { rules: {
name: [{ required: true, message: "请输入名称", trigger: "blur" }], name: [{ required: true, message: "请输入名称", trigger: "blur" }],
...@@ -243,10 +286,30 @@ const state = reactive({ ...@@ -243,10 +286,30 @@ const state = reactive({
], ],
state: [{ required: true, message: "请选择是否启用", trigger: "change" }], state: [{ required: true, message: "请选择是否启用", trigger: "change" }],
}, },
fatherRow: null,
}); });
const isLang = computed(() => {
return state.nodeClassifyId == "59315100-5c2a-4381-83fe-32934605f0a9"
})
const dictLevel = ref(1)
const getChildren = (row) => {
dictLevel.value = 2
state.tableRows = row.children || []
state.tableTotal = row.total_children
state.fatherRow = row
}
const backDict = () => {
dictLevel.value = 1
state.fatherRow = null
changePage(1);
}
const nodeClick = (item) => { const nodeClick = (item) => {
state.nodeId = item.id; state.nodeId = item.id;
dictLevel.value = 1
state.fatherRow = null
state.nodeClassifyId = item.classify_id; state.nodeClassifyId = item.classify_id;
state.filter = { state.filter = {
state: "", state: "",
...@@ -317,8 +380,15 @@ const getTableRows = () => { ...@@ -317,8 +380,15 @@ const getTableRows = () => {
}) })
.then((res) => { .then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
state.tableRows = res.data.data || []; let data = res.data.data || []
state.tableTotal = res.data.total; if (dictLevel.value == 1) {
state.tableRows = data;
state.tableTotal = res.data.total;
}else {
let row = data.filter(e => {return e.dict_id == state.fatherRow.dict_id})
state.tableRows = row[0].children
state.tableTotal = row[0].total_children
}
if (state.tableRows.length > 0) { if (state.tableRows.length > 0) {
state.tableRows.forEach((e) => { state.tableRows.forEach((e) => {
e.canMoveUp = true; e.canMoveUp = true;
...@@ -360,6 +430,7 @@ const register = () => { ...@@ -360,6 +430,7 @@ const register = () => {
name: "", name: "",
describe: "", describe: "",
state: 1, state: 1,
p_dict_id: state.fatherRow ? state.fatherRow.dict_id : "",
}; };
if (state.bgForm) { if (state.bgForm) {
nextTick().then(() => { nextTick().then(() => {
...@@ -384,6 +455,7 @@ const edit_row = (row) => { ...@@ -384,6 +455,7 @@ const edit_row = (row) => {
name: state.actionRow.name, name: state.actionRow.name,
describe: state.actionRow.describe, describe: state.actionRow.describe,
state: state.actionRow.state, state: state.actionRow.state,
p_dict_id: state.actionRow.p_dict_id
}; };
} else { } else {
ElMessage.error(res.data.data); ElMessage.error(res.data.data);
...@@ -518,6 +590,7 @@ const { ...@@ -518,6 +590,7 @@ const {
addDialog, addDialog,
formData, formData,
rules, rules,
langHeaders,
} = toRefs(state); } = toRefs(state);
</script> </script>
......
<template> <template>
<el-form :model="formData" :rules="formRules" ref="form" style="max-width: 1048px" class="form"> <el-form :model="formData" :rules="formRules" ref="form" style="max-width: 1048px" class="form">
<el-form-item label="banner名称" prop="banner_name"> <el-form-item label="banner名称" prop="banner_name">
<el-input v-model.trim="formData.banner_name" /> <el-input v-model.trim="formData.banner_name" show-word-limit maxlength="30" />
</el-form-item> </el-form-item>
<el-form-item label="链接地址(选填)" prop="link_address"> <el-form-item label="链接地址(选填)" prop="link_address">
<el-input v-model.trim="formData.link_address" /> <el-input v-model.trim="formData.link_address" />
...@@ -11,9 +11,10 @@ ...@@ -11,9 +11,10 @@
v-model="formData.banner_image" v-model="formData.banner_image"
:fileSize="1" :fileSize="1"
:showTips="true" :showTips="true"
customTips="请选择图片上传:大小1920 * 464像素支持jpg、png等格式,图片需小于1MB" customTips="请选择图片上传:大小1920 * 464像素支持jpg、jpeg、png格式,图片需小于1MB"
:limit="1" :limit="1"
listType="picture-card" listType="picture-card"
@change="changeLogo"
:accept="['.jpg', '.jpeg', '.png']"></bg-upload-image> :accept="['.jpg', '.jpeg', '.png']"></bg-upload-image>
</el-form-item> </el-form-item>
<el-form-item label="是否启用" prop="state" class="state_form_item"> <el-form-item label="是否启用" prop="state" class="state_form_item">
...@@ -39,11 +40,18 @@ const state = reactive({ ...@@ -39,11 +40,18 @@ const state = reactive({
}, },
formRules: { formRules: {
banner_name: [{ required: true, message: "请输入banner名称", trigger: "blur" }], banner_name: [{ required: true, message: "请输入banner名称", trigger: "blur" }],
link_address: [{ max: 8182, message: "最长可输入8182个字符", trigger: "blur" }],
banner_image: [{ required: true, message: "请上传banner图", trigger: "change" }], banner_image: [{ required: true, message: "请上传banner图", trigger: "change" }],
state: [{ required: true, message: "请选择启用状态", trigger: "change" }], state: [{ required: true, message: "请选择启用状态", trigger: "change" }],
}, },
}); });
const changeLogo = (value) => {
if (value && value.length > 0) {
form.value.clearValidate("banner_image");
}
};
const emit = defineEmits(["action"]); const emit = defineEmits(["action"]);
const submitForm = async () => { const submitForm = async () => {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
:fileSize="500" :fileSize="500"
:fileSizeUnit="'KB'" :fileSizeUnit="'KB'"
:showTips="true" :showTips="true"
customTips="请选择图片上传:大小80 * 80像素支持jpg、png等格式,图片需小于500KB" customTips="请选择图片上传:大小80 * 80像素支持jpg、jpeg、png格式,图片需小于500KB"
:limit="1" :limit="1"
listType="picture-card" listType="picture-card"
:accept="['.jpg', '.jpeg', '.png']"></bg-upload-image> :accept="['.jpg', '.jpeg', '.png']"></bg-upload-image>
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
</el-cascader> </el-cascader>
<el-input <el-input
v-model.trim="dialogFilter.keyword" v-model.trim="dialogFilter.keyword"
placeholder="请输入内容" placeholder="请输入能力/开发商名称"
style="width: 240px" style="width: 240px"
:prefix-icon="Search" /> :prefix-icon="Search" />
<el-button type="primary" @click="searchAction">查询</el-button> <el-button type="primary" @click="searchAction">查询</el-button>
...@@ -299,6 +299,7 @@ const move = (temp) => { ...@@ -299,6 +299,7 @@ const move = (temp) => {
} }
} }
}); });
state.selectArrNew = state.selectArr.filter((e) => e )
}; };
const changePage = (val) => { const changePage = (val) => {
state.dialogFilter.page = 1; state.dialogFilter.page = 1;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
placeholder="请选择能力类型" placeholder="请选择能力类型"
style="width: 100%" style="width: 100%"
@change="changeType" @change="changeType"
:disabled="route.query.id"> :disabled="!!route.query.id">
<el-option v-for="item in props.businessList" :key="item.dict_id" :label="item.name" :value="item.id" /> <el-option v-for="item in props.businessList" :key="item.dict_id" :label="item.name" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -16,9 +16,10 @@ ...@@ -16,9 +16,10 @@
:fileSize="500" :fileSize="500"
:fileSizeUnit="'KB'" :fileSizeUnit="'KB'"
:showTips="true" :showTips="true"
customTips="请选择图片上传:大小36 * 36像素支持jpg、png等格式,图片需小于500KB" customTips="请选择图片上传:大小36 * 36像素支持jpg、jpeg、png格式,图片需小于500KB"
:limit="1" :limit="1"
listType="picture-card" listType="picture-card"
@change="changeLogo"
:accept="['.jpg', '.jpeg', '.png']"></bg-upload-image> :accept="['.jpg', '.jpeg', '.png']"></bg-upload-image>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -51,6 +52,12 @@ const state = reactive({ ...@@ -51,6 +52,12 @@ const state = reactive({
const emit = defineEmits(["action", "changeType"]); const emit = defineEmits(["action", "changeType"]);
const changeLogo = (value) => {
if (value && value.length > 0) {
form.value.clearValidate("logo")
}
}
const submitForm = async () => { const submitForm = async () => {
if (!form) return; if (!form) return;
await form.value.validate((valid, fields) => { await form.value.validate((valid, fields) => {
......
...@@ -886,7 +886,7 @@ onBeforeMount(() => {}); ...@@ -886,7 +886,7 @@ onBeforeMount(() => {});
padding: 16px; padding: 16px;
} }
.tree { .tree {
overflow: auto; overflow: hidden auto;
height: calc(100% - 65px); height: calc(100% - 65px);
/* padding: 5px; */ /* padding: 5px; */
} }
......
...@@ -166,7 +166,6 @@ const getDetail = () => { ...@@ -166,7 +166,6 @@ const getDetail = () => {
}; };
const getSystemInfo = () => { const getSystemInfo = () => {
console.log(11111111);
const params = { ...filter, organization_id: route.query.id }; const params = { ...filter, organization_id: route.query.id };
axios.get(`/apaas/system/v5/org/business/msg`, { params }).then((res) => { axios.get(`/apaas/system/v5/org/business/msg`, { params }).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
......
...@@ -92,20 +92,25 @@ const validatePass = (rule, value, callback) => { ...@@ -92,20 +92,25 @@ const validatePass = (rule, value, callback) => {
}; };
const validateSystemAccount = (rule, value, callback) => { const validateSystemAccount = (rule, value, callback) => {
let params = null; let reg = /^[a-zA-Z0-9]+$/;
if (props.id) { if (!reg.test(value)) {
params = { id: parseInt(props.id), system_account: value }; callback(new Error("只能输入字母和数字"));
} else { } else {
params = { system_account: value }; let params = null;
} if (props.id) {
params = { id: parseInt(props.id), system_account: value };
axios.post(`/apaas/system/v5/user/check/account`, params).then((res) => {
if (res.data.code == 200) {
callback();
} else { } else {
callback(new Error(res.data.data)); params = { system_account: value };
} }
});
axios.post(`/apaas/system/v5/user/check/account`, params).then((res) => {
if (res.data.code == 200) {
callback();
} else {
callback(new Error(res.data.data));
}
});
}
}; };
const checkPhone = (rule, value, callback) => { const checkPhone = (rule, value, callback) => {
...@@ -141,6 +146,8 @@ const orgAccountFormRules = reactive({ ...@@ -141,6 +146,8 @@ const orgAccountFormRules = reactive({
select_role: [{ required: true, message: "请选择角色", trigger: "blur" }], select_role: [{ required: true, message: "请选择角色", trigger: "blur" }],
system_account: [ system_account: [
{ required: true, message: "请输入账号", trigger: "blur" }, { required: true, message: "请输入账号", trigger: "blur" },
{ min: 4, message: "帐号长度不得低于4个字符", trigger: "blur" },
{ max: 20, message: "帐号最大长度为20个字符", trigger: "blur" },
{ validator: validateSystemAccount, trigger: "blur" }, { validator: validateSystemAccount, trigger: "blur" },
], ],
contact_phone: [ contact_phone: [
......
...@@ -95,20 +95,25 @@ const checkPhone = (rule, value, callback) => { ...@@ -95,20 +95,25 @@ const checkPhone = (rule, value, callback) => {
}; };
const validateSystemAccount = (rule, value, callback) => { const validateSystemAccount = (rule, value, callback) => {
let params = null; let reg = /^[a-zA-Z0-9]+$/;
if (props.id) { if (!reg.test(value)) {
params = { id: parseInt(props.id), system_account: value }; callback(new Error("只能输入字母和数字"));
} else { } else {
params = { system_account: value }; let params = null;
} if (props.id) {
params = { id: parseInt(props.id), system_account: value };
axios.post(`/apaas/system/v5/user/check/account`, params).then((res) => {
if (res.data.code == 200) {
callback();
} else { } else {
callback(new Error(res.data.data)); params = { system_account: value };
} }
});
axios.post(`/apaas/system/v5/user/check/account`, params).then((res) => {
if (res.data.code == 200) {
callback();
} else {
callback(new Error(res.data.data));
}
});
}
}; };
const checkPhoneRepet = (rule, value, callback) => { const checkPhoneRepet = (rule, value, callback) => {
...@@ -131,6 +136,8 @@ const checkPhoneRepet = (rule, value, callback) => { ...@@ -131,6 +136,8 @@ const checkPhoneRepet = (rule, value, callback) => {
const platformAccountFormRules = reactive({ const platformAccountFormRules = reactive({
system_account: [ system_account: [
{ required: true, message: "请输入账号", trigger: "blur" }, { required: true, message: "请输入账号", trigger: "blur" },
{ min: 4, message: "帐号长度不得低于4个字符", trigger: "blur" },
{ max: 20, message: "帐号最大长度为20个字符", trigger: "blur" },
{ validator: validateSystemAccount, trigger: "blur" }, { validator: validateSystemAccount, trigger: "blur" },
], ],
contact_phone: [ contact_phone: [
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
<span <span
v-else v-else
class="tree-action-box" class="tree-action-box"
:class="{ position_sticky: isSticky(data.name) }"
@click.stop="showAction($event, data, node)"> @click.stop="showAction($event, data, node)">
<bg-icon class="tree-more" icon="#bg-ic-s-more"></bg-icon> <bg-icon class="tree-more" icon="#bg-ic-s-more"></bg-icon>
</span> </span>
...@@ -248,7 +247,6 @@ const showAction = (e, data, node) => { ...@@ -248,7 +247,6 @@ const showAction = (e, data, node) => {
height = parseInt(height); height = parseInt(height);
//判断弹窗位置是否超过屏幕,超过则吸底展示 //判断弹窗位置是否超过屏幕,超过则吸底展示
if (height + rect.y - 17 > allHeight - bottomGap.value) { if (height + rect.y - 17 > allHeight - bottomGap.value) {
console.log(123);
acBottom.value = bottomGap.value + "px"; acBottom.value = bottomGap.value + "px";
acLeft.value = rect.x + 35 + "px"; acLeft.value = rect.x + 35 + "px";
} else { } else {
...@@ -370,7 +368,9 @@ defineExpose({ getOrgTree, filterTree, setCurrentNode }); ...@@ -370,7 +368,9 @@ defineExpose({ getOrgTree, filterTree, setCurrentNode });
.file-tree :deep() .el-tree-node__content:hover .tree-action-box { .file-tree :deep() .el-tree-node__content:hover .tree-action-box {
display: inline-block; display: inline-block;
} }
.file-tree :deep() .el-tree-node__content:hover + .label-text {
width: calc(100% - 48px);
}
.file-tree :deep() .el-tree-node__content .first_node { .file-tree :deep() .el-tree-node__content .first_node {
display: inline-block; display: inline-block;
background-color: #fff; background-color: #fff;
...@@ -396,6 +396,11 @@ defineExpose({ getOrgTree, filterTree, setCurrentNode }); ...@@ -396,6 +396,11 @@ defineExpose({ getOrgTree, filterTree, setCurrentNode });
.label-text { .label-text {
font-size: 14px; font-size: 14px;
color: #404a62; color: #404a62;
display: inline-block;
width: calc(100% - 24px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.tree-action-box:hover + .label-text { .tree-action-box:hover + .label-text {
padding: 8px 0; padding: 8px 0;
...@@ -404,7 +409,8 @@ defineExpose({ getOrgTree, filterTree, setCurrentNode }); ...@@ -404,7 +409,8 @@ defineExpose({ getOrgTree, filterTree, setCurrentNode });
.label-text:hover { .label-text:hover {
padding: 8px 0; padding: 8px 0;
background-color: var(--el-tree-node-hover-bg-color); /* background-color: var(--el-tree-node-hover-bg-color); */
width: calc(100% - 48px);
} }
.is_active { .is_active {
padding: 8px 0; padding: 8px 0;
......
...@@ -342,12 +342,10 @@ const clearRoleSelection = () => { ...@@ -342,12 +342,10 @@ const clearRoleSelection = () => {
}; };
const register = () => { const register = () => {
console.log("新增角色");
router.push("/system/role/add"); router.push("/system/role/add");
}; // 新增角色 }; // 新增角色
const edit_row = (row) => { const edit_row = (row) => {
console.log(row, "编辑角色");
router.push({ router.push({
path: "/system/role/edit", path: "/system/role/edit",
query: { query: {
...@@ -365,7 +363,6 @@ const distribute_user = (row) => { ...@@ -365,7 +363,6 @@ const distribute_user = (row) => {
const getUserList = () => { const getUserList = () => {
nextTick(() => { nextTick(() => {
console.log(userTable);
clearUserSelection(); clearUserSelection();
}); });
let params = { let params = {
......
//路由前端原则可以不写,但是需要在recorder中记录,防止以后忘记 //路由前端原则可以不写,但是需要在recorder中记录,防止以后忘记
//不用新增父路由的文件,父路由全部由parent/parent.vue来支撑 //不用新增父路由的文件,父路由全部由parent/parent.vue来支撑
import { import { createRouter, createWebHashHistory } from "vue-router";
createRouter, import store from "../store";
createWebHashHistory
} from "vue-router";
import store from '../store'
//写入初始必须有的路由 //写入初始必须有的路由
//或者隐藏式路由,不会表现在菜单上,但是需要存在的路由 //或者隐藏式路由,不会表现在菜单上,但是需要存在的路由
const routes = [{ const routes = [
path: '/login', {
name: 'login', path: "/login",
name: "login",
show: true, show: true,
component: () => import('../page/login/index.vue') component: () => import("../page/login/index.vue"),
}, },
{ {
path: '/registe', path: "/registe",
name: 'registe', name: "registe",
show: true, show: true,
component: () => import('../page/registe/index.vue') component: () => import("../page/registe/index.vue"),
}, },
{ {
path: '/password', path: "/password",
name: 'password', name: "password",
show: true, show: true,
component: () => import('../page/password/index.vue') component: () => import("../page/password/index.vue"),
}, },
{ {
path: '/', path: "/",
name: 'index', name: "index",
component: () => import('../page/welcom.vue'), component: () => import("../page/welcom.vue"),
}, },
{ {
path: '/404', path: "/404",
show: true, show: true,
component: () => import('../page/404.vue') component: () => import("../page/404.vue"),
}, },
]; ];
...@@ -51,7 +48,7 @@ const router = newRouterFunc(); ...@@ -51,7 +48,7 @@ const router = newRouterFunc();
function inWhiteList(toPath) { function inWhiteList(toPath) {
//配置白名单 //配置白名单
const whiteList = ['/login', '/registe', '/password'] const whiteList = ["/login", "/registe", "/password"];
const path = whiteList.find((value) => { const path = whiteList.find((value) => {
// 使用正则匹配 // 使用正则匹配
const reg = new RegExp("^" + value); const reg = new RegExp("^" + value);
...@@ -62,16 +59,14 @@ function inWhiteList(toPath) { ...@@ -62,16 +59,14 @@ function inWhiteList(toPath) {
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
const userInfo = store.state.userInfo; const userInfo = store.state.userInfo;
console.log(store.state.route);
//已登录不可跳转登陆页 //已登录不可跳转登陆页
if (userInfo && (to.path == '/login' || to.path == '/')) { if (userInfo && (to.path == "/login" || to.path == "/")) {
next({ next({
path: '/develop/account' path: "/develop/account",
}) });
} }
// 检查to.path是否存在于免登陆白名单 // 检查to.path是否存在于免登陆白名单
if (inWhiteList(to.path)) { if (inWhiteList(to.path)) {
next(); next();
...@@ -83,7 +78,8 @@ router.beforeEach((to, from, next) => { ...@@ -83,7 +78,8 @@ router.beforeEach((to, from, next) => {
next({ next({
path: "/login", path: "/login",
}); });
} else {} } else {
}
} }
//判读是否匹配,否则跳转404 //判读是否匹配,否则跳转404
...@@ -91,8 +87,8 @@ router.beforeEach((to, from, next) => { ...@@ -91,8 +87,8 @@ router.beforeEach((to, from, next) => {
next(); next();
} else { } else {
return next({ return next({
path: '/404' path: "/404",
}) });
} }
}); });
...@@ -102,11 +98,11 @@ router.beforeEach((to, from, next) => { ...@@ -102,11 +98,11 @@ router.beforeEach((to, from, next) => {
// generateRoutes() // generateRoutes()
// }) // })
function addRoute(router, routers) { function addRoute(router, routers) {
routers.forEach(e => { routers.forEach((e) => {
if (e.path[0] == '/') { if (e.path[0] == "/") {
router.addRoute(e) router.addRoute(e);
if (e.children && e.children.length) { if (e.children && e.children.length) {
addRoute(router, e.children) addRoute(router, e.children);
} }
} }
}); });
...@@ -118,15 +114,13 @@ export function generateRoutes() { ...@@ -118,15 +114,13 @@ export function generateRoutes() {
if (_asyncRoutes) { if (_asyncRoutes) {
//动态添加路由 //动态添加路由
addRoute(router, _asyncRoutes) addRoute(router, _asyncRoutes);
} }
router.addRoute({ router.addRoute({
path: '/:pathMatch(.*)', path: "/:pathMatch(.*)",
redirect: '/404' redirect: "/404",
}) });
console.log(router.getRoutes());
} }
//新创建一个router替代之前的router,并把matcher方法替换成新的router的matcher //新创建一个router替代之前的router,并把matcher方法替换成新的router的matcher
...@@ -135,4 +129,4 @@ export function resetRouter() { ...@@ -135,4 +129,4 @@ export function resetRouter() {
router.matcher = newRouter.matcher; router.matcher = newRouter.matcher;
} }
export default router export default router;
...@@ -2,7 +2,6 @@ import { defineConfig } from "vite"; ...@@ -2,7 +2,6 @@ import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue"; import vue from "@vitejs/plugin-vue";
const path = require("path"); const path = require("path");
console.log(__dirname);
function resolve_path(dir) { function resolve_path(dir) {
return path.join(__dirname, "./", dir); return path.join(__dirname, "./", dir);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment