This commit is contained in:
851673013@qq.com 2022-08-03 14:47:02 +08:00
parent 8c15de2b45
commit 3817737f04
10 changed files with 108 additions and 94 deletions

View File

@ -9,7 +9,14 @@
<el-form-item>
<el-input
v-model="dataForm.username"
:placeholder="$t('user.username')"
placeholder="用户名"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-input
v-model="dataForm.real_name"
placeholder="真实姓名"
clearable
></el-input>
</el-form-item>
@ -44,7 +51,7 @@
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getDataList()">{{
$t("query")
$t('query')
}}</el-button>
</el-form-item>
<el-form-item>
@ -52,7 +59,7 @@
v-if="$hasPermission('sys:user:save')"
type="primary"
@click="addOrUpdateHandle()"
>{{ $t("add") }}</el-button
>{{ $t('add') }}</el-button
>
</el-form-item>
<el-form-item>
@ -60,7 +67,7 @@
v-if="$hasPermission('sys:user:delete')"
type="danger"
@click="deleteHandle()"
>{{ $t("deleteBatch") }}</el-button
>{{ $t('deleteBatch') }}</el-button
>
</el-form-item>
<el-form-item>
@ -68,7 +75,7 @@
v-if="$hasPermission('sys:user:export')"
type="info"
@click="exportHandle()"
>{{ $t("export") }}</el-button
>{{ $t('export') }}</el-button
>
</el-form-item>
<el-form-item>
@ -96,6 +103,12 @@
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="realName"
label="真实姓名"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="deptName"
:label="$t('user.deptName')"
@ -123,7 +136,7 @@
align="center"
>
<template slot-scope="scope">
{{ $getDictLabel("gender", scope.row.gender) }}
{{ $getDictLabel('gender', scope.row.gender) }}
</template>
</el-table-column>
<el-table-column
@ -135,10 +148,10 @@
>
<template slot-scope="scope">
<el-tag v-if="scope.row.status === 0" size="small" type="danger">{{
$t("user.status0")
$t('user.status0')
}}</el-tag>
<el-tag v-else size="small" type="success">{{
$t("user.status1")
$t('user.status1')
}}</el-tag>
</template>
</el-table-column>
@ -163,14 +176,14 @@
type="text"
size="small"
@click="addOrUpdateHandle(scope.row.id)"
>{{ $t("update") }}</el-button
>{{ $t('update') }}</el-button
>
<el-button
v-if="$hasPermission('sys:user:delete')"
type="text"
size="small"
@click="deleteHandle(scope.row.id)"
>{{ $t("delete") }}</el-button
>{{ $t('delete') }}</el-button
>
</template>
</el-table-column>
@ -196,86 +209,87 @@
</template>
<script>
import mixinViewModule from "@/mixins/view-module";
import AddOrUpdate from "./user-add-or-update";
import qs from "qs";
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './user-add-or-update'
import qs from 'qs'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: "/sys/user/page",
getDataListURL: '/sys/user/page',
getDataListIsPage: true,
deleteURL: "/sys/user",
deleteURL: '/sys/user',
deleteIsBatch: true,
exportURL: "/sys/user/export",
exportURL: '/sys/user/export'
},
postList: [],
dataForm: {
username: "",
deptId: "",
postId: "",
gender: "",
},
};
username: '',
deptId: '',
postId: '',
gender: ''
}
}
},
components: {
AddOrUpdate,
AddOrUpdate
},
created () {
this.getPostList();
this.getPostList()
},
methods: {
reset () {
this.$http
.get(
this.mixinViewModuleOptions.getDataListURL +
"?" +
'?' +
qs.stringify({
page: 1,
limit: 10,
username: "",
deptId: "",
postId: "",
gender: "",
username: '',
deptId: '',
postId: '',
gender: ''
})
)
.then(({ data: res }) => {
this.dataForm.username = "";
this.dataForm.deptId = "";
this.dataForm.postId = "";
this.dataForm.gender = "";
this.dataForm.username = ''
this.dataForm.real_name = ''
this.dataForm.deptId = ''
this.dataForm.postId = ''
this.dataForm.gender = ''
if (res.code !== 0) {
this.dataList = [];
this.total = 0;
return this.$message.error(res.msg);
this.dataList = []
this.total = 0
return this.$message.error(res.msg)
}
this.dataList = this.mixinViewModuleOptions.getDataListIsPage
? res.data.list
: res.data;
: res.data
this.total = this.mixinViewModuleOptions.getDataListIsPage
? res.data.total
: 0;
: 0
if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data);
this.mixinViewModuleOptions.requestCallback(res.data)
}
this.dataListLoading = false;
this.dataListLoading = false
})
.catch(() => {
this.dataListLoading = false;
});
this.dataListLoading = false
})
},
getPostList () {
this.$http
.get("/sys/post/list")
.get('/sys/post/list')
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
return this.$message.error(res.msg)
}
this.postList = res.data;
this.postList = res.data
})
.catch(() => {});
},
},
};
.catch(() => {})
}
}
}
</script>

