更新笔触和管理员页面

This commit is contained in:
X1627315083
2024-03-15 09:21:17 +08:00
parent bc314a2f83
commit b15d2e467f
29 changed files with 2792 additions and 1385 deletions

View File

@@ -1,108 +1,62 @@
<template>
<div class="test_cli">
<div class="page_content">
<img
class="page_content_bg"
src="@/assets/images/homePage/bg1.jpg"
/>
<div class="page_content_body">
<div class="test_cli_body">
<div class="trial_table_search">
<a-range-picker
class="range_picker"
v-model:value="rangePickerValue"
:placeholder="[
$t('HistoryPage.StartDate'),
$t('HistoryPage.EndDate'),
]"
valueFormat="YYYY-MM-DD"
>
<template #suffixIcon>
<span
class="icon iconfont range_picker_icon icon-rili"
></span>
</template>
</a-range-picker>
<div class="content_search_block">
<input
class="search_input"
:placeholder="$t('HistoryPage.inputContent1')"
v-model="searchCollectionName"
@keydown.enter="searchHistoryList()"
/>
<div
class="search_icon_block"
@click="searchHistoryList()"
>
<span class="icon iconfont icon-sousuo"></span>
</div>
</div>
</div>
<div class="test_cli admin_page">
<div class="admin_table_search">
<div class="admin_state">
<div class="admin_state_item">
<span>State:</span>
<a-range-picker
class="range_picker"
v-model:value="rangePickerValue"
:placeholder="[
$t('HistoryPage.StartDate'),
$t('HistoryPage.EndDate'),
]"
valueFormat="YYYY-MM-DD"
>
<template #suffixIcon>
<span
class="icon iconfont range_picker_icon icon-rili"
></span>
</template>
</a-range-picker>
</div>
<div class="admin_state_item">
<span>Time:</span>
<a-time-range-picker class="range_picker" valueFormat="HH:mm:ss" v-model:value="rangeTimeValue" />
</div>
<div class="trial_table_content" ref="historyTable">
<a-table
:columns="columns"
:data-source="collectionList"
:scroll="{ y: historyTableHeight }"
@change="changePage"
:pagination="{
showSizeChanger: true,
current: currentPage,
pageSize: pageSize,
total: total,
showQuickJumper: true,
bordered: false,
}"
>
<template
#bodyCell="{ column, text, record, index }"
>
<div
class="operate_list"
v-if="column?.Operations"
>
<div
v-show="status == 0"
class="operate_item"
@click="setConsent(record, index)"
>
consent
</div>
<div
v-show="status == 0"
class="operate_item"
@click="setRefuse(record, index)"
>
refuse
</div>
<!-- <div
class="operate_item"
@click="deleteGroup(record, index)"
>
Delete
</div> -->
</div>
</template>
</a-table>
</div>
</div>
</div>
</div>
</div>
<div class="admin_search">
<div class="admin_search_item" @click="searchHistoryList">Search</div>
</div>
</div>
<div class="admin_table_content" ref="historyTable">
<a-table
:columns="columns"
:data-source="dataList"
:scroll="{ y: historyTableHeight }"
@change="changePage"
:pagination="{
showSizeChanger: true,
current: currentPage,
pageSize: pageSize,
total: total,
showQuickJumper: true,
bordered: false,
}"
>
</a-table>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent, ref, createVNode, computed } from "vue";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import HeaderComponent from "@/component/HomePage/Header.vue";
import HistoryDetail from "@/component/Detail/HistoryDetail.vue";
import router from "@/router/index";
import { Https } from "@/tool/https";
import { formatTime } from "@/tool/util";
import { Modal, message } from "ant-design-vue";
import RobotAssist from "@/component/HomePage/RobotAssist.vue";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import { useI18n } from "vue-i18n";
export default defineComponent({
components: {
HeaderComponent,
@@ -111,6 +65,7 @@ export default defineComponent({
},
setup() {
let rangePickerValue: any = ref([]);
let rangeTimeValue: any = ref([]);
let renameData: any = ref({}); //修改名字选中的数据
const columns: any = computed(() => {
return [
@@ -118,16 +73,22 @@ export default defineComponent({
title: 'Email',
align: "center",
ellipsis: true,
width: 170,
dataIndex: "email",
key: "email",
dataIndex: "userEmail",
key: "userEmail",
},
{
title: 'User Id',
align: "center",
ellipsis: true,
dataIndex: "accountId",
key: "accountId",
},
{
title: 'Create Time',
title: 'User Name',
align: "center",
ellipsis: 200,
dataIndex: "updateTime",
key: "updateTime",
dataIndex: "userName",
key: "userName",
// customRender: (record: any) => {
// let time = formatTime(
// record.text / 1000,
@@ -137,56 +98,27 @@ export default defineComponent({
// },
},
{
title: 'State',
title: 'isTrial',
align: "center",
ellipsis: true,
width: 150,
dataIndex: "status",
key: "status",
dataIndex: "isTrial",
key: "isTrial",
customRender: (record: any) => {
let str
if(record.value == 0){
str ='pending'
}else if(record.value == 1){
str ='consent'
}else if(record.value == 2){
str ='reject'
if(record.value == 1){
str ='Yes'
}else{
str ='No'
}
return str;
},
},
{
title: 'Address',
title: 'Frequency',
align: "center",
ellipsis: true,
width: 150,
dataIndex: "country",
key: "country",
},
{
title: 'Surname',
align: "center",
ellipsis: true,
width: 150,
dataIndex: "surname",
key: "surname",
},
{
title: 'Name',
align: "center",
ellipsis: true,
width: 150,
dataIndex: "userName",
key: "userName",
},
{
title: 'Operations',
key: "operation",
align: "center",
fixed: "right",
width: 200,
// slots:{customRender:'action'}
Operations: true,
dataIndex: "useDesignTimes",
key: "useDesignTimes",
},
];
});
@@ -209,17 +141,16 @@ export default defineComponent({
value:2,
},
])
let collectionList: any = ref([]);
let dataList: any = ref([]);
let status: any = ref(0);
let voluntarily: any = ref(false);
return {
rangePickerValue,
rangeTimeValue,
columns,
collectionList,
dataList,
renameData,
status,
state,
voluntarily,
};
},
data() {
@@ -228,10 +159,6 @@ export default defineComponent({
pageSize: 10,
total: 0,
historyTableHeight: 0,
newCollectionName: "",
renameVisivle: false, //修改名字弹窗
collectionName: "", //选中的名字
searchCollectionName: "",
};
},
mounted() {
@@ -244,7 +171,7 @@ export default defineComponent({
changePage(e: any) {
this.currentPage = e.current;
this.pageSize = e.pageSize;
this.gettrialList();
// this.gettrialList();
},
//查询列表
@@ -252,53 +179,33 @@ export default defineComponent({
this.currentPage = 1;
this.gettrialList();
},
//获取列表
gettrialList() {
let startTime: any = this.rangeTimeValue[0]
? this.rangeTimeValue[0]
: '00:00:00';
let endTime: any = this.rangeTimeValue[1]
? this.rangeTimeValue[1]
: '00:00:00';
let startDate: any = this.rangePickerValue[0]
? this.rangePickerValue[0]+' '+'00:00:00'
? this.rangePickerValue[0]+' '+startTime
: "";
let endDate: any = this.rangePickerValue[1]
? this.rangePickerValue[1]+' '+'00:00:00'
? this.rangePickerValue[1]+' '+endTime
: "";
let data = {
endTime:startDate,
startTime:endDate,
endTime:endDate,
startTime:startDate,
}
console.log(data);
console.log(this.rangePickerValue,startDate,endDate);
Https.axiosGet(Https.httpUrls.getDesignStatistic,{params:data}).then((rv: any) => {
if (rv) {
console.log(rv);
this.dataList = rv
// this.workspaceItem.position = this.singleTypeList[0].label
}
})
},
setConsent(record: any, index: number){
const formData = new FormData()
formData.append('ids',record.id)
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
Https.axiosPost(Https.httpUrls.trialOrderApproval, {ids:record.id}).then(
(rv: any) => {
message.success('同意成功~')
}
);
},
setRefuse(record: any, index: number){
const formData = new FormData()
formData.append('ids',record.id)
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
Https.axiosPost(Https.httpUrls.trialOrderRefuse, formData,config).then(
(rv: any) => {
this.gettrialList();
message.success('拒绝成功~')
}
);
},
//删除分组
// deleteGroup(record: any, index: number) {
// let deleteGroupFun = (id: any, index: number) => {
@@ -307,7 +214,7 @@ export default defineComponent({
// };
// Https.axiosPost(Https.httpUrls.deleteUserGroup, data).then(
// (rv: any) => {
// this.collectionList.splice(index, 1);
// this.dataList.splice(index, 1);
// }
// );
// };
@@ -329,144 +236,5 @@ export default defineComponent({
});
</script>
<style lang="less">
.test_cli {
width: 100%;
height: 100%;
overflow: hidden;
// min-width: 1440px;
position: relative;
.page_content {
position: relative;
.page_content_bg {
position: absolute;
width: 100%;
height: 100%;
}
.page_content_body {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
.test_cli_body {
width: 100%;
height: calc(100% - 7rem);
box-sizing: border-box;
.trial_table_search {
display: flex;
align-items: center;
margin-top: 5rem;
color: #fff;
.range_picker {
width: 36rem;
height: 4.8rem;
.ant-picker-input > input {
font-size: 1.6rem;
}
.range_picker_icon {
font-size: 2.2rem;
}
}
.content_search_block {
margin-left: 4rem;
display: flex;
.search_input {
width: 32.8rem;
padding-left: 1.5rem;
height: 4.8rem;
line-height: 4.6rem;
background: #ffffff;
border: 0.1rem solid #f1f1f1;
font-size: 1.6rem;
font-weight: 400;
&::placeholder {
color: #c2c2c2;
}
}
.search_icon_block {
width: 7.2rem;
height: 4.8rem;
line-height: 4.8rem;
text-align: center;
background: #343579;
cursor: pointer;
.icon-sousuo {
font-size: 2rem;
color: #ffffff;
}
}
}
}
.trial_table_content {
margin-top: 2.6rem;
width: 100%;
height: calc(100% - 13.7rem);
background: rgba(255, 255, 255, 0.3);
padding-bottom: 3rem;
border-radius: 2rem;
backdrop-filter: blur(3rem);
overflow: hidden;
box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.38);
.ant-table {
background: transparent;
}
.ant-table-body {
overflow-y: auto !important;
-ms-overflow-style: none;
overflow: -moz-scrollbars-none;
&::-webkit-scrollbar {
width: 0 !important;
}
}
.ant-table-thead > tr > th {
background: #ffffff00;
color: #fff;
border-bottom: none;
backdrop-filter: blur(1rem);
}
.ant-table-tbody > tr > td {
border: none;
background: transparent;
// color: #fff;
}
.ant-table-tbody > tr {
&:hover > td {
background: #ffffff3a;
}
}
.ant-table-pagination-right {
padding-right: 3.5rem;
}
.operate_list {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem;
.operate_item {
font-size: 1.4rem;
font-family: Roboto;
font-weight: 400;
color: #343579;
cursor: pointer;
}
}
}
}
}
}
}
</style>

View File

@@ -1,26 +1,13 @@
<template>
<div class="allUser_page">
<div class="allUser_table_search">
<!-- <div class="allUser_state">
<div class="allUser_state_item allUser_table_voluntarily">
<span>voluntarily:</span>
<a-switch v-model:checked="voluntarily" @change="setIsAutoApproval" />
</div>
<div class="allUser_state_item">
<span>State:</span>
<a-select v-model:value="currentState.value" size="large" style="width:280px" optionFilterProp="label" :options="state" placeholder="Please select" allowClear show-search></a-select>
</div>
</div>
<div class="allUser_search">
<div class="allUser_search_item" @click="searchHistoryList">Search</div>
</div> -->
</div>
<div class="allUser_table_content" ref="historyTable">
<a-table
:columns="columns"
:data-source="collectionList"
:scroll="{ y: historyTableHeight }"
:data-source="dataList"
:scroll="{ y: historyTableHeight}"
@change="changePage"
:pagination="{
showSizeChanger: true,
@@ -31,36 +18,11 @@
bordered: false,
}"
>
<template
<!-- <template
#bodyCell="{ column, text, record, index }"
>
<div
class="operate_list"
v-if="column?.Operations"
>
<div
v-show="status == 0"
class="operate_item"
@click="setConsent(record, index)"
>
consent
</div>
<div
v-show="status == 0"
class="operate_item"
@click="setRefuse(record, index)"
>
refuse
</div>
<!-- <div
class="operate_item"
@click="deleteGroup(record, index)"
>
Delete
</div> -->
</div>
</template>
</template> -->
</a-table>
</div>
</div>
@@ -91,114 +53,68 @@ export default defineComponent({
title: 'Email',
align: "center",
ellipsis: true,
width: 70,
width: 30,
dataIndex: "email",
key: "email",
fixed: 'left',
},
{
title: 'User Id',
align: "center",
width: 30,
dataIndex: "id",
key: "id",
},
{
title: 'User Name',
align: "center",
ellipsis: true,
width: 30,
dataIndex: "userName",
key: "userName",
},
{
title: 'Given Name',
align: "center",
ellipsis: true,
width: 30,
dataIndex: "givenName",
key: "givenName",
},
{
title: 'Create Time',
align: "center",
width: 70,
dataIndex: "updateTime",
key: "updateTime",
// customRender: (record: any) => {
// let time = formatTime(
// record.text / 1000,
// "YYYY-MM-DD hh:mm:ss"
// );
// return time;
// },
width: 30,
dataIndex: "createTime",
key: "createTime",
},
{
title: 'State',
title: 'Title',
align: "center",
ellipsis: true,
width: 70,
dataIndex: "status",
key: "status",
customRender: (record: any) => {
let str
if(record.value == 0){
str ='pending'
}else if(record.value == 1){
str ='consent'
}else if(record.value == 2){
str ='reject'
}
return str;
},
width: 30,
dataIndex: "title",
key: "title",
},
{
title: 'Address',
{
title: 'Country',
align: "center",
ellipsis: true,
width: 70,
width: 30,
dataIndex: "country",
key: "country",
fixed: 'right',
},
{
title: 'Surname',
align: "center",
ellipsis: true,
width: 70,
dataIndex: "surname",
key: "surname",
},
{
title: 'Name',
align: "center",
ellipsis: true,
width: 70,
dataIndex: "userName",
key: "userName",
},
{
title: 'Operations',
key: "operation",
align: "center",
fixed: "right",
width: 70,
// slots:{customRender:'action'}
Operations: true,
},
];
});
let currentState = ref({
name:'all',
value:'',
state:false,
},)
let state:any = ref([
{
label:'all',
value:'',
},
{
label:'pending',
value:0,
},
{
label:'consent',
value:1,
},
{
label:'rejected',
value:2,
},
])
let collectionList: any = ref([]);
let dataList: any = ref([]);
let userInfo: any = {};
let status: any = ref(0);
let voluntarily: any = ref(false);
return {
columns,
collectionList,
dataList,
renameData,
userInfo,
status,
currentState,
state,
voluntarily,
};
},
data() {
@@ -219,80 +135,29 @@ export default defineComponent({
this.gettrialList();
let userInfo:any = getCookie("userInfo")
this.userInfo = JSON.parse(userInfo);
this.getIsAutoApproval()
},
methods: {
//改变页码
changePage(e: any) {
this.currentPage = e.current;
this.pageSize = e.pageSize;
this.gettrialList();
// this.gettrialList();
},
//获取是否自动审批
getIsAutoApproval(){
Https.axiosPost(Https.httpUrls.getIsAutoApproval, {}).then(
(rv: any) => {
this.voluntarily = rv
}
);
},
//查询列表
searchHistoryList() {
this.currentPage = 1;
this.gettrialList();
},
setIsAutoApproval(){
Https.axiosPost(Https.httpUrls.switchIsAutoApproval, {}).then(
(rv: any) => {
this.getIsAutoApproval
}
);
},
//获取列表
gettrialList() {
let data = {
page: this.currentPage,
size: this.pageSize,
status: this.currentState.value,
// startDate:startDate,
// endDate:endDate
};
Https.axiosPost(Https.httpUrls.trialOrderList, data).then(
(rv: any) => {
this.collectionList = rv.content;
}
);
Https.axiosGet(Https.httpUrls.inquiryGetTrial).then((rv)=>{
console.log(rv);
this.dataList = rv
})
},
setConsent(record: any, index: number){
const formData = new FormData()
formData.append('ids',record.id)
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
Https.axiosPost(Https.httpUrls.trialOrderApproval, {ids:record.id}).then(
(rv: any) => {
message.success('同意成功~')
}
);
},
setRefuse(record: any, index: number){
const formData = new FormData()
formData.append('ids',record.id)
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
Https.axiosPost(Https.httpUrls.trialOrderRefuse, formData,config).then(
(rv: any) => {
this.gettrialList();
message.success('拒绝成功~')
}
);
},
setState(){
this.currentState.state = true
},
setStateItem(item:any){
this.currentState = item
this.currentState.state = false
},
},
});
</script>

View File

@@ -1,22 +1,22 @@
<template>
<div class="trial_page">
<div class="trial_table_search">
<div class="trial_state">
<div class="trial_state_item trial_table_voluntarily">
<div class="admin_page">
<div class="admin_table_search">
<div class="admin_state">
<div class="admin_state_item admin_table_voluntarily">
<span>voluntarily:</span>
<a-switch v-model:checked="voluntarily" @change="setIsAutoApproval" />
</div>
<div class="trial_state_item">
<div class="admin_state_item">
<span>State:</span>
<a-select v-model:value="currentState.value" size="large" style="width:280px" optionFilterProp="label" :options="state" placeholder="Please select" allowClear show-search></a-select>
</div>
</div>
<div class="trial_search">
<div class="trial_search_item" @click="searchHistoryList">Search</div>
<div class="admin_search">
<div class="admin_search_item" @click="searchHistoryList">Search</div>
</div>
</div>
<div class="trial_table_content" ref="historyTable">
<div class="admin_table_content" ref="historyTable">
<a-table
:columns="columns"
:data-source="collectionList"
@@ -297,139 +297,5 @@ export default defineComponent({
});
</script>
<style lang="less">
.trial_page {
width: 100%;
height: 100%;
overflow: hidden;
// min-width: 1440px;
position: relative;
.trial_table_search {
display: flex;
margin-top: 2rem;
padding: 2rem 3.5rem 5rem 2.8rem;
background: #fff;
display: flex;
justify-content: space-between;
.trial_search{
width: 40%;
.trial_search_item{
background: #343579;
border-color: #343579;
height: 4rem;
padding: .64rem 1.5rem;
font-size: 1.6rem;
border-radius: 2px;
display: inline-block;
color: #fff;
cursor: pointer;
}
}
.trial_state {
position: relative;
cursor: pointer;
width: 60%;
.trial_state_item{
margin-right: 2rem;
margin-bottom: 2rem;
display: flex;
align-items: center;
>span{
font-size: 1.6rem;
font-weight: 400;
color: #030303;
margin-right: 15px;
flex-shrink: 0;
display: block;
min-width: 13rem;
text-align: right;
}
}
.trial_current{
background: #fff;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.header_user_content {
position: absolute;
border: 2px solid;
border-radius: 1rem;
overflow: hidden;
top: 0;
transform: translateY(6rem);
z-index: 2;
display: none;
margin-left: -2rem;
.username{
padding: 0 2rem;
color: #000;
}
.username:hover{
background: #e1e1e1;
}
&.active{
display: block;
}
}
}
}
.trial_table_content {
margin-top: 2.6rem;
width: 100%;
height: calc(100% - 13.7rem);
padding-bottom: 3rem;
background: #fff;
border-radius: 2rem;
overflow: hidden;
.ant-table {
background: transparent;
}
.ant-table-body {
overflow-y: auto !important;
-ms-overflow-style: none;
overflow: -moz-scrollbars-none;
&::-webkit-scrollbar {
width: 0 !important;
}
}
.ant-table-thead > tr > th {
background: #ffffff00;
border-bottom: none;
backdrop-filter: blur(1rem);
}
.ant-table-tbody > tr > td {
border: none;
background: transparent;
// color: #fff;
}
.ant-table-tbody > tr {
&:hover > td {
background: #ffffff3a;
}
}
.ant-table-pagination-right {
padding-right: 3.5rem;
}
.operate_list {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem;
.operate_item {
font-size: 1.4rem;
font-family: Roboto;
font-weight: 400;
color: #343579;
cursor: pointer;
}
}
}
}
</style>