可信代码库-搜索列表页面优化
This commit is contained in:
@@ -43,7 +43,7 @@
|
|||||||
"sortablejs": "^1.15.0",
|
"sortablejs": "^1.15.0",
|
||||||
"swiper": "^10.3.1",
|
"swiper": "^10.3.1",
|
||||||
"vue": "^3.3.4",
|
"vue": "^3.3.4",
|
||||||
"vue-devui": "^1.6.7",
|
"vue-devui": "^1.6.31",
|
||||||
"vue-router": "^4.2.2",
|
"vue-router": "^4.2.2",
|
||||||
"yaml": "^2.4.1"
|
"yaml": "^2.4.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -19,6 +19,10 @@
|
|||||||
.jyh-form-operation {
|
.jyh-form-operation {
|
||||||
margin-left: 20px !important;
|
margin-left: 20px !important;
|
||||||
}
|
}
|
||||||
|
.devui-form__label-help {
|
||||||
|
width: 14px !important;
|
||||||
|
height: 14px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.jyh-table {
|
.jyh-table {
|
||||||
@@ -46,4 +50,98 @@
|
|||||||
padding-top: 10px !important;
|
padding-top: 10px !important;
|
||||||
padding-bottom: 10px !important;
|
padding-bottom: 10px !important;
|
||||||
}
|
}
|
||||||
|
.header-container {
|
||||||
|
.filter-icon {
|
||||||
|
flex: 0;
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
.devui-table__sort-clickable {
|
||||||
|
flex: 0;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.jyh-tabs {
|
||||||
|
.devui-tabs__nav {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.devui-tabs__nav--wrapped>li.active {
|
||||||
|
border-radius: 4px 4px 0px 0px;
|
||||||
|
background: #F3F3F3;
|
||||||
|
|
||||||
|
.devui-tabs__nav-content {
|
||||||
|
a {
|
||||||
|
color: #191919;
|
||||||
|
font-family: HarmonyOS Sans SC;
|
||||||
|
font-weight: medium;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 22px;
|
||||||
|
letter-spacing: 0px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.devui-tab__content {
|
||||||
|
//background: #F3F3F3;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
.devui-tabs__nav-content {
|
||||||
|
a {
|
||||||
|
color: #808080;
|
||||||
|
font-family: HarmonyOS Sans SC;
|
||||||
|
font-weight: regular;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 22px;
|
||||||
|
letter-spacing: 0px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.jyh-checkbox-group {
|
||||||
|
div {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
.devui-checkbox label {
|
||||||
|
color: #191919;
|
||||||
|
font-family: HarmonyOS Sans SC;
|
||||||
|
font-weight: regular;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 22px;
|
||||||
|
letter-spacing: 0px;
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.devui-dropdown-menu-multiple {
|
||||||
|
.devui-select__multiple {
|
||||||
|
.devui-tag {
|
||||||
|
.devui-tag--default {
|
||||||
|
display: flex;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: #1919190C;
|
||||||
|
padding: 0 4px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
.remove-button {
|
||||||
|
margin-left: 8px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.devui-select__clearable {
|
||||||
|
.devui-select__multiple--input {
|
||||||
|
width: 1px;
|
||||||
|
min-width: 1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.jyh-select-multiple {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ html {
|
|||||||
overflow-y: scroll; // html本身没有滚动 为了防止自定义滚动条出现时界面抖动,需要预留轨道
|
overflow-y: scroll; // html本身没有滚动 为了防止自定义滚动条出现时界面抖动,需要预留轨道
|
||||||
}
|
}
|
||||||
html body {
|
html body {
|
||||||
background-color: $devui-global-bg;
|
//background-color: $devui-global-bg;
|
||||||
|
background-color: #F6F6F8;
|
||||||
|
|
||||||
font-size: var(--text-sm);
|
font-size: var(--text-sm);
|
||||||
color: var(--color-font);
|
color: var(--color-font);
|
||||||
}
|
}
|
||||||
|
|||||||
137
src/main.ts
137
src/main.ts
@@ -21,6 +21,7 @@ import dInput from 'vue-devui/input';
|
|||||||
import { FormOperation } from 'vue-devui/form';
|
import { FormOperation } from 'vue-devui/form';
|
||||||
import { Option } from 'vue-devui/select';
|
import { Option } from 'vue-devui/select';
|
||||||
import { BreadcrumbItem } from 'vue-devui/breadcrumb';
|
import { BreadcrumbItem } from 'vue-devui/breadcrumb';
|
||||||
|
import { CheckboxGroup as DCheckboxGroup, Checkbox as DCheckbox } from 'vue-devui/checkbox';
|
||||||
import { useReport } from '@/utils/hooks/useReport';
|
import { useReport } from '@/utils/hooks/useReport';
|
||||||
import { savePageRef } from '@/utils';
|
import { savePageRef } from '@/utils';
|
||||||
import qs from 'qs';
|
import qs from 'qs';
|
||||||
@@ -40,73 +41,73 @@ declare global {
|
|||||||
/**
|
/**
|
||||||
* micro-app 微前端
|
* micro-app 微前端
|
||||||
*/
|
*/
|
||||||
import microApp from '@micro-zoe/micro-app';
|
// import microApp from '@micro-zoe/micro-app';
|
||||||
microApp.start({
|
// microApp.start({
|
||||||
'disable-memory-router': true, // 关闭虚拟路由系统
|
// 'disable-memory-router': true, // 关闭虚拟路由系统
|
||||||
'disable-patch-request': true, // 关闭对子应用请求的拦截
|
// 'disable-patch-request': true, // 关闭对子应用请求的拦截
|
||||||
lifeCycles: {
|
// lifeCycles: {
|
||||||
created() {
|
// created() {
|
||||||
// console.log('created');
|
// // console.log('created');
|
||||||
},
|
// },
|
||||||
beforemount() {
|
// beforemount() {
|
||||||
// console.log('beforemount');
|
// // console.log('beforemount');
|
||||||
},
|
// },
|
||||||
mounted() {
|
// mounted() {
|
||||||
console.log('fst', performance.now().toFixed()); // 首屏时间
|
// console.log('fst', performance.now().toFixed()); // 首屏时间
|
||||||
// console.log('mounted');
|
// // console.log('mounted');
|
||||||
},
|
// },
|
||||||
unmount() {
|
// unmount() {
|
||||||
console.log('unmount');
|
// console.log('unmount');
|
||||||
},
|
// },
|
||||||
error(e) {
|
// error(e) {
|
||||||
Sentry.captureException(new Error('主站Error:生命周期错误'), {
|
// Sentry.captureException(new Error('主站Error:生命周期错误'), {
|
||||||
level: 'error',
|
// level: 'error',
|
||||||
extra: {
|
// extra: {
|
||||||
...e
|
// ...e
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
microApp.router.setBaseAppRouter(router);
|
// microApp.router.setBaseAppRouter(router);
|
||||||
|
//
|
||||||
microApp.router.beforeEach({
|
// microApp.router.beforeEach({
|
||||||
'micoro-app-homeweb-app': (to, from) => {
|
// 'micoro-app-homeweb-app': (to, from) => {
|
||||||
const toQuery = qs.parse(to.search, { ignoreQueryPrefix: true });
|
// const toQuery = qs.parse(to.search, { ignoreQueryPrefix: true });
|
||||||
const fromQuery = qs.parse(from.search, { ignoreQueryPrefix: true });
|
// const fromQuery = qs.parse(from.search, { ignoreQueryPrefix: true });
|
||||||
|
//
|
||||||
if (
|
// if (
|
||||||
toQuery.type !== fromQuery.type ||
|
// toQuery.type !== fromQuery.type ||
|
||||||
(from.pathname === '/search' && fromQuery.threadId && !toQuery.threadId && toQuery.type === 'chat')
|
// (from.pathname === '/search' && fromQuery.threadId && !toQuery.threadId && toQuery.type === 'chat')
|
||||||
) {
|
// ) {
|
||||||
// 设置全局ref
|
// // 设置全局ref
|
||||||
savePageRef(to.fullPath);
|
// savePageRef(to.fullPath);
|
||||||
} else if (to.pathname === '/search' && toQuery.type === 'chat' && toQuery.threadId) {
|
// } else if (to.pathname === '/search' && toQuery.type === 'chat' && toQuery.threadId) {
|
||||||
const BASE_URL = (import.meta as any).env.VITE_HOST;
|
// const BASE_URL = (import.meta as any).env.VITE_HOST;
|
||||||
sessionStorage.setItem('ref', BASE_URL + to.fullPath);
|
// sessionStorage.setItem('ref', BASE_URL + to.fullPath);
|
||||||
} else {
|
// } else {
|
||||||
savePageRef(to.fullPath);
|
// savePageRef(to.fullPath);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
microApp.router.afterEach({
|
// microApp.router.afterEach({
|
||||||
'micoro-app-homeweb-app': (to, from) => {
|
// 'micoro-app-homeweb-app': (to, from) => {
|
||||||
const names = {
|
// const names = {
|
||||||
'/': '首页',
|
// '/': '首页',
|
||||||
'/search': '搜索',
|
// '/search': '搜索',
|
||||||
'/g-star': 'g-star',
|
// '/g-star': 'g-star',
|
||||||
'/g-star/apply': 'g-star 申请',
|
// '/g-star/apply': 'g-star 申请',
|
||||||
'/explore': '搜索开源'
|
// '/explore': '搜索开源'
|
||||||
};
|
// };
|
||||||
const toQuery = qs.parse(to.search, { ignoreQueryPrefix: true });
|
// const toQuery = qs.parse(to.search, { ignoreQueryPrefix: true });
|
||||||
if (to.pathname === '/search' && toQuery.type !== 'repo') {
|
// if (to.pathname === '/search' && toQuery.type !== 'repo') {
|
||||||
// 对话有threadid后上报
|
// // 对话有threadid后上报
|
||||||
if (toQuery.threadId) useReport('pageview', {}, { 'homeweb-page-title': names[to.pathname] });
|
// if (toQuery.threadId) useReport('pageview', {}, { 'homeweb-page-title': names[to.pathname] });
|
||||||
} else {
|
// } else {
|
||||||
useReport('pageview', {}, { 'homeweb-page-title': names[to.pathname] });
|
// useReport('pageview', {}, { 'homeweb-page-title': names[to.pathname] });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
storageService.setInstanceName('gitcode');
|
storageService.setInstanceName('gitcode');
|
||||||
// 缓存策略表
|
// 缓存策略表
|
||||||
@@ -183,6 +184,8 @@ Sentry.init({
|
|||||||
|
|
||||||
app.use(Icon);
|
app.use(Icon);
|
||||||
app.use(dInput);
|
app.use(dInput);
|
||||||
|
app.component('gc-checkbox-group', DCheckboxGroup);
|
||||||
|
app.component('gc-checkbox', DCheckbox);
|
||||||
app.component('gc-option', Option);
|
app.component('gc-option', Option);
|
||||||
app.component('gc-skeleton-item', SkeletonItem);
|
app.component('gc-skeleton-item', SkeletonItem);
|
||||||
app.component('gc-modal-header', ModalHeader);
|
app.component('gc-modal-header', ModalHeader);
|
||||||
|
|||||||
@@ -27,9 +27,22 @@ export default [
|
|||||||
headerClassName: ''
|
headerClassName: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'search/license',
|
||||||
|
name: 'SearchLicense',
|
||||||
|
component: () => import('@/views/Jyh/Search/license.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '高级搜索-License',
|
||||||
|
reportTitle: '搜索License',
|
||||||
|
className: 'w-full min-w-full',
|
||||||
|
hiddenFooter: true,
|
||||||
|
hasMobile: true,
|
||||||
|
asideMenu: 'drawer' // 左侧菜单抽屉模式
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'search',
|
path: 'search',
|
||||||
name: 'search',
|
name: 'Search',
|
||||||
component: () => import('@/views/Jyh/Search/index.vue'),
|
component: () => import('@/views/Jyh/Search/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '高级搜索',
|
title: '高级搜索',
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ export const injectRouter = router => {
|
|||||||
// 子应用单独处理
|
// 子应用单独处理
|
||||||
if (fromHomeWeb.includes(to.name)) return;
|
if (fromHomeWeb.includes(to.name)) return;
|
||||||
// 项目中代码点击tab单独上报(从其他地方跳转除外)
|
// 项目中代码点击tab单独上报(从其他地方跳转除外)
|
||||||
useReport('pageview', {});
|
// useReport('pageview', {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
364
src/views/Jyh/Search/Components/OssQuery.vue
Normal file
364
src/views/Jyh/Search/Components/OssQuery.vue
Normal file
@@ -0,0 +1,364 @@
|
|||||||
|
<template>
|
||||||
|
<div class="secret-container">
|
||||||
|
<div class="search-form">
|
||||||
|
<d-form
|
||||||
|
label-size="lg"
|
||||||
|
class="jyh-form"
|
||||||
|
ref="formRef"
|
||||||
|
:data="formData"
|
||||||
|
:pop-postion="['right']"
|
||||||
|
:rules="formRules"
|
||||||
|
>
|
||||||
|
<d-row :gutter="25" type="flex" class="docs-devui-row mb-4">
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="title" label="当前页面搜索关键字" :show-feedback="false">
|
||||||
|
<d-input
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="formData.title"
|
||||||
|
placeholder="License编码模糊搜索"
|
||||||
|
maxLength="50"
|
||||||
|
minLength="2"
|
||||||
|
/>
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="type" label="主/依赖类型" :show-feedback="false">
|
||||||
|
<gc-checkbox-group class="jyh-checkbox-group" v-model="formData.type" :options="typeOptions" direction="row"></gc-checkbox-group>
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="version" label="选型版本火车名称" help-tips="选型版本火车名称" :show-feedback="false">
|
||||||
|
<d-select class="jyh-select-multiple" v-model="formData.version" :multiple="true" :options="typeOptions" :allow-clear="true" />
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="title" label="软件编码" :show-feedback="false">
|
||||||
|
<d-input
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="formData.code"
|
||||||
|
placeholder="软件编码模糊搜索"
|
||||||
|
maxLength="50"
|
||||||
|
minLength="2"
|
||||||
|
/>
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
</d-row>
|
||||||
|
<d-row :gutter="25" type="flex" class="docs-devui-row mb-5">
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="name" label="软件名称" :show-feedback="false">
|
||||||
|
<d-input
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="formData.name"
|
||||||
|
placeholder="软件名称模糊搜索"
|
||||||
|
maxLength="50"
|
||||||
|
minLength="2"
|
||||||
|
/>
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="versionCode" label="版本编码" :show-feedback="false">
|
||||||
|
<d-input
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="formData.versionCode"
|
||||||
|
placeholder="版本编码模糊搜索"
|
||||||
|
maxLength="50"
|
||||||
|
minLength="2"
|
||||||
|
/>
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="pulishTime" label="发布时间" :show-feedback="false">
|
||||||
|
<d-date-picker-pro v-model="formData.pulishTime" :showTime="true"
|
||||||
|
placeholder="请选择日期与时间"
|
||||||
|
format="YYYY-MM-DD HH:mm:ss" />
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
<d-col style="flex: 1"></d-col>
|
||||||
|
</d-row>
|
||||||
|
<gc-form-operation class="jyh-form-operation">
|
||||||
|
<d-button class="mr-2" variant="solid">筛选</d-button>
|
||||||
|
<d-button variant="solid" color="secondary">清空</d-button>
|
||||||
|
</gc-form-operation>
|
||||||
|
<d-button class="output-btn" icon="icon-share" variant="text">导出</d-button>
|
||||||
|
</d-form>
|
||||||
|
</div>
|
||||||
|
<div class="mt-3">
|
||||||
|
<d-table class="jyh-table" v-if="tableData.length" :striped="false" :data="tableData" table-layout="auto">
|
||||||
|
<d-column type="index" width="40"></d-column>
|
||||||
|
<d-column field="versionName" header="选取版本火车名称" filterable :filter-list="filterList" @filter-change="handleFilterChange">
|
||||||
|
<template #default="scope">
|
||||||
|
<a>{{scope.row.versionName}}</a>
|
||||||
|
</template>
|
||||||
|
</d-column>
|
||||||
|
<d-column field="name" header="软件名称" filterable :filter-list="filterList" @filter-change="handleFilterChange"></d-column>
|
||||||
|
<d-column field="code" header="软件编码" filterable :filter-list="filterList" @filter-change="handleFilterChange"></d-column>
|
||||||
|
<d-column field="version" header="软件版本" filterable :filter-list="filterList" @filter-change="handleFilterChange">
|
||||||
|
<template #default="scope">
|
||||||
|
<a>{{scope.row.version}}</a>
|
||||||
|
</template>
|
||||||
|
</d-column>
|
||||||
|
<d-column field="versionCode" header="版本编码" sortable :sort-method="sortNameMethod" filterable :filter-list="filterList" @filter-change="handleFilterChange">
|
||||||
|
<template #default="scope">
|
||||||
|
<a>{{scope.row.versionCode}}</a>
|
||||||
|
</template>
|
||||||
|
</d-column>
|
||||||
|
<d-column field="versionCode" header="生命周期状态" sortable :sort-method="sortNameMethod" filterable :filter-list="filterList" @filter-change="handleFilterChange">
|
||||||
|
<template #default="scope">
|
||||||
|
<a>{{scope.row.versionCode}}</a>
|
||||||
|
</template>
|
||||||
|
</d-column>
|
||||||
|
<d-column field="type" header="主/依赖软件类型">
|
||||||
|
<template #default="scope">
|
||||||
|
<a>{{scope.row.type}}</a>
|
||||||
|
</template>
|
||||||
|
</d-column>
|
||||||
|
<d-column field="license" header="License名称" filterable :filter-list="filterList" @filter-change="handleFilterChange"></d-column>
|
||||||
|
|
||||||
|
<!-- <d-column field="risk" header="集成风险"></d-column>-->
|
||||||
|
<!-- <d-column field="useType" header="适用类型"></d-column>-->
|
||||||
|
<!-- <d-column field="status" header="状态">-->
|
||||||
|
<!-- <d-status>未开始</d-status>-->
|
||||||
|
<!-- </d-column>-->
|
||||||
|
<!-- <d-column field="key" header="键值"></d-column>-->
|
||||||
|
<!-- <d-column field="created" header="创建时间"></d-column>-->
|
||||||
|
<!-- <d-column field="updated" header="更新时间"></d-column>-->
|
||||||
|
<!-- <d-column header="操作" width="300">-->
|
||||||
|
<!-- <template #default="scope">-->
|
||||||
|
<!-- <div class="flex">-->
|
||||||
|
<!-- <div class="cursor-pointer flex items-center mr-[32px]" @click="editRow(scope.row)">-->
|
||||||
|
<!-- <GIcon class="mr-[8px]" name="gt-plane-edit" />-->
|
||||||
|
<!-- <span class="text-[#3B3E55] text-base font-normal">编辑</span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="flex items-center mr-[32px]">-->
|
||||||
|
<!-- <d-switch v-model="scope.row.status" class="mr-[8px]" @change="setClaStatus(scope.row)"-->
|
||||||
|
<!-- :active-value="1" :inactive-value="0"> </d-switch>-->
|
||||||
|
<!-- <span class="text-[#3B3E55] text-base font-normal">{{ scope.row.status === 0 ? '停用' : '启用' }}</span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="cursor-pointer flex items-center" @click="openDelete(scope.row)">-->
|
||||||
|
<!-- <GIcon class="mr-[8px]" name="gt-plane-delete" />-->
|
||||||
|
<!-- <span class="text-[#3B3E55] text-base font-normal">删除</span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </d-column>-->
|
||||||
|
</d-table>
|
||||||
|
|
||||||
|
<DataPanel v-else skeleton :card="false" :empty="true">
|
||||||
|
</DataPanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-20 mb-20 flex justify-end">
|
||||||
|
<d-pagination size="md" :page-size-options="[10, 20, 50]" :total="pager.total"
|
||||||
|
v-model:pageSize="pager.pageSize" v-model:pageIndex="pager.pageIndex" :max-items="5"
|
||||||
|
:can-change-page-size="true" :can-view-total="true" total-item-text="总计" @page-index-change="changeIndex()"
|
||||||
|
@page-size-change="changeSize()" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 删除组件 -->
|
||||||
|
<GModal v-model="deletevModels" ref="deleteModal" title="删除?" @confirm="confirmDelete" showWarnIcon
|
||||||
|
confirmColor="danger">
|
||||||
|
<span class="inline-block text-G900 text-sm font-normal leading-[20px] break-all">你确认删除此项:{{ item.cla_name }}
|
||||||
|
?</span>
|
||||||
|
</GModal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import SettingTitle from '@/components/Setting/SettingTitle/index.vue';
|
||||||
|
import SettingText from '@/components/Setting/SettingText/index.vue';
|
||||||
|
import { ref,reactive } from 'vue';
|
||||||
|
import { getGroupClaList, setGroupClaStatus, deleteGroupCla } from '@/api/cla';
|
||||||
|
import { useRouter, useRoute } from 'vue-router';
|
||||||
|
import { GModal } from '@/components/Setting/index';
|
||||||
|
import { reqCatch } from '@/utils/catch';
|
||||||
|
import { getOrgInfo } from '@/views/Org/hooks/orgInfo';
|
||||||
|
import { Message } from 'vue-devui';
|
||||||
|
const { namespace } = getOrgInfo();
|
||||||
|
|
||||||
|
const tableData = ref([
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
]);
|
||||||
|
const formData = ref({ title: '',type: '', useType: '',formData:'',select: '',time1:null,name:'',versionCode:'',pulishTime:'' });
|
||||||
|
const typeOptions = reactive(['主软件', '依赖软件']);
|
||||||
|
const riskOptions = reactive(['低', '中', '高']);
|
||||||
|
const useTypeOptions = reactive(['软件', '文档', '文档+软件']);
|
||||||
|
const isUseOptions = reactive(['是', '否']);
|
||||||
|
|
||||||
|
const pager = ref({
|
||||||
|
total: 10,
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 10
|
||||||
|
});
|
||||||
|
|
||||||
|
// 删除弹窗
|
||||||
|
const item = ref('');
|
||||||
|
const deleteModal = ref();
|
||||||
|
const deletevModels = ref(false);
|
||||||
|
const openDelete = (row: any) => {
|
||||||
|
item.value = row;
|
||||||
|
deleteModal.value.showFlag = true;
|
||||||
|
deletevModels.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
// 分页
|
||||||
|
const changeIndex = () => {
|
||||||
|
// getGroupClaListData();
|
||||||
|
};
|
||||||
|
|
||||||
|
const changeSize = () => {
|
||||||
|
pager.value.pageIndex = 1;
|
||||||
|
// getGroupClaListData();
|
||||||
|
};
|
||||||
|
|
||||||
|
const repoFun = (arr: any) => {
|
||||||
|
return arr ? (arr.length > 3 ? arr.slice(0, 3) : arr) : [];
|
||||||
|
};
|
||||||
|
|
||||||
|
// 编辑
|
||||||
|
const editRow = (row: any) => {
|
||||||
|
// 后续请换成params,暂时params传参没传过去
|
||||||
|
router.push({
|
||||||
|
path: 'cla/edit/' + row.object_id,
|
||||||
|
query: { cla: row.cla, pageType: 'edit' }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 确认删除
|
||||||
|
const confirmDelete = async (e: any) => {
|
||||||
|
// const res = await reqCatch(deleteGroupCla, { group_id: namespace.value, cla_id: item.value.object_id });
|
||||||
|
// if (!res.error) {
|
||||||
|
// getGroupClaListData();
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
|
||||||
|
// 去成员页
|
||||||
|
const goMember = (row: any) => {
|
||||||
|
// 后续请换成params,暂时params传参没传过去,注意路由有个:claID
|
||||||
|
router.push({
|
||||||
|
path: 'cla/claId/member',
|
||||||
|
query: { claId: row.object_id, claName: row.cla_name, group_path: namespace.value, pageType: 'edit' }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const getGroupClaListData = async () => {
|
||||||
|
// const params = {
|
||||||
|
// group_id: namespace.value,
|
||||||
|
// page: pager.value.pageIndex,
|
||||||
|
// per_page: pager.value.pageSize
|
||||||
|
// };
|
||||||
|
// const res = await reqCatch(getGroupClaList, params);
|
||||||
|
// if (!res.error) {
|
||||||
|
// tableData.value = res?.data?.data?.content;
|
||||||
|
// pager.value.total = res.data.data.total;
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
getGroupClaListData();
|
||||||
|
|
||||||
|
const setClaStatus = async (row: any) => {
|
||||||
|
// const params = {
|
||||||
|
// group_id: namespace.value,
|
||||||
|
// cla_id: row.object_id,
|
||||||
|
// status: row.status
|
||||||
|
// };
|
||||||
|
// const res = await reqCatch(setGroupClaStatus, params);
|
||||||
|
// if (!res.error) {
|
||||||
|
// Message.success('操作成功!');
|
||||||
|
// getGroupClaListData();
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
|
||||||
|
const signCla = (row: any) => {
|
||||||
|
router.push('/cla/' + row.object_id);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
@import 'devui-theme/styles-var/devui-var.scss';
|
||||||
|
|
||||||
|
.secret-container {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.secret-op {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: $devui-contrast;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.devui-table__row td) {
|
||||||
|
padding-top: 16px;
|
||||||
|
padding-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.devui-tag .devui-tag--default) {
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 4px 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 16px;
|
||||||
|
margin-right: 8px;
|
||||||
|
border: 1px solid #E3E3EE;
|
||||||
|
}
|
||||||
|
|
||||||
|
.one-line {
|
||||||
|
word-break: break-all;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #9a9b9c;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cur-title {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #2d2d2e;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-form {
|
||||||
|
position: relative;
|
||||||
|
padding: 12px 20px 12px 0;
|
||||||
|
border-radius: 8px 0px 8px 8px;
|
||||||
|
//background: #F2F5FC;
|
||||||
|
|
||||||
|
.output-btn {
|
||||||
|
position: absolute;
|
||||||
|
right: 28px;
|
||||||
|
bottom: 4px;
|
||||||
|
color: #191919;
|
||||||
|
font-family: HarmonyOS Sans SC;
|
||||||
|
font-weight: regular;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 22px;
|
||||||
|
letter-spacing: 0px;
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.secret-breadcrumb {
|
||||||
|
padding: 7px 20px 12px;
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,162 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="secret-container pt-2 px-20">
|
<div class="secret-container">
|
||||||
<d-breadcrumb>
|
<d-breadcrumb class="secret-breadcrumb">
|
||||||
<gc-breadcrumb-item :to="{ name: 'home' }"
|
<gc-breadcrumb-item :to="{ name: 'home' }"
|
||||||
><span class="title">首页</span></gc-breadcrumb-item>
|
><span class="title">首页</span></gc-breadcrumb-item>
|
||||||
<gc-breadcrumb-item><span class="title">高级搜索</span></gc-breadcrumb-item>
|
<gc-breadcrumb-item><span class="cur-title">软件商城-软件版本列表</span></gc-breadcrumb-item>
|
||||||
<gc-breadcrumb-item><span class="cur-title">License</span></gc-breadcrumb-item>
|
|
||||||
</d-breadcrumb>
|
</d-breadcrumb>
|
||||||
<div class="search-form mt-2">
|
<d-tabs class="jyh-tabs" type="wrapped" v-model="selectTab">
|
||||||
<d-form
|
<d-tab id="OssQuery" title="开源软件查询">
|
||||||
class="jyh-form"
|
<OssQuery/>
|
||||||
ref="formRef"
|
</d-tab>
|
||||||
:data="formData"
|
<d-tab id="tab2" title="批量校验">
|
||||||
:pop-postion="['right']"
|
<OssQuery/>
|
||||||
:rules="formRules"
|
</d-tab>
|
||||||
>
|
</d-tabs>
|
||||||
<d-row :gutter="25" type="flex" class="docs-devui-row mb-4">
|
|
||||||
<d-col style="flex: 1">
|
|
||||||
<d-form-item field="title" label="搜索关键字" :show-feedback="false">
|
|
||||||
<d-input
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="formData.title"
|
|
||||||
placeholder="关键字模糊搜索"
|
|
||||||
maxLength="50"
|
|
||||||
minLength="2"
|
|
||||||
/>
|
|
||||||
</d-form-item>
|
|
||||||
</d-col>
|
|
||||||
<d-col style="flex: 1">
|
|
||||||
<d-form-item field="title" label="License编码" :show-feedback="false">
|
|
||||||
<d-input
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="formData.title"
|
|
||||||
placeholder="License编码模糊搜索"
|
|
||||||
maxLength="50"
|
|
||||||
minLength="2"
|
|
||||||
/>
|
|
||||||
</d-form-item>
|
|
||||||
</d-col>
|
|
||||||
<d-col style="flex: 1">
|
|
||||||
<d-form-item field="name" label="License名称" :show-feedback="false">
|
|
||||||
<d-input
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="formData.title"
|
|
||||||
placeholder="License名称模糊搜索"
|
|
||||||
maxLength="50"
|
|
||||||
minLength="2"
|
|
||||||
/>
|
|
||||||
</d-form-item>
|
|
||||||
</d-col>
|
|
||||||
<d-col style="flex: 1">
|
|
||||||
<d-form-item field="title" label="类型" :show-feedback="false">
|
|
||||||
<d-select v-model="formData.select" :options="typeOptions" :allow-clear="true" />
|
|
||||||
</d-form-item>
|
|
||||||
</d-col>
|
|
||||||
<d-col style="flex: 1">
|
|
||||||
<d-form-item field="title" label="集成风险" :show-feedback="false">
|
|
||||||
<d-select v-model="formData.select" :options="riskOptions" :allow-clear="true" />
|
|
||||||
</d-form-item>
|
|
||||||
</d-col>
|
|
||||||
</d-row>
|
|
||||||
<d-row :gutter="25" type="flex" class="docs-devui-row mb-5">
|
|
||||||
<d-col style="flex: 1">
|
|
||||||
<d-form-item field="title" label="适用类型" :show-feedback="false">
|
|
||||||
<d-select v-model="formData.select" :options="useTypeOptions" :allow-clear="true" />
|
|
||||||
</d-form-item>
|
|
||||||
</d-col>
|
|
||||||
<d-col style="flex: 1">
|
|
||||||
<d-form-item field="title" label="是否可用" :show-feedback="false">
|
|
||||||
<d-select v-model="formData.select" :options="isUseOptions" :allow-clear="true" />
|
|
||||||
</d-form-item>
|
|
||||||
</d-col>
|
|
||||||
<d-col style="flex: 1">
|
|
||||||
<d-form-item field="name" label="键值" :show-feedback="false">
|
|
||||||
<d-input
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="formData.title"
|
|
||||||
placeholder="请输入键值"
|
|
||||||
maxLength="50"
|
|
||||||
minLength="2"
|
|
||||||
/>
|
|
||||||
</d-form-item>
|
|
||||||
</d-col>
|
|
||||||
<d-col style="flex: 1">
|
|
||||||
<d-form-item field="title" label="创建时间" :show-feedback="false">
|
|
||||||
<d-date-picker-pro v-model="formData.time1" :showTime="true"
|
|
||||||
placeholder="请选择日期与时间"
|
|
||||||
format="YYYY-MM-DD HH:mm:ss" />
|
|
||||||
</d-form-item>
|
|
||||||
</d-col>
|
|
||||||
<d-col style="flex: 1">
|
|
||||||
<d-form-item field="title" label="更新时间" :show-feedback="false">
|
|
||||||
<d-date-picker-pro v-model="formData.time1" :showTime="true"
|
|
||||||
placeholder="请选择日期与时间"
|
|
||||||
format="YYYY-MM-DD HH:mm:ss" />
|
|
||||||
</d-form-item>
|
|
||||||
</d-col>
|
|
||||||
</d-row>
|
|
||||||
<gc-form-operation class="jyh-form-operation">
|
|
||||||
<d-button class="mr-2" variant="solid">筛选</d-button>
|
|
||||||
<d-button variant="solid" color="secondary">清空</d-button>
|
|
||||||
</gc-form-operation>
|
|
||||||
<d-button class="output-btn" icon="icon-share" variant="text">导出</d-button>
|
|
||||||
</d-form>
|
|
||||||
</div>
|
|
||||||
<div class="mt-3">
|
|
||||||
<d-table class="jyh-table" v-if="tableData.length" :striped="false" :data="tableData" table-layout="auto">
|
|
||||||
<d-column type="index" width="40"></d-column>
|
|
||||||
<d-column field="code" header="License编码">
|
|
||||||
<a>05822156</a>
|
|
||||||
</d-column>
|
|
||||||
<d-column field="name" header="License名称"></d-column>
|
|
||||||
<d-column field="type" header="类型"></d-column>
|
|
||||||
<d-column field="risk" header="集成风险"></d-column>
|
|
||||||
<d-column field="useType" header="适用类型"></d-column>
|
|
||||||
<d-column field="status" header="状态">
|
|
||||||
<d-status>未开始</d-status>
|
|
||||||
</d-column>
|
|
||||||
<d-column field="key" header="键值"></d-column>
|
|
||||||
<d-column field="created" header="创建时间"></d-column>
|
|
||||||
<d-column field="updated" header="更新时间"></d-column>
|
|
||||||
<!-- <d-column header="操作" width="300">-->
|
|
||||||
<!-- <template #default="scope">-->
|
|
||||||
<!-- <div class="flex">-->
|
|
||||||
<!-- <div class="cursor-pointer flex items-center mr-[32px]" @click="editRow(scope.row)">-->
|
|
||||||
<!-- <GIcon class="mr-[8px]" name="gt-plane-edit" />-->
|
|
||||||
<!-- <span class="text-[#3B3E55] text-base font-normal">编辑</span>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div class="flex items-center mr-[32px]">-->
|
|
||||||
<!-- <d-switch v-model="scope.row.status" class="mr-[8px]" @change="setClaStatus(scope.row)"-->
|
|
||||||
<!-- :active-value="1" :inactive-value="0"> </d-switch>-->
|
|
||||||
<!-- <span class="text-[#3B3E55] text-base font-normal">{{ scope.row.status === 0 ? '停用' : '启用' }}</span>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div class="cursor-pointer flex items-center" @click="openDelete(scope.row)">-->
|
|
||||||
<!-- <GIcon class="mr-[8px]" name="gt-plane-delete" />-->
|
|
||||||
<!-- <span class="text-[#3B3E55] text-base font-normal">删除</span>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </d-column>-->
|
|
||||||
</d-table>
|
|
||||||
|
|
||||||
<DataPanel v-else skeleton :card="false" :empty="true">
|
|
||||||
</DataPanel>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mt-20 mb-20 flex justify-end">
|
|
||||||
<d-pagination size="md" :page-size-options="[10, 20, 50]" :total="pager.total"
|
|
||||||
v-model:pageSize="pager.pageSize" v-model:pageIndex="pager.pageIndex" :max-items="5"
|
|
||||||
:can-change-page-size="true" :can-view-total="true" total-item-text="总计" @page-index-change="changeIndex()"
|
|
||||||
@page-size-change="changeSize()" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 删除组件 -->
|
|
||||||
<GModal v-model="deletevModels" ref="deleteModal" title="删除?" @confirm="confirmDelete" showWarnIcon
|
|
||||||
confirmColor="danger">
|
|
||||||
<span class="inline-block text-G900 text-sm font-normal leading-[20px] break-all">你确认删除此项:{{ item.cla_name }}
|
|
||||||
?</span>
|
|
||||||
</GModal>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -170,32 +26,10 @@ import { GModal } from '@/components/Setting/index';
|
|||||||
import { reqCatch } from '@/utils/catch';
|
import { reqCatch } from '@/utils/catch';
|
||||||
import { getOrgInfo } from '@/views/Org/hooks/orgInfo';
|
import { getOrgInfo } from '@/views/Org/hooks/orgInfo';
|
||||||
import { Message } from 'vue-devui';
|
import { Message } from 'vue-devui';
|
||||||
|
import OssQuery from './Components/OssQuery.vue';
|
||||||
const { namespace } = getOrgInfo();
|
const { namespace } = getOrgInfo();
|
||||||
const text = `贡献者协议(CLA)允许外部开发者向组织的代码库提交变更请求时,系统会检查用户是否已签署CLA。如果已签署, "CLA-bot"会在变更请求评论区更新签署信息;如果未签署,"CLA-bot"会引导外部贡献者查看并签署贡献者协议。`;
|
|
||||||
|
|
||||||
const tableData = ref([
|
const selectTab = ref('OssQuery');
|
||||||
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
|
||||||
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
|
||||||
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
|
||||||
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
|
||||||
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
|
||||||
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
|
||||||
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
|
||||||
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
|
||||||
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
|
||||||
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
|
||||||
]);
|
|
||||||
const formData = ref({ title: '', md_content: '',select: '',time1:null });
|
|
||||||
const typeOptions = reactive(['Options1', 'Options2', 'Options3']);
|
|
||||||
const riskOptions = reactive(['低', '中', '高']);
|
|
||||||
const useTypeOptions = reactive(['软件', '文档', '文档+软件']);
|
|
||||||
const isUseOptions = reactive(['是', '否']);
|
|
||||||
|
|
||||||
const pager = ref({
|
|
||||||
total: 10,
|
|
||||||
pageIndex: 1,
|
|
||||||
pageSize: 10
|
|
||||||
});
|
|
||||||
|
|
||||||
// 删除弹窗
|
// 删除弹窗
|
||||||
const item = ref('');
|
const item = ref('');
|
||||||
@@ -354,4 +188,9 @@ const signCla = (row: any) => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.secret-breadcrumb {
|
||||||
|
padding: 7px 20px 12px;
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
357
src/views/Jyh/Search/license.vue
Normal file
357
src/views/Jyh/Search/license.vue
Normal file
@@ -0,0 +1,357 @@
|
|||||||
|
<template>
|
||||||
|
<div class="secret-container pt-2 px-20">
|
||||||
|
<d-breadcrumb>
|
||||||
|
<gc-breadcrumb-item :to="{ name: 'home' }"
|
||||||
|
><span class="title">首页</span></gc-breadcrumb-item>
|
||||||
|
<gc-breadcrumb-item><span class="title">高级搜索</span></gc-breadcrumb-item>
|
||||||
|
<gc-breadcrumb-item><span class="cur-title">License</span></gc-breadcrumb-item>
|
||||||
|
</d-breadcrumb>
|
||||||
|
<div class="search-form mt-2">
|
||||||
|
<d-form
|
||||||
|
class="jyh-form"
|
||||||
|
ref="formRef"
|
||||||
|
:data="formData"
|
||||||
|
:pop-postion="['right']"
|
||||||
|
:rules="formRules"
|
||||||
|
>
|
||||||
|
<d-row :gutter="25" type="flex" class="docs-devui-row mb-4">
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="title" label="搜索关键字" :show-feedback="false">
|
||||||
|
<d-input
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="formData.title"
|
||||||
|
placeholder="关键字模糊搜索"
|
||||||
|
maxLength="50"
|
||||||
|
minLength="2"
|
||||||
|
/>
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="title" label="License编码" :show-feedback="false">
|
||||||
|
<d-input
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="formData.title"
|
||||||
|
placeholder="License编码模糊搜索"
|
||||||
|
maxLength="50"
|
||||||
|
minLength="2"
|
||||||
|
/>
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="name" label="License名称" :show-feedback="false">
|
||||||
|
<d-input
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="formData.title"
|
||||||
|
placeholder="License名称模糊搜索"
|
||||||
|
maxLength="50"
|
||||||
|
minLength="2"
|
||||||
|
/>
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="title" label="类型" :show-feedback="false">
|
||||||
|
<d-select v-model="formData.select" :options="typeOptions" :allow-clear="true" />
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="title" label="集成风险" :show-feedback="false">
|
||||||
|
<d-select v-model="formData.select" :options="riskOptions" :allow-clear="true" />
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
</d-row>
|
||||||
|
<d-row :gutter="25" type="flex" class="docs-devui-row mb-5">
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="title" label="适用类型" :show-feedback="false">
|
||||||
|
<d-select v-model="formData.select" :options="useTypeOptions" :allow-clear="true" />
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="title" label="是否可用" :show-feedback="false">
|
||||||
|
<d-select v-model="formData.select" :options="isUseOptions" :allow-clear="true" />
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="name" label="键值" :show-feedback="false">
|
||||||
|
<d-input
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="formData.title"
|
||||||
|
placeholder="请输入键值"
|
||||||
|
maxLength="50"
|
||||||
|
minLength="2"
|
||||||
|
/>
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="title" label="创建时间" :show-feedback="false">
|
||||||
|
<d-date-picker-pro v-model="formData.time1" :showTime="true"
|
||||||
|
placeholder="请选择日期与时间"
|
||||||
|
format="YYYY-MM-DD HH:mm:ss" />
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
<d-col style="flex: 1">
|
||||||
|
<d-form-item field="title" label="更新时间" :show-feedback="false">
|
||||||
|
<d-date-picker-pro v-model="formData.time1" :showTime="true"
|
||||||
|
placeholder="请选择日期与时间"
|
||||||
|
format="YYYY-MM-DD HH:mm:ss" />
|
||||||
|
</d-form-item>
|
||||||
|
</d-col>
|
||||||
|
</d-row>
|
||||||
|
<gc-form-operation class="jyh-form-operation">
|
||||||
|
<d-button class="mr-2" variant="solid">筛选</d-button>
|
||||||
|
<d-button variant="solid" color="secondary">清空</d-button>
|
||||||
|
</gc-form-operation>
|
||||||
|
<d-button class="output-btn" icon="icon-share" variant="text">导出</d-button>
|
||||||
|
</d-form>
|
||||||
|
</div>
|
||||||
|
<div class="mt-3">
|
||||||
|
<d-table class="jyh-table" v-if="tableData.length" :striped="false" :data="tableData" table-layout="auto">
|
||||||
|
<d-column type="index" width="40"></d-column>
|
||||||
|
<d-column field="code" header="License编码">
|
||||||
|
<a>05822156</a>
|
||||||
|
</d-column>
|
||||||
|
<d-column field="name" header="License名称"></d-column>
|
||||||
|
<d-column field="type" header="类型"></d-column>
|
||||||
|
<d-column field="risk" header="集成风险"></d-column>
|
||||||
|
<d-column field="useType" header="适用类型"></d-column>
|
||||||
|
<d-column field="status" header="状态">
|
||||||
|
<d-status>未开始</d-status>
|
||||||
|
</d-column>
|
||||||
|
<d-column field="key" header="键值"></d-column>
|
||||||
|
<d-column field="created" header="创建时间"></d-column>
|
||||||
|
<d-column field="updated" header="更新时间"></d-column>
|
||||||
|
<!-- <d-column header="操作" width="300">-->
|
||||||
|
<!-- <template #default="scope">-->
|
||||||
|
<!-- <div class="flex">-->
|
||||||
|
<!-- <div class="cursor-pointer flex items-center mr-[32px]" @click="editRow(scope.row)">-->
|
||||||
|
<!-- <GIcon class="mr-[8px]" name="gt-plane-edit" />-->
|
||||||
|
<!-- <span class="text-[#3B3E55] text-base font-normal">编辑</span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="flex items-center mr-[32px]">-->
|
||||||
|
<!-- <d-switch v-model="scope.row.status" class="mr-[8px]" @change="setClaStatus(scope.row)"-->
|
||||||
|
<!-- :active-value="1" :inactive-value="0"> </d-switch>-->
|
||||||
|
<!-- <span class="text-[#3B3E55] text-base font-normal">{{ scope.row.status === 0 ? '停用' : '启用' }}</span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="cursor-pointer flex items-center" @click="openDelete(scope.row)">-->
|
||||||
|
<!-- <GIcon class="mr-[8px]" name="gt-plane-delete" />-->
|
||||||
|
<!-- <span class="text-[#3B3E55] text-base font-normal">删除</span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </d-column>-->
|
||||||
|
</d-table>
|
||||||
|
|
||||||
|
<DataPanel v-else skeleton :card="false" :empty="true">
|
||||||
|
</DataPanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-20 mb-20 flex justify-end">
|
||||||
|
<d-pagination size="md" :page-size-options="[10, 20, 50]" :total="pager.total"
|
||||||
|
v-model:pageSize="pager.pageSize" v-model:pageIndex="pager.pageIndex" :max-items="5"
|
||||||
|
:can-change-page-size="true" :can-view-total="true" total-item-text="总计" @page-index-change="changeIndex()"
|
||||||
|
@page-size-change="changeSize()" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 删除组件 -->
|
||||||
|
<GModal v-model="deletevModels" ref="deleteModal" title="删除?" @confirm="confirmDelete" showWarnIcon
|
||||||
|
confirmColor="danger">
|
||||||
|
<span class="inline-block text-G900 text-sm font-normal leading-[20px] break-all">你确认删除此项:{{ item.cla_name }}
|
||||||
|
?</span>
|
||||||
|
</GModal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import SettingTitle from '@/components/Setting/SettingTitle/index.vue';
|
||||||
|
import SettingText from '@/components/Setting/SettingText/index.vue';
|
||||||
|
import { ref,reactive } from 'vue';
|
||||||
|
import { getGroupClaList, setGroupClaStatus, deleteGroupCla } from '@/api/cla';
|
||||||
|
import { useRouter, useRoute } from 'vue-router';
|
||||||
|
import { GModal } from '@/components/Setting/index';
|
||||||
|
import { reqCatch } from '@/utils/catch';
|
||||||
|
import { getOrgInfo } from '@/views/Org/hooks/orgInfo';
|
||||||
|
import { Message } from 'vue-devui';
|
||||||
|
const { namespace } = getOrgInfo();
|
||||||
|
const text = `贡献者协议(CLA)允许外部开发者向组织的代码库提交变更请求时,系统会检查用户是否已签署CLA。如果已签署, "CLA-bot"会在变更请求评论区更新签署信息;如果未签署,"CLA-bot"会引导外部贡献者查看并签署贡献者协议。`;
|
||||||
|
|
||||||
|
const tableData = ref([
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
{code: '05822156', name:'联通智家通通中视频公司语音.',type:'客户指定预装软件(原预装软件)',risk:'中',useType:'软件',status:'未开始',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||||
|
]);
|
||||||
|
const formData = ref({ title: '', md_content: '',select: '',time1:null });
|
||||||
|
const typeOptions = reactive(['Options1', 'Options2', 'Options3']);
|
||||||
|
const riskOptions = reactive(['低', '中', '高']);
|
||||||
|
const useTypeOptions = reactive(['软件', '文档', '文档+软件']);
|
||||||
|
const isUseOptions = reactive(['是', '否']);
|
||||||
|
|
||||||
|
const pager = ref({
|
||||||
|
total: 10,
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 10
|
||||||
|
});
|
||||||
|
|
||||||
|
// 删除弹窗
|
||||||
|
const item = ref('');
|
||||||
|
const deleteModal = ref();
|
||||||
|
const deletevModels = ref(false);
|
||||||
|
const openDelete = (row: any) => {
|
||||||
|
item.value = row;
|
||||||
|
deleteModal.value.showFlag = true;
|
||||||
|
deletevModels.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
// 分页
|
||||||
|
const changeIndex = () => {
|
||||||
|
// getGroupClaListData();
|
||||||
|
};
|
||||||
|
|
||||||
|
const changeSize = () => {
|
||||||
|
pager.value.pageIndex = 1;
|
||||||
|
// getGroupClaListData();
|
||||||
|
};
|
||||||
|
|
||||||
|
const repoFun = (arr: any) => {
|
||||||
|
return arr ? (arr.length > 3 ? arr.slice(0, 3) : arr) : [];
|
||||||
|
};
|
||||||
|
|
||||||
|
// 编辑
|
||||||
|
const editRow = (row: any) => {
|
||||||
|
// 后续请换成params,暂时params传参没传过去
|
||||||
|
router.push({
|
||||||
|
path: 'cla/edit/' + row.object_id,
|
||||||
|
query: { cla: row.cla, pageType: 'edit' }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 确认删除
|
||||||
|
const confirmDelete = async (e: any) => {
|
||||||
|
// const res = await reqCatch(deleteGroupCla, { group_id: namespace.value, cla_id: item.value.object_id });
|
||||||
|
// if (!res.error) {
|
||||||
|
// getGroupClaListData();
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
|
||||||
|
// 去成员页
|
||||||
|
const goMember = (row: any) => {
|
||||||
|
// 后续请换成params,暂时params传参没传过去,注意路由有个:claID
|
||||||
|
router.push({
|
||||||
|
path: 'cla/claId/member',
|
||||||
|
query: { claId: row.object_id, claName: row.cla_name, group_path: namespace.value, pageType: 'edit' }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const getGroupClaListData = async () => {
|
||||||
|
// const params = {
|
||||||
|
// group_id: namespace.value,
|
||||||
|
// page: pager.value.pageIndex,
|
||||||
|
// per_page: pager.value.pageSize
|
||||||
|
// };
|
||||||
|
// const res = await reqCatch(getGroupClaList, params);
|
||||||
|
// if (!res.error) {
|
||||||
|
// tableData.value = res?.data?.data?.content;
|
||||||
|
// pager.value.total = res.data.data.total;
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
getGroupClaListData();
|
||||||
|
|
||||||
|
const setClaStatus = async (row: any) => {
|
||||||
|
// const params = {
|
||||||
|
// group_id: namespace.value,
|
||||||
|
// cla_id: row.object_id,
|
||||||
|
// status: row.status
|
||||||
|
// };
|
||||||
|
// const res = await reqCatch(setGroupClaStatus, params);
|
||||||
|
// if (!res.error) {
|
||||||
|
// Message.success('操作成功!');
|
||||||
|
// getGroupClaListData();
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
|
||||||
|
const signCla = (row: any) => {
|
||||||
|
router.push('/cla/' + row.object_id);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
@import 'devui-theme/styles-var/devui-var.scss';
|
||||||
|
|
||||||
|
.secret-container {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.secret-op {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: $devui-contrast;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.devui-table__row td) {
|
||||||
|
padding-top: 16px;
|
||||||
|
padding-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.devui-tag .devui-tag--default) {
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 4px 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 16px;
|
||||||
|
margin-right: 8px;
|
||||||
|
border: 1px solid #E3E3EE;
|
||||||
|
}
|
||||||
|
|
||||||
|
.one-line {
|
||||||
|
word-break: break-all;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #9a9b9c;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cur-title {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #2d2d2e;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-form {
|
||||||
|
position: relative;
|
||||||
|
padding: 12px 20px 12px 0;
|
||||||
|
border-radius: 8px 0px 8px 8px;
|
||||||
|
background: #F2F5FC;
|
||||||
|
|
||||||
|
.output-btn {
|
||||||
|
position: absolute;
|
||||||
|
right: 28px;
|
||||||
|
bottom: 4px;
|
||||||
|
color: #191919;
|
||||||
|
font-family: HarmonyOS Sans SC;
|
||||||
|
font-weight: regular;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 22px;
|
||||||
|
letter-spacing: 0px;
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -5348,7 +5348,7 @@ vue-demi@*, vue-demi@>=0.14.8, vue-demi@^0.14.10:
|
|||||||
resolved "https://mirrors.cloud.tencent.com/npm/vue-demi/-/vue-demi-0.14.10.tgz#afc78de3d6f9e11bf78c55e8510ee12814522f04"
|
resolved "https://mirrors.cloud.tencent.com/npm/vue-demi/-/vue-demi-0.14.10.tgz#afc78de3d6f9e11bf78c55e8510ee12814522f04"
|
||||||
integrity sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==
|
integrity sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==
|
||||||
|
|
||||||
vue-devui@^1.6.7:
|
vue-devui@^1.6.31:
|
||||||
version "1.6.31"
|
version "1.6.31"
|
||||||
resolved "https://mirrors.cloud.tencent.com/npm/vue-devui/-/vue-devui-1.6.31.tgz#1431e110986ccadeea6e78d3166892a97eb6de7e"
|
resolved "https://mirrors.cloud.tencent.com/npm/vue-devui/-/vue-devui-1.6.31.tgz#1431e110986ccadeea6e78d3166892a97eb6de7e"
|
||||||
integrity sha512-tKovGWeNJwhdRfItFOKpU9am37b8phOMUIHqMgE9IhIRnNmT+Af8P+0Yf7hilOfbhcdxpyUOmjTXuBWIR194hw==
|
integrity sha512-tKovGWeNJwhdRfItFOKpU9am37b8phOMUIHqMgE9IhIRnNmT+Af8P+0Yf7hilOfbhcdxpyUOmjTXuBWIR194hw==
|
||||||
|
|||||||
Reference in New Issue
Block a user