Merge branch 'hi-ucs-dev' of http://124.222.94.39:3001/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
guoyue 2022-06-27 14:47:49 +08:00
commit d2423b751d
12 changed files with 1119 additions and 787 deletions

View File

@ -2,7 +2,7 @@ import Cookies from 'js-cookie'
import qs from 'qs'
import { deepClone } from '@/utils/form-generator/index'
export default {
data() {
data () {
/* eslint-disable */
return {
// 设置属性
@ -38,19 +38,19 @@ export default {
}
/* eslint-enable */
},
created() {
created () {
if (this.mixinViewModuleOptions.createdIsNeed) {
this.query()
}
},
activated() {
activated () {
if (this.mixinViewModuleOptions.activatedIsNeed) {
this.query()
}
},
methods: {
// 获取数据列表
query() {
query () {
this.dataListLoading = true
this.$http.get(
this.mixinViewModuleOptions.getDataListURL + '?' + qs.stringify({
@ -102,7 +102,7 @@ export default {
return item
}
})
this.total = this.mixinViewModuleOptions.getDataListIsPage ? this.dataList.length : 0
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
})
} else {
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
@ -118,11 +118,11 @@ export default {
})
},
// 多选
dataListSelectionChangeHandle(val) {
dataListSelectionChangeHandle (val) {
this.dataListSelections = val
},
// 排序
dataListSortChangeHandle(data) {
dataListSortChangeHandle (data) {
if (!data.order || !data.prop) {
this.order = ''
this.orderField = ''
@ -133,13 +133,13 @@ export default {
this.query()
},
// 分页, 每页条数
pageSizeChangeHandle(val) {
pageSizeChangeHandle (val) {
this.page = 1
this.limit = val
this.query()
},
// 分页, 当前页
pageCurrentChangeHandle(val) {
pageCurrentChangeHandle (val) {
this.page = val
this.query()
},
@ -148,7 +148,7 @@ export default {
this.query()
},
// 新增
addOrUpdateHandle(id) {
addOrUpdateHandle (id) {
this.addOrUpdateVisible = true
this.disabled = false
this.$nextTick(() => {
@ -159,7 +159,7 @@ export default {
},
// 组件服务新增
addOrUpdateHandleAI(id) {
addOrUpdateHandleAI (id) {
// const infoList = []
let showList = []
this.$http.get('category/getCategoryTree').then(({ data: res }) => {
@ -217,7 +217,7 @@ export default {
}, 100)
},
// 应用资源新增
addOrUpdateHandleServe(id) {
addOrUpdateHandleServe (id) {
// const infoList = []
let showList = []
this.$http.get('category/getCategoryTree').then(({ data: res }) => {
@ -275,7 +275,7 @@ export default {
}, 100)
},
// 修改
UpdateHandle(val) {
UpdateHandle (val) {
this.addOrUpdateVisible = true
this.disabled = false
const cloneVal = deepClone(val)
@ -300,7 +300,7 @@ export default {
})
},
// 关闭当前窗口
closeCurrentTab(data) {
closeCurrentTab (data) {
var tabName = this.$store.state.contentTabsActiveName
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName)
if (this.$store.state.contentTabs.length <= 0) {
@ -312,7 +312,7 @@ export default {
}
},
// 删除
deleteHandle(id) {
deleteHandle (id) {
if (this.mixinViewModuleOptions.deleteIsBatch && !id && this.dataListSelections.length <= 0) {
return this.$message({
message: this.$t('prompt.deleteBatch'),
@ -346,7 +346,7 @@ export default {
}).catch(() => { })
},
deleteHandle2(id) {
deleteHandle2 (id) {
console.log('删除========================》', id, this.dataListSelections)
const ids = []
if (id) {
@ -364,7 +364,7 @@ export default {
})
},
// 导出
exportHandle() {
exportHandle () {
var params = qs.stringify({
token: Cookies.get('ucsToken'),
...this.dataForm

View File

@ -0,0 +1,169 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-27 11:27:22
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-27 11:50:45
* @Description: 能力申请
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-activiti__process">
<el-form
:inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()"
>
<el-form-item>
<el-input
v-model="dataForm.taskName"
:placeholder="$t('process.name')"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getDataList()">{{
$t("query")
}}</el-button>
</el-form-item>
</el-form>
<el-table
v-loading="dataListLoading"
:data="dataList"
border
@selection-change="dataListSelectionChangeHandle"
@sort-change="dataListSortChangeHandle"
style="width: 100%"
>
<el-table-column
type="selection"
header-align="center"
align="center"
width="50"
></el-table-column>
<el-table-column label="申请人" header-align="center" align="center">
<template slot-scope="scope">
<span>{{
(scope.row.params && scope.row.params.user) ||
(scope.row.params && scope.row.params.applyUserName) ||
(scope.row.params && scope.row.params.userName) ||
(scope.row.params && scope.row.params.undercarriageUserName)||
(scope.row.params && scope.row.params.name)
}}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('process.system')"
header-align="center"
align="center"
>
<template slot-scope="scope">
<span>{{
(scope.row.params && scope.row.params.system) ||
(scope.row.params && scope.row.params.demandSubject) ||
(scope.row.params &&
scope.row.params.resourceDTO &&
scope.row.params.resourceDTO.name) ||
(scope.row.params && scope.row.params.undercarriageReason)||
(scope.row.params && scope.row.params.comment)
}}</span>
</template>
</el-table-column>
<!-- <el-table-column prop="businessKey" :label="$t('process.businessKey')" header-align="center" align="center"></el-table-column>
<el-table-column prop="processInstanceId" :label="$t('running.id')" header-align="center" align="center"></el-table-column> -->
<el-table-column
prop="processDefinitionName"
:label="$t('process.processDefinitionName')"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="taskName"
:label="$t('process.taskName')"
header-align="center"
align="center"
></el-table-column>
<!-- <el-table-column prop="startTime" :label="$t('process.startTime')" header-align="center" align="center"></el-table-column> -->
<el-table-column
prop="createTime"
:label="$t('process.createTime')"
header-align="center"
align="center"
></el-table-column>
<el-table-column
:label="$t('handle')"
fixed="right"
header-align="center"
align="center"
width="150"
>
<template slot-scope="scope">
<el-button
type="text"
size="small"
:processInstanceId="processInstanceId"
@click="taskHandle(scope.row)"
>{{ $t("manage") }}</el-button
>
<el-button
type="text"
size="small"
@click="taskDetail(scope.row)"
>{{ $t("process.viewFlowImage") }}</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle"
>
</el-pagination>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import processModule from '@/mixins/process-module'
export default {
mixins: [mixinViewModule, processModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/act/task/myToDoTaskPage',
getDataListIsPage: true,
activatedIsNeed: true,
deleteIsBatch: true,
deleteIsBatchKey: 'deploymentId'
},
dataForm: {
taskName: '',
taskId: ''
},
processInstanceId: ''
}
},
components: {},
methods: {
//
taskHandle (row) {
console.log('row======================>', row, this.forwardHandleUrl)
if (!row.businessKey) {
return this.$message.error(this.$t('task.businessKeyError'))
}
this.getProcDefRouteSet(row, this.forwardHandleUrl)
},
taskDetail (row) {
if (!row.businessKey) {
return this.$message.error(this.$t('task.detailError'))
}
this.getProcDefRouteSet(row, this.forwardTaskDetail)
}
}
}
</script>

View File

@ -1,13 +1,13 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-24 18:16:44
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-27 14:22:56
* @Description: 数据资源参数配置
*/
// const newLocation = 'qingdao'
// const newLocation = 'baotou'
const newLocation = 'qingdao'
// const newLocation = 'baotou'
// const newLocation = 'xihaian'
//
const whoShow = {}

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-19 10:15:33
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-24 15:04:52
* @LastEditTime: 2022-06-27 12:52:18
* @Description: 告诉大家这是什么
-->
<template>
@ -156,7 +156,8 @@
})
arr.resourceTop5.forEach((val, index) => {
assignRankings.value[index].name = val['服务名称'] || ''
assignRankings.value[index].operation = val['申请次数'] || ''
assignRankings.value[index].operation =
val['申请次数'] >= 0 ? val['申请次数'] : ''
})
}
})

View File

@ -7,7 +7,10 @@
<div class="content">
<div v-for="(item, index) in dataFrom" :key="index" class="content-card">
<div class="content-title">{{ item.title }}</div>
<a-tooltip>
<template #title>{{ item.content }}</template>
<div class="content-content">{{ item.content }}</div>
</a-tooltip>
<div class="content-footer">
<span>{{ item.unit }}</span>
<span>{{ item.value }}</span>

View File

@ -34,7 +34,7 @@
</a-button>
<a-button type="primary" @click="addShoppingCart()">
<template #icon><shopping-cart-outlined /></template>
加入
加入购车
</a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button>
</div>

View File

@ -35,7 +35,7 @@
</a-button>
<a-button type="primary" @click="addShoppingCart()">
<template #icon><shopping-cart-outlined /></template>
加入
加入购车
</a-button> -->
<a-button type="primary" @click="goTOCollection()">收藏</a-button>
</div>

View File

@ -35,7 +35,7 @@
</a-button>
<a-button type="primary" @click="addShoppingCart()">
<template #icon><shopping-cart-outlined /></template>
加入
加入购车
</a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button>
</div>

View File

@ -11,39 +11,70 @@
</div>
<div class="condition" :key="showKey">
<ul>
<li v-for="item in selList" :key="item.value" @click="changeCondition(item.value)" v-show="item.show">
<li
v-for="item in selList"
:key="item.value"
@click="changeCondition(item.value)"
v-show="item.show"
>
{{ item.name }}
<span class="arrow" :class="item.value == selData ? 'down' : ''"></span>
<span
class="arrow"
:class="item.value == selData ? 'down' : ''"
></span>
</li>
</ul>
</div>
</div>
<div class="result-list" v-for="(item, index) in resourceList.data" :key="item.index">
<div
class="result-list"
v-for="(item, index) in resourceList.data"
:key="item.index"
>
<div class="item">
<div class="left" :class="
<div
class="left"
:class="
item.type == '应用资源'
? 'yyzy'
: item.applicationType == '智能算法'
? 'znsf'
: 'gis'
" v-if="selectCardsname !== '基础设施'"></div>
"
v-if="selectCardsname !== '基础设施'"
></div>
<div class="left jcss" v-else></div>
<div class="right">
<div class="header">
<span style="display: flex; align-items: center">
{{ item.name }}
<svg t="1652322568870" class="icon" viewBox="0 0 3072 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="3062" width="40" height="40" v-if="item.applyState == '通过'"
style="margin-left: 10px">
<svg
t="1652322568870"
class="icon"
viewBox="0 0 3072 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="3062"
width="40"
height="40"
v-if="item.applyState == '通过'"
style="margin-left: 10px"
>
<path
d="M2958.222222 0a113.777778 113.777778 0 0 1 113.777778 113.777778v796.444444a113.777778 113.777778 0 0 1-113.777778 113.777778H500.053333a113.777778 113.777778 0 0 1-85.617777-38.798222L32.824889 549.432889a56.888889 56.888889 0 0 1 0-74.922667L414.435556 38.798222A113.777778 113.777778 0 0 1 499.996444 0H2958.222222z m0 56.888889H500.053333a56.888889 56.888889 0 0 0-42.837333 19.399111L75.605333 512l381.610667 435.712a56.888889 56.888889 0 0 0 42.780444 19.399111H2958.222222a56.888889 56.888889 0 0 0 56.888889-56.888889V113.777778a56.888889 56.888889 0 0 0-56.888889-56.888889z"
fill="#d81e06" p-id="3063"></path>
fill="#d81e06"
p-id="3063"
></path>
<path
d="M398.222222 398.222222a113.777778 113.777778 0 1 1 0 227.555556 113.777778 113.777778 0 0 1 0-227.555556z m0 56.888889a56.888889 56.888889 0 1 0 0 113.777778 56.888889 56.888889 0 0 0 0-113.777778z"
fill="#d81e06" p-id="3064"></path>
fill="#d81e06"
p-id="3064"
></path>
<path
d="M1309.582222 491.064889v-273.066667h-505.173333v47.786667h455.338667v178.176h-378.88V342.926222h-49.152v358.4c0 55.978667 27.306667 84.650667 82.602666 84.650667h370.005334c28.672-1.365333 51.2-8.874667 66.218666-23.210667 16.384-17.749333 27.989333-68.266667 34.816-152.917333l-47.786666-15.018667-1.706667 26.737778c-4.664889 58.766222-12.970667 93.582222-24.917333 104.334222-10.24 8.192-23.893333 12.288-40.277334 12.288h-342.698666c-31.402667 0-47.104-15.701333-47.104-45.738666v-201.386667h428.714666z m430.08-307.2v102.4h-219.136v386.389333h48.469334v-46.421333h170.666666v178.858667h50.517334v-178.858667h167.936v41.642667h48.469333V286.264889h-216.405333v-102.4h-50.517334z m-170.666666 395.946667v-102.4h170.666666v102.4h-170.666666z m221.184 0v-102.4h167.936v102.4h-167.936z m-221.184-146.773334V332.003556h170.666666v101.034666h-170.666666z m221.184 0V332.003556h167.936v101.034666h-167.936z m733.866666-251.221333v44.373333h-165.205333v40.277334h165.205333v45.738666h-137.898666v39.594667h137.898666V398.222222h-184.32v40.96h417.792V398.222222h-186.368v-46.421333h144.725334v-39.594667h-144.725334v-45.738666h169.301334v-40.277334h-169.301334v-44.373333h-47.104z m-85.333333 429.397333h220.501333v49.834667h-220.501333v-49.834667z m220.501333-38.229333h-220.501333v-50.517333h220.501333v50.517333z m-220.501333 126.293333h220.501333v38.912c0 15.701333-8.874667 23.893333-25.258666 23.893334l-54.613334-2.048 11.605334 43.690666h57.344c38.229333 0 58.026667-18.432 58.026666-55.296v-266.24H2391.608889V807.822222h47.104v-108.544z m-222.549333-509.952l-34.816 33.450667c49.152 36.864 88.064 71.68 116.736 104.448l33.450666-34.133333a795.079111 795.079111 0 0 0-115.370666-103.765334z m-82.602667 201.386667h144.725333v299.690667c20.48-19.114667 41.642667-40.277333 64.853334-64.170667l12.970666 51.882667a923.932444 923.932444 0 0 1-121.514666 105.813333l-19.114667-43.690667c10.24-9.557333 15.701333-19.797333 15.701333-31.402666V437.816889h-97.621333v-47.104z"
fill="#d81e06" p-id="3065"></path>
fill="#d81e06"
p-id="3065"
></path>
</svg>
</span>
<div class="header-right">
@ -65,9 +96,11 @@
</div>
</div>
<div class="dec">
<div v-if="
<div
v-if="
selectCardsname !== '基础设施' && selectCardsname !== '数据资源'
">
"
>
<span>{{ item.shareType || '--' }}</span>
</div>
<div>
@ -95,7 +128,11 @@
<!-- <template #title>
<span>{{ item.score || 0 }}</span>
</template> -->
<a-rate :value="item.score || 0" disabled v-if="item.score != 0" />
<a-rate
:value="item.score || 0"
disabled
v-if="item.score != 0"
/>
</a-tooltip>
</div>
</div>
@ -103,25 +140,48 @@
<div class="right" v-if="selectCardsname !== '基础设施'">
<div class="shopping" :key="shoppingKey">
<span class="shopping-down" v-if="item.isInShoppingCart"></span>
<span class="shopping-on" v-else @click="addShoppingCart(item, index)"></span>
<span
class="shopping-on"
v-else
@click="addShoppingCart(item, index)"
></span>
</div>
<div class="sc">
<span class="sc-down" v-if="item.isCollect == 'false'" @click="addCollect(item)"></span>
<span class="sc-on" v-if="item.isCollect == 'true'" @click="addCollect(item)"></span>
<a-button style="margin-left: 10px" v-show="
<span
class="sc-down"
v-if="item.isCollect == 'false'"
@click="addCollect(item)"
></span>
<span
class="sc-on"
v-if="item.isCollect == 'true'"
@click="addCollect(item)"
></span>
<a-button
style="margin-left: 10px"
v-show="
cardType == '组件服务' &&
findComponentName(item, '智能算法')
">
"
>
免费试用
</a-button>
</div>
<div class="shopping pk" :key="pk">
<span class="pk-on" @click="goComparePk(item, index)"></span>
</div>
<a-button type="primary" @click="toView('details', item)">
<a-button
type="primary"
@click="toView('details', item)"
v-if="whoShow1.itShowQingDao"
>
查看详情
</a-button>
<a-button type="primary" @click="toView('apply', item)">
<a-button
type="primary"
@click="toView('apply', item)"
v-show="cardType !== '数据资源'"
>
{{
item.shareCondition == '免批申请' ? '免批申请' : '立即申请'
}}
@ -136,7 +196,12 @@
</div>
</div>
</div>
<a-modal v-model:visible="visible" title="视频预览" :width="750" destroyOnClose>
<a-modal
v-model:visible="visible"
title="视频预览"
:width="750"
destroyOnClose
>
<template #footer></template>
<div style="width: 100%; display: flex; justify-content: center">
<div style="width: 100%; height: 100%">
@ -147,20 +212,20 @@
</div>
</template>
<script>
import { ref, reactive } from 'vue'
import { message } from 'ant-design-vue'
import { useRouter } from 'vue-router'
import { getUser, sgcInsert } from '@/api/home'
import { scInsert, scDel } from '@/api/personalCenter'
import mybus from '@/myplugins/mybus'
import { getHls } from '@/api/home.js'
export default {
import { ref, reactive } from 'vue'
import { message } from 'ant-design-vue'
import { useRouter } from 'vue-router'
import { getUser, sgcInsert } from '@/api/home'
import { scInsert, scDel } from '@/api/personalCenter'
import mybus from '@/myplugins/mybus'
import { getHls } from '@/api/home.js'
export default {
name: '',
// props: ['resourceList', 'resourceTotal', 'selectCardsname'],
props: {
resourceList: {
type: Object,
default: () => { },
default: () => {},
},
resourceTotal: {
type: String,
@ -256,6 +321,8 @@ export default {
},
components: {},
setup(props) {
// eslint-disable-next-line no-undef
const whoShow1 = whoShow
let shoppingKey = ref(1)
// id
const selList = ref([
@ -297,7 +364,12 @@ export default {
console.log('or use this.value', searchValue.value)
}
function toView(type, item) {
debugger
if (props.selectCardsname == '数据资源') {
window.open(
'http://15.72.158.81/web/ZWXXSQ/bm/MuluDetail.aspx?zyguid=' +
item.guid
)
} else {
if (type === 'apply') {
// window.open(newpage.href, '_blank')
router.push({
@ -321,6 +393,7 @@ export default {
})
}
}
}
//
const addShoppingCart = (item, index) => {
console.log('item===============>', item)
@ -453,17 +526,18 @@ export default {
videoUrl,
options,
visible,
goComparePk
goComparePk,
whoShow1,
}
},
beforeUnmount() {
mybus.off('chongzhi')
mybus.emit('changeSelcted')
},
}
}
</script>
<style scoped lang="less">
#search-result-list-container {
#search-result-list-container {
width: 1088px;
padding: 0 20px;
background: #f3f5f9;
@ -760,11 +834,11 @@ export default {
margin-top: 10px;
align-items: center;
&>div {
& > div {
display: flex;
align-items: center;
&>div {
& > div {
margin: 0 10px;
}
}
@ -791,5 +865,5 @@ export default {
margin-top: 0;
}
}
}
}
</style>

View File

@ -39,9 +39,12 @@
fill="#0058e1"
></path>
</svg>
<a-tooltip>
<template #title>{{ val.title }}</template>
<span class="name">
{{ val.title }}
</span>
</a-tooltip>
</div>
<span v-if="item.title !== '区级'">{{ val.total }}</span>
<span v-else>
@ -75,9 +78,12 @@
fill="#0058e1"
></path>
</svg>
<a-tooltip>
<template #title>{{ child.title }}</template>
<span class="name">
{{ child.title }}
</span>
</a-tooltip>
</div>
<span>{{ child.total }}</span>
</div>

View File

@ -1,5 +1,21 @@
<template>
<div class="title">申购车</div>
<div class="bottom">
<div class="left">
<a-checkbox v-model:checked="checkAll" @change="onCheckAllChange">
全选
</a-checkbox>
<a-checkbox
v-model:checked="reverseSelectionFalg"
@change="reverseSelection"
>
反选
</a-checkbox>
<p>
已选
<span class="num">{{ checkedList.length }}</span>
</p>
</div>
<div class="right">
<div class="sousuokuang">
<a-input-search
v-model:value="name"
@ -9,15 +25,56 @@
@change="onSearch"
@search="getList"
/>
</div>
<a-popconfirm
title="是否进行批量删除?"
ok-text="是"
cancel-text="否"
@confirm="delList"
@cancel="cancel"
>
<a-button
type="primary"
style="width: 0.8rem; height: 0.36rem; margin-left: 0.1rem"
@click="clean"
style="
width: 1rem;
height: 0.36rem;
margin-right: 0.12rem;
border-radius: 2px;
background: #fff;
color: #0558e1;
"
>
重置
批量删除
</a-button>
</a-popconfirm>
<a-button
type="primary"
style="
width: 1rem;
height: 0.36rem;
border-radius: 2px;
background: #fff;
color: #0558e1;
"
@click="collection"
>
批量收藏
</a-button>
<a-button
type="primary"
style="
width: 1rem;
height: 0.36rem;
margin-left: 0.12rem;
border-radius: 2px;
"
@click="apply"
>
一键申请
</a-button>
</div>
<div class="tab">
</div>
<!-- <div class="tab">
<span>筛选</span>
<div
:class="tabIndex == index ? 'tabclass' : ' '"
@ -27,7 +84,7 @@
>
{{ item }}
</div>
</div>
</div> -->
<a-list
class="demo-loadmore-list"
:loading="initLoading"
@ -50,7 +107,8 @@
>
{{ item.name }}
</span>
<span class="time">加购时间{{ item.updateDate }}</span>
<!-- <span class="time">加购时间{{ item.updateDate }}</span> -->
<span class="type">{{ item.type }}</span>
<svg
t="1652233950228"
class="icon"
@ -116,48 +174,6 @@
<span>{{ props.value }}/</span>
</template>
</a-pagination>
<div class="bottom">
<div class="left">
<a-checkbox v-model:checked="checkAll" @change="onCheckAllChange">
全选
</a-checkbox>
<a-popconfirm
title="是否进行批量删除?"
ok-text="是"
cancel-text="否"
@confirm="delList"
@cancel="cancel"
>
<a-button
type="primary"
style="width: 0.7rem; height: 0.32rem; margin-left: 0.1rem"
>
删除
</a-button>
</a-popconfirm>
<a-button
type="primary"
style="width: 0.7rem; height: 0.32rem; margin-left: 0.1rem"
@click="collection"
>
收藏
</a-button>
</div>
<div class="right">
<p>
合计
<span class="num">{{ checkedList.length }}</span>
<span></span>
</p>
<a-button
type="primary"
style="width: 1rem; height: 0.32rem; margin-left: 0.3rem"
@click="apply"
>
一键申请
</a-button>
</div>
</div>
</template>
<script setup>
import { onMounted, ref } from 'vue'
@ -235,7 +251,7 @@
}
//
const onCheckAllChange = () => {
console.log(checkedList)
// console.log(checkedList)
if (checkAll.value) {
// checkedList.value = []
list.value.forEach((val) => {
@ -248,7 +264,7 @@
dataResourceId.value.push(val.resourceId)
arr.value.push(val.name)
})
console.log(checkAll.value)
// console.log(checkAll.value)
} else {
list.value.forEach((val) => {
val.checked = false
@ -262,6 +278,41 @@
console.log(checkAll.value)
}
}
//
const reverseSelectionFalg = ref(false)
const reverseSelection = () => {
console.log(
'点击反选==============>',
checkedList.value,
checkAll.value,
list.value
)
reverseSelectionFalg.value = !reverseSelectionFalg.value
if (checkAll.value) {
checkAll.value = false
list.value.map((val) => {
if (checkedList.value.indexOf(val.id) > -1) {
val.checked = false
checkedList.value.splice(checkedList.value.indexOf(val.id), 1)
}
})
} else {
const arr = []
list.value.map((val) => {
if (val.checked) {
checkedList.value.splice(checkedList.value.indexOf(val.id), 1)
} else {
checkedList.value.push(val.id)
arr.push(val.id)
}
val.checked = !val.checked
if (arr.length == list.value.length) {
checkAll.value = true
}
})
}
reverseSelectionFalg.value = !reverseSelectionFalg.value
}
//
const clean = () => {
name.value = ''
@ -321,10 +372,10 @@
getList()
}
//
const onSearch = (name) => {
name.value = name
console.log(name.value)
}
// const onSearch = (name) => {
// name.value = name
// console.log(name.value)
// }
//id
const dataResourceId = ref([])
@ -358,18 +409,18 @@
showKey.value++
}
//
const tabIndex = ref(-1)
const changeTab = (index) => {
console.log('tabIndex', tabIndex.value, index, tabList)
if (tabIndex.value == index) {
tabIndex.value = -1
type.value = ''
} else {
tabIndex.value = index
type.value = tabList.value[index]
}
getList()
}
// const tabIndex = ref(-1)
// const changeTab = (index) => {
// console.log('tabIndex', tabIndex.value, index, tabList)
// if (tabIndex.value == index) {
// tabIndex.value = -1
// type.value = ''
// } else {
// tabIndex.value = index
// type.value = tabList.value[index]
// }
// getList()
// }
//
const delList = () => {
if (checkedList.value.length == 0) {
@ -433,8 +484,11 @@
</script>
<style lang="less" scoped>
.ant-list {
height: 5.4rem;
height: 7.23rem;
overflow-y: scroll;
.ant-list-item {
width: 10.5rem;
padding: 0.24rem 0;
.ant-list-item-meta {
align-items: center;
:deep(.ant-list-item-meta-avatar) {
@ -446,10 +500,22 @@
font-size: 0.12rem;
color: #ccc;
}
.type {
margin-left: 0.1rem;
padding: 0.03rem 0.1rem;
background: #00a7e3;
color: #fff;
}
:deep(.ant-list-item-meta-description) {
margin-top: 0.1rem;
max-height: 0.44rem;
overflow: hidden;
margin-right: 0.1rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
}
}
}
@ -461,21 +527,57 @@
display: flex;
justify-content: space-between;
align-items: center;
.left span {
border-bottom: 1px solid #f0f0f0;
.left {
display: flex;
align-items: center;
p {
height: 0.18rem;
line-height: 0.14rem;
padding-left: 0.1rem;
margin-bottom: 0;
border-left: 1px solid #212121;
}
span {
margin-left: 0.1rem;
}
.num {
margin-left: 0;
color: #0087ff;
font-size: 0.2rem;
}
}
.right {
display: flex;
align-items: center;
span {
color: #0087ff;
}
.num {
font-size: 0.2rem;
}
justify-content: space-around;
button {
margin-bottom: 0.1rem;
}
.sousuokuang {
width: 3.2rem;
margin: 0.1rem 0rem 0.21rem 0.2rem;
.ant-input-search {
max-width: 3rem;
}
:deep(.ant-input) {
width: 2.4rem;
height: 0.36rem;
font-size: 0.14rem;
color: #000;
background: #fff;
}
:deep(.ant-input-group-addon) {
display: inline-block;
margin-left: 0.1rem;
.ant-input-search-button {
width: 0.6rem;
height: 0.36rem;
border-radius: 2px;
font-size: 0.14rem;
}
}
}
}
}
.title {
@ -486,29 +588,6 @@
margin-top: 0.2rem;
margin-left: 0.2rem;
}
.sousuokuang {
margin: 0.1rem 0rem 0.21rem 0.2rem;
.ant-input-search {
max-width: 4.9rem;
}
:deep(.ant-input) {
width: 4rem;
height: 0.36rem;
font-size: 0.14rem;
color: #b2b2b2;
background: #f5f5f5;
}
:deep(.ant-input-group-addon) {
display: inline-block;
margin-left: 0.1rem;
.ant-input-search-button {
width: 0.8rem;
height: 0.36rem;
border-radius: 0.04rem;
font-size: 0.14rem;
}
}
}
.tab {
margin-top: 0.1rem;
margin-left: 0.2rem;

View File

@ -84,7 +84,7 @@
article {
width: 1090px;
height: 99%;
overflow-y: auto;
// overflow-y: auto;
background-color: #fff;
margin: 1% 0 1% 14px;
}