View File

@ -1,6 +1,6 @@
<template>
<div class="application-associated-ability" v-if="flag">
<detals-title title="关联应用" type="ASSOCIATED"></detals-title>
<detals-title title="来源应用" type="ASSOCIATED"></detals-title>
<div
class="application-associated-ability-main"
v-if="dataFrom[0].dataList.length < 4"

View File

@ -64,18 +64,18 @@
},
])
const list = ref([])
// id
// id
if (keyId) {
queryPartAppByKeyId2({ keyId: keyId }).then((res) => {
console.log('ressssssss', res)
if (res.data.data.length > 0) {
//
//
navList.value.unshift({
name: '关联应用',
name: '来源应用',
key: 'algorithm-associated-ability',
show: true,
})
// list.value.push('')
// list.value.push('')
console.log('navList', navList)
}
})
@ -130,7 +130,7 @@
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
(item) => (item.name === '来源应用') | (item.name === list.value[0])
)[0].key
}
}
@ -171,7 +171,7 @@
list.value.push('使用方式')
}
})
list.value.unshift('关联应用')
list.value.unshift('来源应用')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {

View File

@ -66,7 +66,7 @@
})
const select = ref('application-associated-ability')
const list = ref([])
// id
// id
if (keyId) {
let params = {
keyId: keyId,
@ -75,7 +75,7 @@
queryPartAppByKeyId(params).then((res) => {
console.log('ressssssss', res)
if (res.data.data.length != 0) {
//
//
navList.value.unshift({
name: '关联组件',
key: 'application-associated-ability',

View File

@ -1,6 +1,6 @@
<template>
<div class="application-associated-ability" v-if="flag">
<detals-title title="关联应用" type="ASSOCIATED"></detals-title>
<detals-title title="来源应用" type="ASSOCIATED"></detals-title>
<div
class="application-associated-ability-main"
v-if="dataFrom[0].dataList.length < 4"

View File

@ -62,18 +62,18 @@
})
const select = ref('business-associated-ability')
const list = ref([])
// id
// id
if (keyId) {
queryPartAppByKeyId2({ keyId: keyId }).then((res) => {
console.log('ressssssss', res)
if (res.data.data.length > 0) {
//
//
navList.value.unshift({
name: '关联应用',
name: '来源应用',
key: 'business-associated-ability',
show: true,
})
// list.value.push('')
// list.value.push('')
console.log('navList', navList)
}
})
@ -85,7 +85,7 @@
if (props.dataList.infoList) {
list.value = []
let arr = [
'关联应用',
'来源应用',
'组件视频介绍',
'功能介绍',
'应用场景',
@ -110,12 +110,12 @@
list.value.push('组件展示')
}
})
list.value.unshift('关联应用')
list.value.unshift('来源应用')
list.value.push('使用方式')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
if (item.name == '关联应用') {
if (item.name == '来源应用') {
if (props.associatedComponents[0].dataList.length != 0) {
item.show = true
}
@ -127,7 +127,7 @@
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
(item) => (item.name === '来源应用') | (item.name === list.value[0])
)[0].key
}
}
@ -145,7 +145,7 @@
if (val) {
list.value = []
let arr = [
'关联应用',
'来源应用',
'组件视频介绍',
'功能介绍',
'应用场景',
@ -171,12 +171,12 @@
list.value.push('组件展示')
}
})
list.value.unshift('关联应用')
list.value.unshift('来源应用')
list.value.push('使用方式')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
if (item.name == '关联应用') {
if (item.name == '来源应用') {
if (props.associatedComponents[0].dataList.length != 0) {
item.show = true
}
@ -189,7 +189,7 @@
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) =>
(item.name === '关联应用') | (item.name === list.value[0])
(item.name === '来源应用') | (item.name === list.value[0])
)[0].key
}
}

View File

@ -1,6 +1,6 @@
<template>
<div class="application-associated-ability" v-if="flag">
<detals-title title="关联应用" type="ASSOCIATED"></detals-title>
<detals-title title="来源应用" type="ASSOCIATED"></detals-title>
<div
class="application-associated-ability-main"
v-if="dataFrom[0].dataList.length < 4"

View File

@ -65,18 +65,18 @@
})
const select = ref('developer-associated-ability')
const list = ref([])
// id
// id
if (keyId) {
queryPartAppByKeyId2({ keyId: keyId }).then((res) => {
console.log('ressssssss', res)
if (res.data.data.length > 0) {
//
//
navList.value.unshift({
name: '关联应用',
name: '来源应用',
key: 'developer-associated-ability',
show: true,
})
// list.value.push('')
// list.value.push('')
console.log('navList', navList)
}
})
@ -101,12 +101,12 @@
list.value.push('组件试用')
}
})
list.value.unshift('关联应用')
list.value.unshift('来源应用')
list.value.push('使用方式')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
// if (item.name == '') {
// if (item.name == '') {
// if (props.associatedComponents[0].dataList.length != 0) {
// item.show = true
// }
@ -117,7 +117,7 @@
})
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
(item) => (item.name === '来源应用') | (item.name === list.value[0])
// (item) => item.name === list.value[0]
)[0].key
}
@ -151,13 +151,13 @@
list.value.push('组件试用')
}
})
list.value.unshift('关联应用')
list.value.unshift('来源应用')
// list.value.push('')
list.value.push('使用方式')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
// if (item.name == '') {
// if (item.name == '') {
// if (props.associatedComponents[0].dataList.length != 0) {
// item.show = true
// }
@ -170,7 +170,7 @@
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) =>
(item.name === '关联应用') | (item.name === list.value[0])
(item.name === '来源应用') | (item.name === list.value[0])
)[0].key
}
}

