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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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