View File

@ -1,6 +1,6 @@
<template>
<div class="application-associated-ability" v-if="flag">
<detals-title title="关联应用" type="ASSOCIATED"></detals-title>
<detals-title title="来源应用" type="ASSOCIATED"></detals-title>
<div
class="application-associated-ability-main"
v-if="dataFrom[0].dataList.length < 4"

View File

@ -64,18 +64,18 @@
associatedComponents: { type: Array, default: null },
})
const list = ref([])
// id
// id
if (keyId) {
queryPartAppByKeyId2({ keyId: keyId }).then((res) => {
console.log('ressssssss', res)
if (res.data.data.length > 0) {
//
//
navList.value.unshift({
name: '关联应用',
name: '来源应用',
key: 'layer-service-associated-ability',
show: true,
})
list.value.unshift('关联应用')
list.value.unshift('来源应用')
}
})
}
@ -137,7 +137,7 @@
list.value.push('使用方式')
}
})
list.value.unshift('关联应用')
list.value.unshift('来源应用')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
@ -146,7 +146,7 @@
})
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
(item) => (item.name === '来源应用') | (item.name === list.value[0])
// (item) => item.name === list.value[0]
)[0].key
}
@ -215,7 +215,7 @@
list.value.push('使用方式')
}
})
list.value.unshift('关联应用')
list.value.unshift('来源应用')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {