3d添加印花 等
This commit is contained in:
@@ -551,13 +551,15 @@ li {
|
||||
.ant-btn-primary {
|
||||
background-color: #000;
|
||||
}
|
||||
.ant-picker-range-wrapper {
|
||||
.ant-picker-range-wrapper,
|
||||
.ant-picker-dropdown {
|
||||
border-radius: 2rem;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
border: 2px solid #000;
|
||||
}
|
||||
.ant-picker-range-wrapper .ant-picker-range-arrow {
|
||||
.ant-picker-range-wrapper .ant-picker-range-arrow,
|
||||
.ant-picker-dropdown .ant-picker-range-arrow {
|
||||
display: none;
|
||||
}
|
||||
.ant-picker-date-panel .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-start .ant-picker-cell-inner::after,
|
||||
@@ -1273,6 +1275,10 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.admin_page .admin_state_item > span {
|
||||
white-space: nowrap;
|
||||
width: 13rem;
|
||||
}
|
||||
.admin_page .admin_state_item > span > span {
|
||||
color: red;
|
||||
}
|
||||
@@ -1283,7 +1289,6 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
||||
margin-right: 15px;
|
||||
flex-shrink: 0;
|
||||
display: block;
|
||||
width: 10.5rem;
|
||||
text-align: right;
|
||||
}
|
||||
.admin_page .admin_state_item > input {
|
||||
@@ -1296,16 +1301,24 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.admin_page .admin_search_item {
|
||||
background: #343579;
|
||||
border-color: #343579;
|
||||
height: 4rem;
|
||||
padding: 0.64rem 1.5rem;
|
||||
font-size: 1.6rem;
|
||||
border-radius: 2px;
|
||||
display: inline-block;
|
||||
width: 13rem;
|
||||
height: 6rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 600;
|
||||
border-radius: 3rem;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
margin: 0 2rem 2rem 0;
|
||||
background-color: #000;
|
||||
}
|
||||
.admin_page .admin_search_item:hover {
|
||||
color: #000;
|
||||
border: 2px solid #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
.admin_page .admin_search_item:last-child {
|
||||
margin: 0;
|
||||
@@ -1334,7 +1347,7 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
||||
border-radius: 10px;
|
||||
padding: 5px 10px;
|
||||
border: 1px solid #b6b6b6;
|
||||
background: #39215b;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
margin: 0 10px 10px 0;
|
||||
font-size: 1.4rem;
|
||||
|
||||
@@ -612,7 +612,7 @@ input:focus{
|
||||
.ant-btn-primary{
|
||||
background-color: #000;
|
||||
}
|
||||
.ant-picker-range-wrapper{
|
||||
.ant-picker-range-wrapper,.ant-picker-dropdown{
|
||||
border-radius: 2rem;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
@@ -1399,6 +1399,8 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
||||
display: flex;
|
||||
align-items: center;
|
||||
>span{
|
||||
white-space: nowrap;
|
||||
width: 13rem;
|
||||
>span{
|
||||
color: red;
|
||||
}
|
||||
@@ -1412,7 +1414,6 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
||||
display: block;
|
||||
// min-width: 20%;
|
||||
// width: 100px;
|
||||
width: 10.5rem;
|
||||
text-align: right;
|
||||
}
|
||||
>input{
|
||||
@@ -1426,16 +1427,25 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
||||
}
|
||||
}
|
||||
.admin_search_item{
|
||||
background: #343579;
|
||||
border-color: #343579;
|
||||
height: 4rem;
|
||||
padding: .64rem 1.5rem;
|
||||
font-size: 1.6rem;
|
||||
border-radius: 2px;
|
||||
display: inline-block;
|
||||
width: 13rem;
|
||||
height: 6rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 600;
|
||||
border-radius: 3rem;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
margin: 0 2rem 2rem 0;
|
||||
background-color: #000;
|
||||
|
||||
&:hover{
|
||||
color: #000;
|
||||
border: 2px solid #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
.admin_search_item:last-child{
|
||||
margin: 0;
|
||||
@@ -1464,7 +1474,7 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
||||
border-radius: 10px;
|
||||
padding: 5px 10px;
|
||||
border: 1px solid #b6b6b6;
|
||||
background: #39215b;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
margin: 0 10px 10px 0;
|
||||
font-size: 1.4rem;
|
||||
|
||||
276
src/component/Administrator/SE/allUser/addAllUser.vue
Normal file
276
src/component/Administrator/SE/allUser/addAllUser.vue
Normal file
@@ -0,0 +1,276 @@
|
||||
<template>
|
||||
<div class="allUserPoerationModal" ref="allUserPoerationModal"></div>
|
||||
<a-modal
|
||||
class="allUserPoeration_modal generalModel"
|
||||
v-model:visible="operationsModal"
|
||||
:footer="null"
|
||||
:get-container="() => $refs.allUserPoerationModal"
|
||||
width="50%"
|
||||
height="55rem"
|
||||
:maskClosable="false"
|
||||
:centered="true"
|
||||
:closable="false"
|
||||
:mask="true"
|
||||
wrapClassName="#app"
|
||||
:keyboard="false"
|
||||
>
|
||||
<div class="generalModel_btn">
|
||||
<div class="generalModel_closeIcon" @click.stop="cancelDsign()">
|
||||
<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="23" cy="23" r="23" fill="white" fill-opacity="0.3"/>
|
||||
<rect x="32.5063" y="12" width="3" height="29" rx="1.5" transform="rotate(45 32.5063 12)" fill="white"/>
|
||||
<rect x="34.6274" y="32.5059" width="3" height="29" rx="1.5" transform="rotate(135 34.6274 32.5059)" fill="white"/>
|
||||
</svg>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal_title_text">
|
||||
<div>{{ title }} User</div>
|
||||
</div>
|
||||
<div class="allUserPoeration_center admin_page">
|
||||
<div class="admin_state_item">
|
||||
<span>User Name: <span>*</span></span>
|
||||
<input
|
||||
v-model="userName"
|
||||
placeholder="Please enter user name"
|
||||
type="text"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>User Email: <span>*</span></span>
|
||||
<input
|
||||
v-model="userEmail"
|
||||
placeholder="Please enter email"
|
||||
type="text"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>Password: <span>*</span></span>
|
||||
<input
|
||||
@focus="focus"
|
||||
@blur="blur"
|
||||
v-model="password"
|
||||
placeholder="Please enter password"
|
||||
type="password"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>Maximum Credits:</span>
|
||||
<input
|
||||
v-model="credits"
|
||||
placeholder="Please enter credits"
|
||||
type="text"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="allUserPoeration_btn admin_page">
|
||||
<div class="admin_search_item" @click="cancelDsign">
|
||||
Close
|
||||
</div>
|
||||
<div class="admin_search_item" @click="setOk">
|
||||
OK
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a-modal>
|
||||
<div class="mark_loading" v-show="loadingShow">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { defineComponent, ref, reactive, watch, onMounted, nextTick, toRefs } from "vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { Modal, message } from "ant-design-vue";
|
||||
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
||||
import { formatTime,isEmail } from "@/tool/util";
|
||||
const md5 = require("md5");
|
||||
export default defineComponent({
|
||||
components: {
|
||||
},
|
||||
emits: ['searchHistoryList'],
|
||||
setup(props,{emit}) {
|
||||
let operations = reactive({
|
||||
operationsModal:false,
|
||||
operationsEdit:false,
|
||||
loadingShow:false,
|
||||
title:''
|
||||
})
|
||||
let operationsData = reactive({
|
||||
accountId:-1,
|
||||
userName:'',
|
||||
userEmail:'',
|
||||
password:'',
|
||||
oldPassword:'',
|
||||
credits:'',
|
||||
})
|
||||
let state = ref([
|
||||
{
|
||||
label:'visitor',
|
||||
value:'0',
|
||||
},
|
||||
{
|
||||
label:'yearly',
|
||||
value:'1',
|
||||
},
|
||||
{
|
||||
label:'monthly',
|
||||
value:'2',
|
||||
},
|
||||
{
|
||||
label:'trial',
|
||||
value:'3',
|
||||
},
|
||||
]);
|
||||
let init = (funStr,data)=>{
|
||||
operations.operationsModal = true
|
||||
operations.operationsEdit = true
|
||||
operations.title = funStr
|
||||
if(funStr == 'Add') operations.operationsEdit = false
|
||||
if(funStr == 'Edit'){
|
||||
operationsData.accountId=data.id
|
||||
operationsData.userName=data.userName
|
||||
operationsData.userEmail=data.userEmail
|
||||
operationsData.password=data.userPassword
|
||||
operationsData.oldPassword=data.userPassword
|
||||
// operationsData.validStartTime='2024-08-05T00:00:06'
|
||||
// operationsData.validEndTime='2024-08-05T00:00:06'
|
||||
operationsData.credits=data.creditsUsageLimit
|
||||
// operationsData.accountId = data.accountId
|
||||
// operationsData.userName = data.userName
|
||||
// operationsData.userEmail = data.userEmail
|
||||
// operationsData.validStartTime = formatTime(data.validStartTime)
|
||||
// operationsData.validEndTime = formatTime(data.validEndTime)
|
||||
}
|
||||
|
||||
}
|
||||
let focus = (event) =>{
|
||||
if(operationsData.password == operationsData.oldPassword){
|
||||
operationsData.password = ''
|
||||
}
|
||||
}
|
||||
let blur = (event) =>{
|
||||
console.log((operationsData.password == '' && operationsData.oldPassword))
|
||||
if(operationsData.password == '' && operationsData.oldPassword){
|
||||
operationsData.password = operationsData.oldPassword
|
||||
}
|
||||
}
|
||||
let setAddData = ()=>{
|
||||
return {
|
||||
"creditsUsageLimit": operationsData.credits,
|
||||
"userEmail": operationsData.userEmail,
|
||||
"userPassword": md5(operationsData.password + 'abc'),
|
||||
"userName": operationsData.userName,
|
||||
}
|
||||
}
|
||||
let setEditData = ()=>{
|
||||
return {
|
||||
"id": operationsData.accountId,
|
||||
"creditsUsageLimit": operationsData.credits,
|
||||
"userName": operationsData.userName,
|
||||
"userEmail": operationsData.userEmail,
|
||||
"userPassword": (operationsData.password == operationsData.oldPassword)?'':md5(operationsData.password + 'abc'),
|
||||
}
|
||||
}
|
||||
let cancelDsign = ()=>{
|
||||
operationsData.accountId=-1
|
||||
operationsData.userName=''
|
||||
operationsData.userEmail=''
|
||||
operationsData.password=''
|
||||
operationsData.credits=''
|
||||
operations.operationsModal = false
|
||||
}
|
||||
let setOk = ()=>{
|
||||
let data
|
||||
if(operations.title == 'Add'){
|
||||
data = setAddData()
|
||||
if (!isEmail(data.userEmail)) {
|
||||
message.info("The email format is incorrect");
|
||||
return;
|
||||
}
|
||||
if(!data.userName || !data.userEmail || !data.userPassword || !data.creditsUsageLimit)return message.warning('Please check the input box marked with *')
|
||||
Https.axiosPost(Https.httpUrls.addOrUpdateSubAccount, data).then(
|
||||
(rv) => {
|
||||
if (rv) {
|
||||
cancelDsign()
|
||||
emit('searchHistoryList')
|
||||
}
|
||||
}
|
||||
);
|
||||
}else{
|
||||
data = setEditData()
|
||||
if (!isEmail(data.userEmail)) {
|
||||
message.info("The email format is incorrect");
|
||||
return;
|
||||
}
|
||||
if(!data.userName || !data.userEmail || !data.creditsUsageLimit)return message.warning('Please check the input box marked with *')
|
||||
Https.axiosPost(Https.httpUrls.addOrUpdateSubAccount,data).then(
|
||||
(rv) => {
|
||||
if (rv) {
|
||||
cancelDsign()
|
||||
emit('searchHistoryList')
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
return {
|
||||
...toRefs(operations),
|
||||
...toRefs(operationsData),
|
||||
state,
|
||||
cancelDsign,
|
||||
init,
|
||||
focus,
|
||||
blur,
|
||||
setOk,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
:deep(.allUserPoeration_modal){
|
||||
.ant-modal-body{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<style lang="less" scoped>
|
||||
|
||||
.allUserPoeration_modal {
|
||||
.closeIcon {
|
||||
z-index: 2;
|
||||
}
|
||||
.allUserPoeration_btn{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: auto;
|
||||
justify-content: flex-end;
|
||||
padding: 1rem 0;
|
||||
.admin_search_item{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.allUserPoeration_center{
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
500
src/component/Administrator/SE/allUser/index.vue
Normal file
500
src/component/Administrator/SE/allUser/index.vue
Normal file
@@ -0,0 +1,500 @@
|
||||
<template>
|
||||
<div class="admin_page">
|
||||
<div class="admin_table_search">
|
||||
<div class="admin_state">
|
||||
<div class="admin_state_item">
|
||||
<span>Create Time:</span>
|
||||
<a-range-picker
|
||||
style="width: 230px"
|
||||
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>Country:</span>
|
||||
<a-select
|
||||
v-model:value="country"
|
||||
:allowClear="true"
|
||||
show-search
|
||||
style="width: 230px"
|
||||
:filter-option="filterOption"
|
||||
placeholder="Select Item..."
|
||||
max-tag-count="responsive"
|
||||
:options="allCountry"
|
||||
></a-select>
|
||||
</div> -->
|
||||
<div class="admin_state_item">
|
||||
<span>Email:</span>
|
||||
<input
|
||||
v-model="email"
|
||||
placeholder="Please enter email"
|
||||
@keydown.enter="gettrialList"
|
||||
type="text"
|
||||
style="width: 230px"
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>User Name:</span>
|
||||
<a-select
|
||||
v-model:value="ids"
|
||||
mode="multiple"
|
||||
style="width: 230px"
|
||||
:filter-option="filterOption"
|
||||
placeholder="Select Item..."
|
||||
max-tag-count="responsive"
|
||||
:options="allUserList"
|
||||
@keydown.enter="gettrialList"
|
||||
></a-select>
|
||||
</div>
|
||||
<!-- <div class="admin_state_item">
|
||||
<span>User Type:</span>
|
||||
<a-select
|
||||
v-model:value="systemUser"
|
||||
size="large"
|
||||
style="width: 230px"
|
||||
optionFilterProp="label"
|
||||
:options="state"
|
||||
placeholder="Please select"
|
||||
allowClear
|
||||
show-search
|
||||
></a-select>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="admin_search">
|
||||
<div class="admin_search_item" @click="searchHistoryList">
|
||||
Search
|
||||
</div>
|
||||
<div class="admin_search_item" @click="addhHistoryList">
|
||||
Add
|
||||
</div>
|
||||
<div class="admin_search_item" style="width: auto;padding: 0 2rem;" @click="downloadTemplate">
|
||||
Download template
|
||||
</div>
|
||||
<div class="admin_search_item" style="width: auto;padding: 0 2rem;" @click="uploadTemplate">
|
||||
Upload template
|
||||
</div>
|
||||
</div>
|
||||
<div class="admin_state_list">
|
||||
<div
|
||||
class="admin_state_list_item"
|
||||
@click="lastGeTrialList('year')"
|
||||
>
|
||||
Nearly a year
|
||||
</div>
|
||||
<div
|
||||
class="admin_state_list_item"
|
||||
@click="lastGeTrialList('month')"
|
||||
>
|
||||
Last month
|
||||
</div>
|
||||
<div
|
||||
class="admin_state_list_item"
|
||||
@click="lastGeTrialList('week')"
|
||||
>
|
||||
Last week
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="admin_table_content" ref="historyTable">
|
||||
<a-table
|
||||
@resizeColumn="handleResizeColumn"
|
||||
:loading="tableLoading"
|
||||
:columns="columns"
|
||||
:data-source="dataList"
|
||||
:scroll="{ y: historyTableHeight }"
|
||||
@change="changePage"
|
||||
:showSorterTooltip='false'
|
||||
: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
|
||||
class="operate_item"
|
||||
@click="setAagree(record)"
|
||||
style="margin-right: 2rem;"
|
||||
>
|
||||
Edit
|
||||
</div>
|
||||
<div
|
||||
class="operate_item"
|
||||
@click="deleteAagree(record)"
|
||||
>
|
||||
Delete
|
||||
</div>
|
||||
<!-- <div
|
||||
class="operate_item"
|
||||
@click="deleteGroup(record, index)"
|
||||
>
|
||||
Delete
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<allUserPoerationsVue ref="allUserPoerationsVue" @searchHistoryList="searchHistoryList"></allUserPoerationsVue>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import {
|
||||
defineComponent,
|
||||
ref,
|
||||
createVNode,
|
||||
computed,
|
||||
reactive,
|
||||
toRefs,
|
||||
onMounted,
|
||||
} from "vue";
|
||||
import { formatTime } from "@/tool/util";
|
||||
import { useStore } from "vuex";
|
||||
import { Https } from "@/tool/https";
|
||||
import allUserPoerationsVue from "./addAllUser.vue";
|
||||
export default defineComponent({
|
||||
components: {allUserPoerationsVue,},
|
||||
setup() {
|
||||
const store:any = useStore()
|
||||
let filter: any = reactive({
|
||||
dataList: [],
|
||||
tableLoading: false,
|
||||
allUserList: computed(()=>{
|
||||
return store.state.adminPage.allUserList
|
||||
}),
|
||||
allCountry:[]
|
||||
});
|
||||
let filterData: any = reactive({
|
||||
rangePickerValue: [],
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
country: "",
|
||||
email: "",
|
||||
userType: "",
|
||||
ids: [],
|
||||
occupation: "",
|
||||
systemUser: "",
|
||||
order: "", //'Ascending 升序 Descending 降序'
|
||||
orderBy:'',
|
||||
userName: "",
|
||||
});
|
||||
let state: any = ref([
|
||||
{
|
||||
label: "all",
|
||||
value: "",
|
||||
},
|
||||
{
|
||||
label:'visitor',
|
||||
value:'0',
|
||||
},
|
||||
{
|
||||
label:'yearly',
|
||||
value:'1',
|
||||
},
|
||||
{
|
||||
label:'monthly',
|
||||
value:'2',
|
||||
},
|
||||
{
|
||||
label:'trial',
|
||||
value:'3',
|
||||
},
|
||||
{
|
||||
label: "userInEvent",
|
||||
value: "4",
|
||||
},
|
||||
]);
|
||||
let renameData: any = ref({}); //修改名字选中的数据
|
||||
const columns: any = computed(() => {
|
||||
return [
|
||||
{
|
||||
title: "User Id",
|
||||
align: "center",
|
||||
dataIndex: "id",
|
||||
key: "id",
|
||||
width:100,
|
||||
fixed: "left",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "Email",
|
||||
align: "center",
|
||||
dataIndex: "userEmail",
|
||||
key: "userEmail",
|
||||
width:200,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: "User Name",
|
||||
align: "center",
|
||||
dataIndex: "userName",
|
||||
key: "userName",
|
||||
width:150,
|
||||
ellipsis:true
|
||||
// customRender: (record: any) => {
|
||||
// let time = formatTime(
|
||||
// record.text / 1000,
|
||||
// "YYYY-MM-DD hh:mm:ss"
|
||||
// );
|
||||
// return time;
|
||||
// },
|
||||
},
|
||||
{
|
||||
title: "language",
|
||||
align: "center",
|
||||
dataIndex: "language",
|
||||
key: "language",
|
||||
width:100,
|
||||
ellipsis:true,
|
||||
},
|
||||
{
|
||||
title: "Create Date",
|
||||
align: "center",
|
||||
dataIndex: "createDate",
|
||||
key: "createDate",
|
||||
width:200,
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "Credits",
|
||||
align: "center",
|
||||
// width: 150,
|
||||
// minWidth: 100,
|
||||
// maxWidth: 200,
|
||||
// resizable: true,
|
||||
dataIndex: "creditsUsageLimit",
|
||||
key: "credits",
|
||||
width:100,
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "Operations",
|
||||
key: "operation",
|
||||
width:120,
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
// slots:{customRender:'action'}
|
||||
Operations: true,
|
||||
},
|
||||
];
|
||||
});
|
||||
//改变页码
|
||||
let changePage = (e: any, filters:any, sorter:any) => {
|
||||
filterData.currentPage = e.current;
|
||||
filterData.pageSize = e.pageSize;
|
||||
if(sorter.order){
|
||||
if(sorter.columnKey == 'id'){
|
||||
filterData.orderBy = 'id'
|
||||
}else if(sorter.columnKey == "createDate"){
|
||||
filterData.orderBy = 'time'
|
||||
}else if(sorter.columnKey == "credits"){
|
||||
filterData.orderBy = 'credits'
|
||||
}
|
||||
}
|
||||
filterData.order = sorter.order == "descend" ? "Descending" : "Ascending";
|
||||
|
||||
gettrialList();
|
||||
};
|
||||
|
||||
//查询列表
|
||||
let searchHistoryList = () => {
|
||||
filterData.currentPage = 1;
|
||||
gettrialList();
|
||||
};
|
||||
let clearHistoryList = () => {
|
||||
filterData.rangePickerValue = [],
|
||||
filterData.currentPage = 1,
|
||||
filterData.pageSize = 10,
|
||||
filterData.total = 0,
|
||||
filterData.country = "",
|
||||
filterData.email = "",
|
||||
filterData.userType = "",
|
||||
filterData.ids = [],
|
||||
filterData.occupation = "",
|
||||
filterData.order = "", //'Ascending 升序 Descending 降序'
|
||||
filterData.orderBy = "", //'Ascending 升序 Descending 降序'
|
||||
filterData.systemUser = "",
|
||||
filterData.userName = "";
|
||||
};
|
||||
let setHistoryListData = () => {
|
||||
let startDate: any = filterData.rangePickerValue?.[0]
|
||||
? filterData.rangePickerValue[0] + " " + "00:00:00"
|
||||
: "";
|
||||
let endDate: any = filterData.rangePickerValue?.[1]
|
||||
? filterData.rangePickerValue[1] + " " + "23:59:59"
|
||||
: "";
|
||||
let data = {
|
||||
endTime: endDate,
|
||||
startTime: startDate,
|
||||
size: filterData.pageSize,
|
||||
page: filterData.currentPage,
|
||||
systemUser: filterData.systemUser,
|
||||
country: filterData.country,
|
||||
email: filterData.email.trim(),
|
||||
userType: filterData.userType,
|
||||
ids: filterData.ids,
|
||||
occupation: filterData.occupation,
|
||||
order: filterData.order,
|
||||
orderBy: filterData.orderBy,
|
||||
userName: filterData.userName,
|
||||
};
|
||||
return data;
|
||||
};
|
||||
//获取列表
|
||||
let gettrialList = () => {
|
||||
filter.tableLoading = true;
|
||||
let data = setHistoryListData();
|
||||
Https.axiosPost(Https.httpUrls.subAccountList, data).then(
|
||||
(rv: any) => {
|
||||
if (rv) {
|
||||
console.log(rv)
|
||||
// this.dataList = rv
|
||||
filter.dataList = rv.content;
|
||||
filterData.total = rv.total;
|
||||
filter.tableLoading = false;
|
||||
|
||||
// this.workspaceItem.position = this.singleTypeList[0].label
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
let lastGeTrialList = (str: string) => {
|
||||
clearHistoryList();
|
||||
let currentDate = new Date();
|
||||
let currentTimestamp = Math.floor(currentDate.getTime() / 1000);
|
||||
// 计算30天前的时间戳
|
||||
let thirtyDaysAgoTimestamp;
|
||||
if (str == "year") {
|
||||
thirtyDaysAgoTimestamp = currentTimestamp - 360 * 24 * 60 * 60;
|
||||
} else if (str == "month") {
|
||||
thirtyDaysAgoTimestamp = currentTimestamp - 30 * 24 * 60 * 60;
|
||||
} else if (str == "week") {
|
||||
thirtyDaysAgoTimestamp = currentTimestamp - 7 * 24 * 60 * 60;
|
||||
}
|
||||
filterData.rangePickerValue[0] = formatTime(
|
||||
thirtyDaysAgoTimestamp,
|
||||
"YYYY-MM-DD"
|
||||
);
|
||||
gettrialList();
|
||||
};
|
||||
let filterOption = (input: any, option: any) => {
|
||||
// 使用 option.label 进行搜索
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
};
|
||||
let addhHistoryList = () => {
|
||||
allUserPoerationsVue.value.init('Add','')
|
||||
};
|
||||
let allUserPoerationsVue = ref()
|
||||
let setAagree = (data:any) =>{
|
||||
allUserPoerationsVue.value.init('Edit',data)
|
||||
}
|
||||
const downloadTemplate = ()=>{
|
||||
Https.axiosGet(Https.httpUrls.subAccountImportExcelDownload,{responseType: 'blob',env:{binary:true}}).then((rv:any)=>{
|
||||
const link = document.createElement('a');
|
||||
link.href = rv.url;
|
||||
link.download = 'file.xlsx'; // 设置正确的文件扩展名
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
// 释放 URL 对象
|
||||
URL.revokeObjectURL(link.href);
|
||||
})
|
||||
}
|
||||
const uploadTemplate = ()=>{
|
||||
const fileInput = document.createElement('input');
|
||||
fileInput.type = 'file';
|
||||
fileInput.accept = '.xlsx'; // 只接受 .xlsx 文件
|
||||
fileInput.onchange = (event:any) => {
|
||||
const file = event.target.files[0]; // 获取选择的文件
|
||||
if (file) {
|
||||
console.log('Selected file:', file);
|
||||
let param = new FormData();
|
||||
param.append('file',file);
|
||||
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
|
||||
Https.axiosPost(Https.httpUrls.subAccountImport,param,config)
|
||||
.then((rv:any)=>{
|
||||
gettrialList();
|
||||
})
|
||||
}
|
||||
};
|
||||
fileInput.click();
|
||||
|
||||
}
|
||||
const deleteAagree = (event:any)=>{
|
||||
const value = {
|
||||
deleteIdList:[event.id]
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.deleteSubAccount,value)
|
||||
.then((rv:any)=>{
|
||||
gettrialList();
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
let allCountry: any = sessionStorage.getItem("allCountry");
|
||||
if (allCountry) {
|
||||
filter.allCountry = JSON.parse(allCountry);
|
||||
}
|
||||
gettrialList();
|
||||
});
|
||||
return {
|
||||
...toRefs(filter),
|
||||
...toRefs(filterData),
|
||||
state,
|
||||
columns,
|
||||
renameData,
|
||||
changePage,
|
||||
searchHistoryList,
|
||||
addhHistoryList,
|
||||
lastGeTrialList,
|
||||
gettrialList,
|
||||
filterOption,
|
||||
allUserPoerationsVue,
|
||||
setAagree,
|
||||
downloadTemplate,
|
||||
uploadTemplate,
|
||||
deleteAagree,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
historyTableHeight: 0,
|
||||
handleResizeColumn: (w: any, col: any) => {
|
||||
col.width = w;
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let historyTable: any = this.$refs.historyTable;
|
||||
this.historyTableHeight = historyTable.clientHeight - 200;
|
||||
},
|
||||
methods: {},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.admin_page .admin_table_search .admin_state {
|
||||
display: flex;
|
||||
width: 75%;
|
||||
flex-wrap: wrap;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.admin_page .admin_table_search .admin_search {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 25%;
|
||||
}
|
||||
</style>
|
||||
275
src/component/Administrator/SE/designDetailList/index.vue
Normal file
275
src/component/Administrator/SE/designDetailList/index.vue
Normal file
@@ -0,0 +1,275 @@
|
||||
<template>
|
||||
<div class="test_cli admin_page">
|
||||
<div class="admin_table_search">
|
||||
<div class="admin_state">
|
||||
|
||||
<div class="admin_state_item">
|
||||
<span>Start Date:</span>
|
||||
<a-range-picker
|
||||
style="width:250px"
|
||||
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>Start Time:</span>
|
||||
<a-time-range-picker style="width:250px" class="range_picker" valueFormat="HH:mm:ss" v-model:value="rangeTimeValue" />
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>Email:</span>
|
||||
<input
|
||||
v-model="email"
|
||||
placeholder="Please enter email"
|
||||
@keydown.enter="gettrialList"
|
||||
type="text"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>User Name:</span>
|
||||
<a-select
|
||||
v-model:value="ids"
|
||||
mode="multiple"
|
||||
style="width: 250px"
|
||||
:filter-option="filterOption"
|
||||
placeholder="Select Item..."
|
||||
max-tag-count="responsive"
|
||||
:options="allUserList"
|
||||
@keydown.enter="gettrialList"
|
||||
></a-select>
|
||||
</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
|
||||
@resizeColumn="handleResizeColumn"
|
||||
: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 { useStore } from "vuex";
|
||||
import { Https } from "@/tool/https";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
},
|
||||
setup() {
|
||||
const store:any = useStore()
|
||||
let rangePickerValue: any = ref([]);
|
||||
let rangeTimeValue: any = ref([]);
|
||||
let renameData: any = ref({}); //修改名字选中的数据
|
||||
const columns: any = computed(() => {
|
||||
return [
|
||||
{
|
||||
title: 'Email',
|
||||
align: "center",
|
||||
dataIndex: "userEmail",
|
||||
key: "userEmail",
|
||||
width:200,
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: 'User Id',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "accountId",
|
||||
key: "accountId",
|
||||
width:100,
|
||||
},
|
||||
{
|
||||
title: 'User Name',
|
||||
align: "center",
|
||||
ellipsis: 200,
|
||||
dataIndex: "userName",
|
||||
key: "userName",
|
||||
width:100,
|
||||
// customRender: (record: any) => {
|
||||
// let time = formatTime(
|
||||
// record.text / 1000,
|
||||
// "YYYY-MM-DD hh:mm:ss"
|
||||
// );
|
||||
// return time;
|
||||
// },
|
||||
},
|
||||
{
|
||||
title: 'Frequency',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "designTimes",
|
||||
key: "designTimes",
|
||||
width:100,
|
||||
},
|
||||
{
|
||||
title: 'Create Time',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
// width: 150,
|
||||
// minWidth: 100,
|
||||
// maxWidth: 200,
|
||||
// resizable: true,
|
||||
dataIndex: "createTime",
|
||||
key: "createTime",
|
||||
width:200,
|
||||
},
|
||||
{
|
||||
title: 'Credits',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
// width: 150,
|
||||
// minWidth: 100,
|
||||
// maxWidth: 200,
|
||||
// resizable: true,
|
||||
dataIndex: "credits",
|
||||
key: "credits",
|
||||
width:100,
|
||||
},
|
||||
];
|
||||
});
|
||||
|
||||
let allUserList: any = computed(()=>{
|
||||
return store.state.adminPage.allUserList
|
||||
})
|
||||
let ids = ref([])
|
||||
let email = ref('')
|
||||
let dataList: any = ref([]);
|
||||
let status: any = ref(0);
|
||||
let filterOption = (input: any, option: any) => {
|
||||
// 使用 option.label 进行搜索
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
};
|
||||
return {
|
||||
rangePickerValue,
|
||||
rangeTimeValue,
|
||||
columns,
|
||||
dataList,
|
||||
allUserList,
|
||||
ids,
|
||||
email,
|
||||
renameData,
|
||||
status,
|
||||
filterOption,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
historyTableHeight: 0,
|
||||
handleResizeColumn: (w:any, col:any) => {
|
||||
col.width = w;
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let historyTable: any = this.$refs.historyTable;
|
||||
this.historyTableHeight = historyTable.clientHeight - 200;
|
||||
this.gettrialList();
|
||||
},
|
||||
methods: {
|
||||
//改变页码
|
||||
changePage(e: any) {
|
||||
this.currentPage = e.current;
|
||||
this.pageSize = e.pageSize;
|
||||
this.gettrialList();
|
||||
},
|
||||
|
||||
//查询列表
|
||||
searchHistoryList() {
|
||||
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]
|
||||
: '23:59:59';
|
||||
let startDate: any = this.rangePickerValue[0]
|
||||
? this.rangePickerValue[0]+' '+startTime
|
||||
: "";
|
||||
let endDate: any = this.rangePickerValue[1]
|
||||
? this.rangePickerValue[1]+' '+endTime
|
||||
: "";
|
||||
let ids = this.ids.join(',')
|
||||
let data = {
|
||||
endTime:endDate,
|
||||
startTime:startDate,
|
||||
ids:ids,
|
||||
email:this.email.trim(),
|
||||
}
|
||||
Https.axiosGet(Https.httpUrls.getDesignStatistic,{params:data}).then((rv: any) => {
|
||||
if (rv) {
|
||||
this.dataList = rv
|
||||
// this.workspaceItem.position = this.singleTypeList[0].label
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//删除分组
|
||||
// deleteGroup(record: any, index: number) {
|
||||
// let deleteGroupFun = (id: any, index: number) => {
|
||||
// let data = {
|
||||
// userGroupId: id,
|
||||
// };
|
||||
// Https.axiosPost(Https.httpUrls.deleteUserGroup, data).then(
|
||||
// (rv: any) => {
|
||||
// this.dataList.splice(index, 1);
|
||||
// }
|
||||
// );
|
||||
// };
|
||||
// Modal.confirm({
|
||||
// title: "",
|
||||
// icon: createVNode(ExclamationCircleOutlined),
|
||||
// okText: "Yes",
|
||||
// cancelText: "No",
|
||||
// centered: true,
|
||||
// mask: false,
|
||||
// onOk() {
|
||||
// deleteGroupFun(record.id, index);
|
||||
// },
|
||||
// });
|
||||
// },
|
||||
|
||||
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.admin_page .admin_table_search .admin_state {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
</style>
|
||||
242
src/component/Administrator/SE/getGenerateFrequency/index.vue
Normal file
242
src/component/Administrator/SE/getGenerateFrequency/index.vue
Normal file
@@ -0,0 +1,242 @@
|
||||
<template>
|
||||
<div class="test_cli admin_page">
|
||||
<div class="admin_table_search">
|
||||
<div class="admin_state">
|
||||
|
||||
<div class="admin_state_item">
|
||||
<span>Start Date:</span>
|
||||
<a-range-picker
|
||||
style="width:250px"
|
||||
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>Start Time:</span>
|
||||
<a-time-range-picker style="width:250px" class="range_picker" valueFormat="HH:mm:ss" v-model:value="rangeTimeValue" />
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>Generate Event:</span>
|
||||
<a-select
|
||||
v-model:value="changeEvent"
|
||||
show-search
|
||||
allowClear
|
||||
style="width: 250px"
|
||||
placeholder="Please select"
|
||||
:options="allGenerateType"
|
||||
@keydown.enter="gettrialList"
|
||||
></a-select>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>Email:</span>
|
||||
<input
|
||||
v-model="email"
|
||||
placeholder="Please enter email"
|
||||
@keydown.enter="gettrialList"
|
||||
type="text"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</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
|
||||
@resizeColumn="handleResizeColumn"
|
||||
: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 { useStore } from "vuex";
|
||||
import { Https } from "@/tool/https";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
},
|
||||
setup() {
|
||||
const store:any = useStore()
|
||||
let rangePickerValue: any = ref([]);
|
||||
let rangeTimeValue: any = ref([]);
|
||||
let renameData: any = ref({}); //修改名字选中的数据
|
||||
const allGenerateType = computed(()=>{
|
||||
return store.state.adminPage.allGenerateType
|
||||
})
|
||||
const columns: any = computed(() => {
|
||||
return [
|
||||
{
|
||||
title: 'Email',
|
||||
align: "center",
|
||||
dataIndex: "userEmail",
|
||||
key: "userEmail",
|
||||
width:200,
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: 'User Id',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "id",
|
||||
key: "id",
|
||||
width:100,
|
||||
},
|
||||
{
|
||||
title: 'Current Credits',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "currentCredits",
|
||||
key: "currentCredits",
|
||||
width:150,
|
||||
},
|
||||
{
|
||||
title: 'Generate Event',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "generateFunction",
|
||||
key: "generateFunction",
|
||||
width:150,
|
||||
customRender: (record: any) => {
|
||||
return record.text?record.text:'ALL'
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Usage Count',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "usageCount",
|
||||
key: "usageCount",
|
||||
width:150,
|
||||
customRender: (record: any) => {
|
||||
return record.text?record.text:'-'
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Cconsumed Credits',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
// width: 150,
|
||||
// minWidth: 100,
|
||||
// maxWidth: 200,
|
||||
// resizable: true,
|
||||
dataIndex: "consumedCredits",
|
||||
key: "consumedCredits",
|
||||
width:150,
|
||||
customRender: (record: any) => {
|
||||
return record.text?record.text:'-'
|
||||
},
|
||||
}
|
||||
];
|
||||
});
|
||||
|
||||
let email = ref('')
|
||||
let dataList: any = ref([]);
|
||||
let status: any = ref(0);
|
||||
return {
|
||||
rangePickerValue,
|
||||
rangeTimeValue,
|
||||
columns,
|
||||
dataList,
|
||||
email,
|
||||
renameData,
|
||||
status,
|
||||
allGenerateType,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
changeEvent:'',
|
||||
historyTableHeight: 0,
|
||||
handleResizeColumn: (w:any, col:any) => {
|
||||
col.width = w;
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let historyTable: any = this.$refs.historyTable;
|
||||
this.historyTableHeight = historyTable.clientHeight - 200;
|
||||
this.gettrialList();
|
||||
},
|
||||
methods: {
|
||||
//改变页码
|
||||
changePage(e: any) {
|
||||
this.currentPage = e.current;
|
||||
this.pageSize = e.pageSize;
|
||||
this.gettrialList();
|
||||
},
|
||||
|
||||
//查询列表
|
||||
searchHistoryList() {
|
||||
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]
|
||||
: '23:59:59';
|
||||
let startDate: any = this.rangePickerValue[0]
|
||||
? this.rangePickerValue[0]+' '+startTime
|
||||
: "";
|
||||
let endDate: any = this.rangePickerValue[1]
|
||||
? this.rangePickerValue[1]+' '+endTime
|
||||
: "";
|
||||
let data = {
|
||||
endTime:endDate,
|
||||
startTime:startDate,
|
||||
id:null,
|
||||
changeEvent:this.changeEvent,
|
||||
size:this.pageSize,
|
||||
page:this.currentPage,
|
||||
email:this.email.trim(),
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.getGenerateFrequency,data).then((rv: any) => {
|
||||
if (rv) {
|
||||
console.log(rv)
|
||||
this.dataList = rv.content
|
||||
this.total = rv.total
|
||||
// this.workspaceItem.position = this.singleTypeList[0].label
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.admin_page .admin_table_search .admin_state {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
</style>
|
||||
@@ -271,7 +271,7 @@ export default defineComponent({
|
||||
changePage(e: any) {
|
||||
this.currentPage = e.current;
|
||||
this.pageSize = e.pageSize;
|
||||
// this.gettrialList();
|
||||
this.gettrialList();
|
||||
},
|
||||
|
||||
//查询列表
|
||||
|
||||
@@ -278,10 +278,11 @@ export default defineComponent({
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.allUserPoeration_modal{
|
||||
:deep(.allUserPoeration_modal){
|
||||
.ant-modal-body{
|
||||
height: auto;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,7 +304,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
.allUserPoeration_center{
|
||||
height: 85%;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
|
||||
275
src/component/Administrator/coupons/addAllUser.vue
Normal file
275
src/component/Administrator/coupons/addAllUser.vue
Normal file
@@ -0,0 +1,275 @@
|
||||
<template>
|
||||
<div class="allUserPoerationModal" ref="allUserPoerationModal"></div>
|
||||
<a-modal
|
||||
class="allUserPoeration_modal generalModel"
|
||||
v-model:visible="operationsModal"
|
||||
:footer="null"
|
||||
:get-container="() => $refs.allUserPoerationModal"
|
||||
width="50%"
|
||||
:height="'77rem'"
|
||||
:maskClosable="false"
|
||||
:centered="true"
|
||||
:closable="false"
|
||||
:mask="true"
|
||||
wrapClassName="#app"
|
||||
:keyboard="false"
|
||||
>
|
||||
<div class="generalModel_btn">
|
||||
<div class="generalModel_closeIcon" @click.stop="cancelDsign()">
|
||||
<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="23" cy="23" r="23" fill="white" fill-opacity="0.3"/>
|
||||
<rect x="32.5063" y="12" width="3" height="29" rx="1.5" transform="rotate(45 32.5063 12)" fill="white"/>
|
||||
<rect x="34.6274" y="32.5059" width="3" height="29" rx="1.5" transform="rotate(135 34.6274 32.5059)" fill="white"/>
|
||||
</svg>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal_title_text">
|
||||
<div>{{ title }} Coupon</div>
|
||||
</div>
|
||||
<div class="allUserPoeration_center admin_page">
|
||||
<div class="admin_state_item">
|
||||
<span>Cooperator: <span>*</span></span>
|
||||
<input
|
||||
v-model="cooperator"
|
||||
placeholder="Please enter cooperator"
|
||||
type="text"
|
||||
style="width: 220px"
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item" >
|
||||
<span>percentOff(%): <span>*</span></span>
|
||||
<input
|
||||
:class="{active:title != 'Add'}"
|
||||
v-model="percentOff"
|
||||
placeholder="Please enter percentOff"
|
||||
type="text"
|
||||
style="width: 220px"
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item" >
|
||||
<span>Commission Rate: <span>*</span></span>
|
||||
<input
|
||||
:class="{active:title != 'Add'}"
|
||||
v-model="commissionRate"
|
||||
placeholder="Please enter commission rate"
|
||||
type="text"
|
||||
style="width: 220px"
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item" >
|
||||
<!-- <div class="admin_state_item" > -->
|
||||
<span>End Time: <span>*</span></span>
|
||||
<a-space direction="vertical" style="width:220px">
|
||||
<a-date-picker v-model:value="rangePickerValue" :disabled="title != 'Add'" style="width:220px" />
|
||||
</a-space>
|
||||
</div>
|
||||
<div class="admin_state_item" >
|
||||
<span>Maximum: <span>*</span></span>
|
||||
<input
|
||||
:class="{active:title != 'Add'}"
|
||||
v-model="maxRedemptions"
|
||||
placeholder="Please enter maximum"
|
||||
type="text"
|
||||
style="width: 220px"
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item" >
|
||||
<span>PaidCommission: <span>*</span></span>
|
||||
<input
|
||||
v-model="paidCommission"
|
||||
placeholder="Please enter paidCommission"
|
||||
type="text"
|
||||
style="width: 220px"
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>Remark: <span>*</span></span>
|
||||
<input
|
||||
v-model="remark"
|
||||
placeholder="Please enter remark"
|
||||
type="text"
|
||||
style="width: 220px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="allUserPoeration_btn admin_page">
|
||||
<div class="admin_search_item" @click="cancelDsign">
|
||||
Close
|
||||
</div>
|
||||
<div class="admin_search_item" @click="setOk">
|
||||
OK
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a-modal>
|
||||
<div class="mark_loading" v-show="loadingShow">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { defineComponent, ref, reactive, watch, onMounted, nextTick, toRefs } from "vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { Modal, message } from "ant-design-vue";
|
||||
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
||||
import { formatTime,isEmail } from "@/tool/util";
|
||||
import dayjs, { Dayjs } from 'dayjs';
|
||||
const md5 = require("md5");
|
||||
export default defineComponent({
|
||||
components: {
|
||||
},
|
||||
emits: ['searchHistoryList'],
|
||||
setup(props,{emit}) {
|
||||
let operations = reactive({
|
||||
operationsModal:false,
|
||||
operationsEdit:false,
|
||||
loadingShow:false,
|
||||
title:''
|
||||
})
|
||||
let operationsData = reactive({
|
||||
rangePickerValue:'',
|
||||
percentOff:'',
|
||||
commissionRate:'',
|
||||
maxRedemptions:'',
|
||||
cooperator:'',
|
||||
paidCommission:'',
|
||||
remark:'',
|
||||
id:''
|
||||
})
|
||||
let init = (funStr,data)=>{
|
||||
operations.operationsModal = true
|
||||
operations.operationsEdit = true
|
||||
operations.title = funStr
|
||||
if(funStr == 'Add') operations.operationsEdit = false
|
||||
if(funStr == 'Edit'){
|
||||
operationsData.id=data.id
|
||||
operationsData.percentOff=data.percentOff
|
||||
operationsData.commissionRate=data.commissionRate
|
||||
operationsData.maxRedemptions=data.maxRedemptions
|
||||
operationsData.cooperator=data.cooperator
|
||||
operationsData.paidCommission=data.paidCommission
|
||||
operationsData.remark=data.remark
|
||||
operationsData.rangePickerValue = dayjs(new Date(data.redeemBy * 1000).toISOString().split('T')[0],'YYYY/MM/DD');
|
||||
|
||||
// operationsData.rangePickerValue='2024-08-05T00:00:06'
|
||||
// operationsData.validEndTime='2024-08-05T00:00:06'
|
||||
// operationsData.commissionRate = data.commissionRate
|
||||
// operationsData.maxRedemptions = data.maxRedemptions
|
||||
// operationsData.validStartTime = formatTime(data.validStartTime)
|
||||
// operationsData.validEndTime = formatTime(data.validEndTime)
|
||||
}
|
||||
|
||||
}
|
||||
let setAddData = ()=>{
|
||||
const timestampMs = new Date(operationsData.rangePickerValue).getTime() / 1000; // 直接获取毫秒时间戳
|
||||
return {
|
||||
"percentOff": operationsData.percentOff,
|
||||
"maxRedemptions": operationsData.maxRedemptions,
|
||||
"commissionRate": operationsData.commissionRate,
|
||||
"timestamp": timestampMs,
|
||||
cooperator:operationsData.cooperator,
|
||||
remark:operationsData.remark,
|
||||
}
|
||||
}
|
||||
let setEditData = ()=>{
|
||||
const timestampMs = new Date(operationsData.rangePickerValue).getTime() / 1000; // 直接获取毫秒时间戳
|
||||
return {
|
||||
id: operationsData.id,
|
||||
paidCommission: operationsData.commissionRate,
|
||||
cooperator:operationsData.cooperator,
|
||||
remark:operationsData.remark,
|
||||
}
|
||||
}
|
||||
let cancelDsign = ()=>{
|
||||
operationsData.rangePickerValue=''
|
||||
operationsData.percentOff=''
|
||||
operationsData.commissionRate=''
|
||||
operationsData.maxRedemptions=''
|
||||
operationsData.cooperator=''
|
||||
operationsData.paidCommission=''
|
||||
operationsData.remark=''
|
||||
operationsData.id=''
|
||||
operations.operationsModal = false
|
||||
}
|
||||
let setOk = ()=>{
|
||||
let data
|
||||
if(operations.title == 'Add'){
|
||||
data = setAddData()
|
||||
if(!data.commissionRate || !data.maxRedemptions || !data.timestamp || !data.percentOff)return message.warning('Please check the input box marked with *')
|
||||
Https.axiosPost(Https.httpUrls.createCoupon, data).then(
|
||||
(rv) => {
|
||||
if (rv) {
|
||||
cancelDsign()
|
||||
emit('searchHistoryList')
|
||||
}
|
||||
}
|
||||
);
|
||||
}else{
|
||||
data = setEditData()
|
||||
if(!data.cooperator || !data.paidCommission || !data.remark )return message.warning('Please check the input box marked with *')
|
||||
Https.axiosGet(Https.httpUrls.updatePromCodeInfo,{params:data}).then(
|
||||
(rv) => {
|
||||
if (rv) {
|
||||
cancelDsign()
|
||||
emit('searchHistoryList')
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
return {
|
||||
...toRefs(operations),
|
||||
...toRefs(operationsData),
|
||||
cancelDsign,
|
||||
init,
|
||||
focus,
|
||||
blur,
|
||||
setOk,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
:deep(.allUserPoeration_modal){
|
||||
.ant-modal-body{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<style lang="less" scoped>
|
||||
|
||||
.allUserPoeration_modal {
|
||||
.closeIcon {
|
||||
z-index: 2;
|
||||
}
|
||||
.allUserPoeration_btn{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: auto;
|
||||
justify-content: flex-end;
|
||||
padding: 1rem 0;
|
||||
.admin_search_item{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.allUserPoeration_center{
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
365
src/component/Administrator/coupons/index.vue
Normal file
365
src/component/Administrator/coupons/index.vue
Normal file
@@ -0,0 +1,365 @@
|
||||
<template>
|
||||
<div class="test_cli admin_page">
|
||||
<div class="admin_table_search">
|
||||
<div class="admin_state">
|
||||
|
||||
<div class="admin_state_item">
|
||||
<span>Start Date:</span>
|
||||
<a-range-picker
|
||||
style="width:250px"
|
||||
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>Start Time:</span>
|
||||
<a-time-range-picker style="width:250px" class="range_picker" valueFormat="HH:mm:ss" v-model:value="rangeTimeValue" />
|
||||
</div> -->
|
||||
<div class="admin_state_item">
|
||||
<span>Expired or not:</span>
|
||||
<a-select
|
||||
v-model:value="isExpired"
|
||||
show-search
|
||||
allowClear
|
||||
style="width: 250px"
|
||||
placeholder="Please select"
|
||||
:options="changeList"
|
||||
@keydown.enter="gettrialList"
|
||||
></a-select>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>Cooperator:</span>
|
||||
<input
|
||||
v-model="cooperator"
|
||||
placeholder="Please enter cooperator"
|
||||
@keydown.enter="gettrialList"
|
||||
type="text"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>Promotion Code:</span>
|
||||
<input
|
||||
v-model="promotionCode"
|
||||
placeholder="Please enter promotion code"
|
||||
@keydown.enter="gettrialList"
|
||||
type="text"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="admin_search">
|
||||
<div class="admin_search_item" @click="searchHistoryList">Search</div>
|
||||
<div class="admin_search_item" @click="addhHistoryList">
|
||||
Add
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="admin_table_content" ref="historyTable">
|
||||
<a-table
|
||||
@resizeColumn="handleResizeColumn"
|
||||
:columns="columns"
|
||||
:data-source="dataList"
|
||||
: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
|
||||
class="operate_item"
|
||||
@click="setAagree(record)"
|
||||
style="margin-right: 2rem;"
|
||||
>
|
||||
Edit
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<allUserPoerationsVue ref="allUserPoerationsVue" @searchHistoryList="searchHistoryList"></allUserPoerationsVue>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, reactive, toRefs, computed, toRef } from "vue";
|
||||
import { useStore } from "vuex";
|
||||
import { Https } from "@/tool/https";
|
||||
import allUserPoerationsVue from "./addAllUser.vue";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
allUserPoerationsVue
|
||||
},
|
||||
setup() {
|
||||
const store:any = useStore()
|
||||
let rangePickerValue: any = ref([]);
|
||||
let rangeTimeValue: any = ref([]);
|
||||
let renameData: any = ref({}); //修改名字选中的数据
|
||||
const dataDom = reactive({
|
||||
allUserPoerationsVue:null as any,
|
||||
})
|
||||
const columns: any = computed(() => {
|
||||
return [
|
||||
{
|
||||
title: 'User Id',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "id",
|
||||
key: "id",
|
||||
width:100,
|
||||
sorter: true,
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: 'Max Redemptions',
|
||||
align: "center",
|
||||
dataIndex: "maxRedemptions",
|
||||
key: "maxRedemptions",
|
||||
width:200,
|
||||
},
|
||||
|
||||
{
|
||||
title: 'Promotion Code',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "promotionCode",
|
||||
key: "promotionCode",
|
||||
width:150,
|
||||
},
|
||||
{
|
||||
title: 'redeemBy',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "redeemBy",
|
||||
key: "redeemBy",
|
||||
width:150,
|
||||
customRender: (record: any) => {
|
||||
if(record.text){
|
||||
return new Date(record.text * 1000).toISOString().split('T')[0] // "2025-04-24"
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'percent Off',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "percentOff",
|
||||
key: "percentOff",
|
||||
width:150,
|
||||
customRender: (record: any) => {
|
||||
return record.text+'%'
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'commissionRate',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "commissionRate",
|
||||
key: "commissionRate",
|
||||
width:150,
|
||||
customRender: (record: any) => {
|
||||
return record.text+'%'
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'cooperator',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "cooperator",
|
||||
key: "cooperator",
|
||||
width:150,
|
||||
},
|
||||
{
|
||||
title: 'Label Volmoney',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "totalEarnings",
|
||||
key: "totalEarnings",
|
||||
width:150,
|
||||
},
|
||||
{
|
||||
title: 'Commission',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "commission",
|
||||
key: "commission",
|
||||
width:150,
|
||||
},
|
||||
{
|
||||
title: 'Commission paid',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "paidCommission",
|
||||
key: "paidCommission",
|
||||
width:150,
|
||||
},
|
||||
{
|
||||
title: 'Unpaid commission',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "unpaidCommission",
|
||||
key: "unpaidCommission",
|
||||
width:150,
|
||||
},
|
||||
//
|
||||
{
|
||||
title: 'remark',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "remark",
|
||||
key: "remark",
|
||||
width:150,
|
||||
}, {
|
||||
title: "Operations",
|
||||
key: "operation",
|
||||
width:120,
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
// slots:{customRender:'action'}
|
||||
Operations: true,
|
||||
},
|
||||
];
|
||||
});
|
||||
|
||||
let cooperator = ref('')
|
||||
let promotionCode = ref('')
|
||||
let dataList: any = ref([]);
|
||||
let status: any = ref(0);
|
||||
let orderBy: any = ref(0);
|
||||
// let filterOption = (input: any, option: any) => {
|
||||
// // 使用 option.label 进行搜索
|
||||
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
// };
|
||||
const changeList = ref([
|
||||
{
|
||||
value: '',
|
||||
label: 'All',
|
||||
},
|
||||
{
|
||||
value: 'false',
|
||||
label: 'No',
|
||||
},
|
||||
{
|
||||
value: 'true',
|
||||
label: 'Yes',
|
||||
}
|
||||
])
|
||||
let addhHistoryList = () => {
|
||||
dataDom.allUserPoerationsVue.init('Add','')
|
||||
};
|
||||
let setAagree = (data:any) =>{
|
||||
dataDom.allUserPoerationsVue.init('Edit',data)
|
||||
}
|
||||
return {
|
||||
...toRefs(dataDom),
|
||||
rangePickerValue,
|
||||
rangeTimeValue,
|
||||
columns,
|
||||
dataList,
|
||||
cooperator,
|
||||
promotionCode,
|
||||
renameData,
|
||||
status,
|
||||
changeList,
|
||||
orderBy,
|
||||
addhHistoryList,
|
||||
setAagree,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
isExpired:'',
|
||||
historyTableHeight: 0,
|
||||
handleResizeColumn: (w:any, col:any) => {
|
||||
col.width = w;
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let historyTable: any = this.$refs.historyTable;
|
||||
this.historyTableHeight = historyTable.clientHeight - 200;
|
||||
this.gettrialList();
|
||||
},
|
||||
methods: {
|
||||
//改变页码
|
||||
changePage(e: any, filters:any, sorter:any) {
|
||||
this.currentPage = e.current;
|
||||
this.pageSize = e.pageSize;
|
||||
console.log(sorter)
|
||||
// this.gettrialList();
|
||||
// if(sorter.order){
|
||||
// if(sorter.columnKey == 'id'){
|
||||
// this.orderBy = 'id'
|
||||
// }
|
||||
// }
|
||||
this.orderBy = sorter.order == "descend" ? "DESC" : "ASC";
|
||||
},
|
||||
|
||||
//查询列表
|
||||
searchHistoryList() {
|
||||
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]
|
||||
// : '23:59:59';
|
||||
let startDate: any = this.rangePickerValue[0]
|
||||
? this.rangePickerValue[0]+' '+'00:00:00'
|
||||
: "";
|
||||
let endDate: any = this.rangePickerValue[1]
|
||||
? this.rangePickerValue[1]+' '+'23:59:59'
|
||||
: "";
|
||||
let data = {
|
||||
endTime:endDate,
|
||||
startTime:startDate,
|
||||
cooperator:this.cooperator,//合作商
|
||||
isExpired:this.isExpired,//是否过期
|
||||
promotionCode:this.promotionCode,//优惠码
|
||||
orderById:null,//排序字段
|
||||
size:this.pageSize,
|
||||
page:this.currentPage,
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.getAllCoupons,data).then((rv: any) => {
|
||||
if (rv) {
|
||||
console.log(rv)
|
||||
this.dataList = rv.records
|
||||
this.total = rv.total
|
||||
// this.workspaceItem.position = this.singleTypeList[0].label
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.admin_page .admin_table_search .admin_state {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
</style>
|
||||
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {defineComponent, computed, provide, h, ref, nextTick, onBeforeUnmount, reactive, onMounted, toRefs,
|
||||
import {defineComponent, computed, provide, h, ref, watch, onBeforeUnmount, reactive, onMounted, toRefs,
|
||||
} from "vue";
|
||||
import {message} from 'ant-design-vue'
|
||||
import { Https } from "@/tool/https";
|
||||
@@ -48,7 +48,16 @@ export default defineComponent({
|
||||
canvasContent,
|
||||
liquefaction,publish
|
||||
},
|
||||
props: {
|
||||
isState: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
setup(props,{emit}) {
|
||||
watch(()=>props.isState,(newVal)=>{
|
||||
if(!newVal && canvasObj)canvasObj.clearEvent()
|
||||
})
|
||||
const { t } = useI18n();
|
||||
const store = useStore();
|
||||
const isShowMark = ref(false)
|
||||
@@ -67,6 +76,7 @@ export default defineComponent({
|
||||
let data = reactive({
|
||||
elementList:null,
|
||||
showCanvas:false,
|
||||
|
||||
})
|
||||
provide('canvasType',canvasType)
|
||||
provide('canvasObj',canvasObj)
|
||||
|
||||
@@ -68,6 +68,11 @@ export default defineComponent({
|
||||
default:'' as any,
|
||||
required:true
|
||||
},
|
||||
isSegmentation:{
|
||||
type:Boolean,
|
||||
default:false as any,
|
||||
required:true
|
||||
},
|
||||
},
|
||||
emits:['selectImgItem'],
|
||||
setup(props,{emit}) {
|
||||
@@ -86,7 +91,6 @@ export default defineComponent({
|
||||
currentPage:1,
|
||||
})
|
||||
const init = ()=>{
|
||||
console.log(123)
|
||||
detailData.designTypeList = props.catecoryList
|
||||
detailData.designType = detailData.designTypeList[0].value
|
||||
getLibraryList()
|
||||
@@ -115,7 +119,9 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
let data = JSON.parse(JSON.stringify(file))
|
||||
data.id = id
|
||||
if(!props.isSegmentation){
|
||||
data.id = id
|
||||
}
|
||||
emit('selectImgItem',data)
|
||||
// store.commit('DesignDetailCopy/setNewDetail',data)
|
||||
}
|
||||
@@ -263,6 +269,9 @@ export default defineComponent({
|
||||
width: 100%;
|
||||
height: calc((34rem - 2rem) / 2);
|
||||
overflow: hidden;
|
||||
> img{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,10 +28,11 @@
|
||||
<currentList ref="currentList" :level1Type="level1Type" :type="type" @selectImgItem="selectImgItem" :catecoryList="catecoryList"></currentList>
|
||||
</div>
|
||||
<div class="content_item" v-show="selectTitle == 'upload'" v-if="type != 'element'">
|
||||
<uploadList @selectImgItem="selectImgItem" :level1Type="level1Type" :catecoryList="catecoryList"></uploadList>
|
||||
<uploadList v-if="!isSegmentation" @selectImgItem="selectImgItem" :level1Type="level1Type" :catecoryList="catecoryList"></uploadList>
|
||||
<uploadSegmentation v-if="isSegmentation" :segmentationType="segmentationType" @selectImgItem="selectImgItem" :level1Type="level1Type" :catecoryList="catecoryList"></uploadSegmentation>
|
||||
</div>
|
||||
<div class="content_item" v-show="selectTitle == 'library'">
|
||||
<libraryList @selectImgItem="selectImgItem" :randomId="randomId" :level1Type="level1Type" :type="type" ref="libraryList" :catecoryList="catecoryList"></libraryList>
|
||||
<libraryList :isSegmentation="isSegmentation" @selectImgItem="selectImgItem" :randomId="randomId" :level1Type="level1Type" :type="type" ref="libraryList" :catecoryList="catecoryList"></libraryList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -45,12 +46,14 @@ import { useI18n } from 'vue-i18n'
|
||||
// import sketchCategory from "@/component/HomePage/sketchCategory.vue";
|
||||
import libraryList from './libraryList.vue'
|
||||
import uploadList from './uploadList.vue'
|
||||
import uploadSegmentation from './uploadSegmentation.vue'
|
||||
import currentList from './currentList.vue'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
currentList,
|
||||
libraryList,
|
||||
uploadList,
|
||||
uploadSegmentation,
|
||||
},
|
||||
props:{
|
||||
catecoryList:{
|
||||
@@ -62,6 +65,16 @@ export default defineComponent({
|
||||
default:true,
|
||||
required:false
|
||||
},
|
||||
isSegmentation:{//决定上传的入参,是否需要分割
|
||||
type:Boolean,
|
||||
default:false,
|
||||
required:false
|
||||
},
|
||||
segmentationType:{//决定上传的入参,是否需要分割
|
||||
type:String,
|
||||
default:'',
|
||||
required:false
|
||||
},
|
||||
type:{
|
||||
type:String,
|
||||
default:'' as any,
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
<div class="upload_item">
|
||||
<div class="upload_file_item upload_component">
|
||||
<a-upload
|
||||
:action="uploadUrl + '/api/element/upload'"
|
||||
:action="uploadUrl + (upLoadHttpsUrl?upLoadHttpsUrl:'/api/element/upload')"
|
||||
list-type="picture-card"
|
||||
:capture="null"
|
||||
|
||||
:multiple="true"
|
||||
:data="{
|
||||
...upload,
|
||||
}"
|
||||
@@ -64,6 +64,14 @@ export default defineComponent({
|
||||
default:'' as any,
|
||||
required:true
|
||||
},
|
||||
segmentation:{
|
||||
type:Object,
|
||||
default:null as any,
|
||||
},
|
||||
upLoadHttpsUrl:{//决定上传的入参,是否需要分割
|
||||
type:String,
|
||||
default:'' as any,
|
||||
},
|
||||
},
|
||||
emits:['selectImgItem'],
|
||||
setup(props,{emit}) {
|
||||
@@ -72,12 +80,13 @@ export default defineComponent({
|
||||
const detailData = reactive({
|
||||
isShowLoading:false,//懒加载,加载中
|
||||
uploadList:[],
|
||||
upload:{
|
||||
isPin: 0,
|
||||
level1Type: props.level1Type,
|
||||
gender:store.state.Workspace.probjects.sex ,
|
||||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
},
|
||||
upload:props.segmentation?
|
||||
props.segmentation:{
|
||||
isPin: 0,
|
||||
level1Type: props.level1Type,
|
||||
gender:store.state.Workspace.probjects.sex ,
|
||||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
},
|
||||
token:getCookie("token"),
|
||||
uploadUrl:getUploadUrl(),
|
||||
currentDetailType:computed(()=>store.state.DesignDetailCopy.currentDetailType)
|
||||
@@ -124,8 +133,6 @@ export default defineComponent({
|
||||
let fileList = detailData.uploadList.filter(
|
||||
(v:any) => v.status === "done"
|
||||
);
|
||||
console.log(file);
|
||||
|
||||
detailData.uploadList = fileList
|
||||
// this.selectImgItem(detailData.uploadList[detailData.uploadList.length-1])
|
||||
}else{
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
|
||||
<template>
|
||||
<div class="uploadList">
|
||||
<div class="uploadList_box">
|
||||
|
||||
<div class="content_img_item" v-for="(file) in uploadList" :key="file.id">
|
||||
<div class="content_img_item_block" :class="{active:file?.checked}">
|
||||
<img v-lazy="file.url" :key="file.url" :alt="file.name" @click.stop="selectImgItem(file)"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload_item">
|
||||
<div class="upload" @click="upload">
|
||||
<i class="fi fi-br-upload"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mark_loading" v-show="isShowMark">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent,computed,ref,provide,nextTick,createVNode,toRefs, reactive, onMounted} from 'vue'
|
||||
import { Https } from "@/tool/https";
|
||||
import { useStore } from "vuex";
|
||||
import sketchCategory from "@/component/HomePage/sketchCategory.vue";
|
||||
import { getCookie } from "@/tool/cookie";
|
||||
import { message,Upload} from 'ant-design-vue';
|
||||
import {getUploadUrl} from '@/tool/util'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
sketchCategory
|
||||
},
|
||||
props:{
|
||||
catecoryList:{
|
||||
type:Object,
|
||||
default:()=>[] as any,
|
||||
required:true
|
||||
},
|
||||
level1Type:{
|
||||
type:String,
|
||||
default:'' as any,
|
||||
required:true
|
||||
},
|
||||
segmentation:{
|
||||
type:Object,
|
||||
default:null as any,
|
||||
},
|
||||
segmentationType:{
|
||||
type:String,
|
||||
default:'' as any,
|
||||
},
|
||||
upLoadHttpsUrl:{//决定上传的入参,是否需要分割
|
||||
type:String,
|
||||
default:'' as any,
|
||||
},
|
||||
},
|
||||
emits:['selectImgItem'],
|
||||
setup(props,{emit}) {
|
||||
const {t} = useI18n();
|
||||
const store = useStore();
|
||||
const detailData = reactive({
|
||||
isShowLoading:false,//懒加载,加载中
|
||||
uploadList:[],
|
||||
upload:props.segmentation?
|
||||
props.segmentation:{
|
||||
isPin: 0,
|
||||
level1Type: props.level1Type,
|
||||
gender:store.state.Workspace.probjects.sex ,
|
||||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
},
|
||||
token:getCookie("token"),
|
||||
uploadUrl:getUploadUrl(),
|
||||
currentDetailType:computed(()=>store.state.DesignDetailCopy.currentDetailType),
|
||||
isShowMark:false,
|
||||
})
|
||||
const getDetailListData = reactive({
|
||||
total:0,
|
||||
pageSize:10,
|
||||
currentPage:1,
|
||||
})
|
||||
const selectImgItem = (file:any)=>{
|
||||
// let data = JSON.parse(JSON.stringify(file))
|
||||
// store.commit('DesignDetailCopy/setNewDetail',file)
|
||||
emit('selectImgItem',file)
|
||||
}
|
||||
const upload = ()=>{
|
||||
const input = document.createElement('input');
|
||||
input.type = 'file';
|
||||
input.accept = 'image/*'; // 只允许选择图片文件
|
||||
input.multiple = true; // 允许多选
|
||||
input.addEventListener('change', (event) => {
|
||||
detailData.isShowMark = true; // 显示加载状态
|
||||
const files = event?.target?.files;
|
||||
if (!files || files.length === 0) {
|
||||
detailData.isShowMark = false;
|
||||
return;
|
||||
}
|
||||
let file = [...Array.from(files)];
|
||||
let param = new FormData();
|
||||
param.append('id', '');
|
||||
param.append('type', props.segmentationType);
|
||||
file.forEach(image => {
|
||||
param.append('file', image);
|
||||
});
|
||||
|
||||
let config: any = {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
'Accept': '*/*'
|
||||
}
|
||||
};
|
||||
|
||||
Https.axiosPost(Https.httpUrls.imageSegmentation, param, config)
|
||||
.then((rv: any) => {
|
||||
detailData.uploadList.unshift(...rv);
|
||||
detailData.isShowMark = false;
|
||||
})
|
||||
.catch(rv => {
|
||||
detailData.isShowMark = false;
|
||||
});
|
||||
});
|
||||
|
||||
// 触发文件选择对话框
|
||||
input.click();
|
||||
}
|
||||
return{
|
||||
...toRefs(detailData),
|
||||
...toRefs(getDetailListData),
|
||||
|
||||
selectImgItem,
|
||||
upload,
|
||||
}
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.uploadList{
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
> .uploadList_box{
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 1rem;
|
||||
justify-content: space-between;
|
||||
align-content: flex-start;
|
||||
&::-webkit-scrollbar{display: none;}
|
||||
> .content_img_item{
|
||||
> .content_img_item_block{
|
||||
width: calc((34rem - 2rem) / 2);
|
||||
height: calc((34rem - 2rem) / 2);
|
||||
position: relative;
|
||||
margin-bottom: 2rem;
|
||||
|
||||
> img{
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
}
|
||||
> .material_content_list_loding{
|
||||
width: 100%;
|
||||
height: calc((34rem - 2rem) / 2);
|
||||
}
|
||||
> .upload_item{
|
||||
width: calc((34rem - 2rem) / 2);
|
||||
height: calc((34rem - 2rem) / 2);
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.upload{
|
||||
cursor: pointer;
|
||||
width: calc(6rem * 1.2);
|
||||
height: calc(6rem * 1.2);
|
||||
border: calc(0.3rem * 1.2) solid #000;
|
||||
border-radius: calc(1rem * 1.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
i{
|
||||
font-size: 2rem;
|
||||
display: flex;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -6,7 +6,8 @@
|
||||
<div @click="getHistoryProject" class="gallery_btn white gallery_btn_radius">Resume Project</div>
|
||||
</div>
|
||||
<div v-else-if="state == 2" class="selectProjectBtn">
|
||||
<div style="width: 100%; margin: 2rem;">Please choose your workflow</div>
|
||||
<div style="width: 100%; margin: 2rem; display:flex;align-items: center;">
|
||||
<i @click="()=>state = 1" style="font-size:3rem; display:flex; cursor: pointer;margin-right:2rem" class="fi fi-rr-arrow-small-left"></i>Please choose your workflow</div>
|
||||
<div class="porjectBox">
|
||||
<div class="selectProjectBtn_title" v-for="item in opjectList" :key="item.value" @click="selectProject(item)">{{item.title}}</div>
|
||||
</div>
|
||||
@@ -17,6 +18,9 @@
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
<affiche ref="affiche"></affiche>
|
||||
<div class="userSystem" v-if="userDetail.systemList.indexOf(1) == -1">
|
||||
You can use these features only after becoming a regular user~
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
@@ -105,12 +109,46 @@ export default defineComponent({
|
||||
}
|
||||
const getHistory = ()=>{
|
||||
let value = {
|
||||
id:route.params.id,
|
||||
id:Number(route.params.id),
|
||||
}
|
||||
if(!route.params.id)return
|
||||
createData()
|
||||
Https.axiosPost(Https.httpUrls.selectHistoryProject,value).then((rv: any) => {
|
||||
let type:any = data.opjectList.find(obj => obj.httpValue === rv.process);
|
||||
setProjectData(rv)
|
||||
})
|
||||
}
|
||||
// watch(()=>data.opjectList.type,(newVal,oldVal)=>{
|
||||
// console.log(newVal,oldVal);
|
||||
|
||||
|
||||
// })
|
||||
const getWorks = ()=>{
|
||||
let data:any = {
|
||||
"accountId": 0,
|
||||
"collectionId": 0,
|
||||
"coverId": 0,
|
||||
"createDate": "",
|
||||
id:Number(route.params.id),
|
||||
"isDeleted": 0,
|
||||
"portfolioDes": "",
|
||||
"portfolioName": "",
|
||||
"portfolioType": "",
|
||||
"status": 0,
|
||||
"updateDate": "",
|
||||
"userLikeGroupId":''
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.setPorfolioChoose, data).then(
|
||||
(rv: any) => {
|
||||
setProjectData(rv)
|
||||
// this.setPortfolio(rv.portfolioDTO)
|
||||
// this.store.commit("setUserGroupId", rv.userGroupId);
|
||||
// this.dealHistoryChooseData(rv, type);
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}
|
||||
const setProjectData = (rv:any)=>{
|
||||
let type:any = data.opjectList.find(obj => obj.httpValue === rv.process);
|
||||
//取出数组对象某个值
|
||||
let storeData = {
|
||||
name:rv.name,
|
||||
@@ -129,10 +167,10 @@ export default defineComponent({
|
||||
},
|
||||
positionList:[],
|
||||
publishData:{
|
||||
id:'',
|
||||
portfolioDes:'',
|
||||
portfolioName:'',
|
||||
tagsDTO:[],
|
||||
id:rv.portfolioDTO.id?rv.portfolioDTO.id:'',
|
||||
portfolioDes:rv.portfolioDTO.portfolioDes?rv.portfolioDTO.portfolioDes:'',
|
||||
portfolioName:rv.portfolioDTO.portfolioName?rv.portfolioDTO.portfolioName:'',
|
||||
tagsDTO:rv.portfolioDTO.tagsDTO?rv.portfolioDTO.tagsDTO:[],
|
||||
},
|
||||
model:{}
|
||||
}
|
||||
@@ -163,13 +201,7 @@ export default defineComponent({
|
||||
nextTick(()=>{
|
||||
dataDom.workflow.isUpdataPorject = true
|
||||
})
|
||||
})
|
||||
}
|
||||
// watch(()=>data.opjectList.type,(newVal,oldVal)=>{
|
||||
// console.log(newVal,oldVal);
|
||||
|
||||
|
||||
// })
|
||||
onMounted(async ()=>{
|
||||
let test:any = getCookie('isTest')
|
||||
let isTest =JSON.parse(test)
|
||||
@@ -215,7 +247,11 @@ export default defineComponent({
|
||||
}else{
|
||||
// openGuide()
|
||||
}
|
||||
getHistory()
|
||||
if(route.params.type == 'Works'){
|
||||
getWorks()
|
||||
}else{
|
||||
getHistory()
|
||||
}
|
||||
})
|
||||
onBeforeMount(()=>{
|
||||
// data.selectObject = null
|
||||
@@ -243,7 +279,21 @@ export default defineComponent({
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
.userSystem{
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
z-index:2;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
font-size: 4rem;
|
||||
}
|
||||
> .createProject{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div class="createCloud">
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent,computed,ref,provide,nextTick,createVNode,toRefs, reactive} from 'vue'
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { Https } from "@/tool/https";
|
||||
import { useStore } from "vuex";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
},
|
||||
props:{
|
||||
},
|
||||
emits:[],
|
||||
setup(props,{emit}) {
|
||||
const store = useStore();
|
||||
const data = reactive({
|
||||
})
|
||||
const dataDom = reactive({
|
||||
})
|
||||
return{
|
||||
...toRefs(dataDom),
|
||||
...toRefs(data),
|
||||
}
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.createCloud{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
171
src/component/HomePage/index/model/cloudUploading/index.vue
Normal file
171
src/component/HomePage/index/model/cloudUploading/index.vue
Normal file
@@ -0,0 +1,171 @@
|
||||
<template>
|
||||
<div class="uploading">
|
||||
<div class="title">
|
||||
<div class="list">
|
||||
<div
|
||||
class="titleItem active"
|
||||
>
|
||||
<span class="detailText">All</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="createCloud">
|
||||
<div class="gallery_btn" @click="createClound">Create cloudUploading</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contentList">
|
||||
<div class="title">
|
||||
<div class="titleItem" v-for="item in cloudTiltleList" :key="item.value">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content"></div>
|
||||
</div>
|
||||
<!-- <createCloud ref="createCloud"></createCloud> -->
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent,computed,ref,provide,nextTick,createVNode,toRefs, reactive} from 'vue'
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { Https } from "@/tool/https";
|
||||
import { useStore } from "vuex";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import createCloud from "./createCloud.vue";
|
||||
export default defineComponent({
|
||||
components:{
|
||||
createCloud,
|
||||
},
|
||||
props:{
|
||||
workflowType:{
|
||||
type:String,
|
||||
default:'' as any,
|
||||
required:true
|
||||
}
|
||||
},
|
||||
emits:[],
|
||||
setup(props,{emit}) {
|
||||
const store = useStore();
|
||||
const data = reactive({
|
||||
pageType:'list',
|
||||
generateList:{
|
||||
seriesDesign:[
|
||||
{
|
||||
name:'1',
|
||||
value:100,
|
||||
}
|
||||
],
|
||||
singleProductDesign:[
|
||||
{
|
||||
name:'1',
|
||||
value:100,
|
||||
}
|
||||
],
|
||||
printDesign:[
|
||||
{
|
||||
name:'1',
|
||||
value:100,
|
||||
}
|
||||
],
|
||||
productDrawingDesign:[
|
||||
{
|
||||
name:'1',
|
||||
value:100,
|
||||
}
|
||||
],
|
||||
printingDesign3D:[
|
||||
{
|
||||
name:'1',
|
||||
value:100,
|
||||
}
|
||||
],
|
||||
sketchDesign:[]
|
||||
},
|
||||
cloudTiltleList:[
|
||||
{
|
||||
name:'File name',
|
||||
value:'name',
|
||||
},{
|
||||
name:'File size',
|
||||
value:'size',
|
||||
},{
|
||||
name:'UPloaded by',
|
||||
value:'upLoadedBy',
|
||||
},{
|
||||
name:'Task time',
|
||||
value:'taskTime',
|
||||
},
|
||||
],
|
||||
})
|
||||
const dataDom = reactive({
|
||||
createCloud,
|
||||
})
|
||||
const createClound = ()=>{
|
||||
|
||||
}
|
||||
return{
|
||||
...toRefs(dataDom),
|
||||
...toRefs(data),
|
||||
createClound,
|
||||
}
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.uploading{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
padding-top: 3rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
> .title{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
> .list{
|
||||
display: flex;
|
||||
margin-bottom: 2.5rem;
|
||||
> .titleItem:last-child{
|
||||
margin-right: 0;
|
||||
}
|
||||
> .titleItem{
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
margin-right: 6.5rem;
|
||||
}
|
||||
> .titleItem::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
display: block;
|
||||
background: #000;
|
||||
height: calc(.4rem*1.2);
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: -.5rem;
|
||||
width: 0px;
|
||||
transition: 0.3s all;
|
||||
}
|
||||
> .active {
|
||||
color: #000;
|
||||
font-weight: 600;
|
||||
}
|
||||
> .active::before {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
> .createCloud{
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
> .contentList{
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
padding-top: 2.5rem;
|
||||
> .title{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -665,7 +665,6 @@ export default defineComponent({
|
||||
}
|
||||
return data
|
||||
})
|
||||
console.log(123)
|
||||
this.store.commit('setColorboardList',newColorList)
|
||||
},
|
||||
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
<template>
|
||||
<div class="deReconstruction">
|
||||
<div class="selectSektch itemBox">
|
||||
<selectList @selectImgItem="selectImgItem" level1Type="Sketchboard" :randomId="false" type="sketch" :catecoryList="sketchCatecoryList"></selectList>
|
||||
<div class="type">
|
||||
<a-select
|
||||
v-model:value="segmentationType"
|
||||
show-search
|
||||
:allowClear="false"
|
||||
style="width: 100%"
|
||||
placeholder="Please select"
|
||||
:options="[{value:'product',label:'product'},{value:'sketch',label:'sketch'}]"
|
||||
></a-select>
|
||||
<!-- <label>
|
||||
<div class="text">product</div>
|
||||
<input type="radio" value="product" v-model="segmentationType">
|
||||
</label>
|
||||
<label>
|
||||
<div class="text">sketch</div>
|
||||
<input type="radio" value="sketch" v-model="segmentationType">
|
||||
</label> -->
|
||||
</div>
|
||||
<selectList @selectImgItem="selectImgItem" :segmentationType="segmentationType" :isSegmentation="true" upLoadHttpsUrl="/api/element/imageSegmentation" level1Type="Sketchboard" :randomId="false" type="sketch" :catecoryList="sketchCatecoryList"></selectList>
|
||||
</div>
|
||||
<div class="canvas itemBox">
|
||||
<canvasBox @setGenerateImg="setGenerateImg" ref="canvasBox"></canvasBox>
|
||||
@@ -44,6 +62,7 @@ export default defineComponent({
|
||||
sketchCatecoryList:computed(()=>{
|
||||
return store.state.Workspace.probjects.positionList
|
||||
}),
|
||||
segmentationType:'product',
|
||||
generateImg:computed(()=>store.state.HomeStoreModule.deReconstruction) as any,
|
||||
})
|
||||
const setIsShowMark:any = inject('setIsShowMark')
|
||||
@@ -51,8 +70,33 @@ export default defineComponent({
|
||||
canvasBox:null as any,
|
||||
})
|
||||
const selectImgItem = (data:any)=>{
|
||||
data.minioUrl = data.url
|
||||
dataDom.canvasBox.addImage(data)
|
||||
if(!data.designType){
|
||||
canvasAddImg(data)
|
||||
}else{
|
||||
// data.minioUrl = data.url
|
||||
// dataDom.canvasBox.addImage(data)
|
||||
getSegmentation(data)
|
||||
}
|
||||
}
|
||||
const canvasAddImg = (list:any)=>{
|
||||
list.segmentedImages.forEach((url:any) => {
|
||||
list.imgUrl = url
|
||||
dataDom.canvasBox.addImage(list)
|
||||
});
|
||||
}
|
||||
const getSegmentation = (value:any)=>{
|
||||
let param = new FormData();
|
||||
param.append('id',value.id)
|
||||
param.append('file','')
|
||||
param.append('type',data.segmentationType)
|
||||
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
|
||||
Https.axiosPost(Https.httpUrls.imageSegmentation,param,config)
|
||||
.then((rv:any) => {
|
||||
// console.log(rv);
|
||||
canvasAddImg(rv[0])
|
||||
}
|
||||
).catch(rv=>{
|
||||
})
|
||||
}
|
||||
const openSetData = ()=>{
|
||||
dataDom.canvasBox.openSetData()
|
||||
@@ -154,6 +198,24 @@ export default defineComponent({
|
||||
&.selectSektch{
|
||||
width: 37rem;
|
||||
flex-shrink: 0;
|
||||
> .type{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
> :deep(.ant-select){
|
||||
margin: 1rem 0;
|
||||
.ant-select-selector{
|
||||
border-radius: 2rem;
|
||||
}
|
||||
}
|
||||
>label{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
>div{
|
||||
font-size: 2rem;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.canvas{
|
||||
flex: 1;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<div class="designPage">
|
||||
<div class="page_content">
|
||||
<div class="userSystem" v-if="userDetail.systemList.indexOf(1) == -1">
|
||||
You can use these features only after becoming a regular user~
|
||||
</div>
|
||||
|
||||
<div class="page_content_body">
|
||||
<div class="designPage_body">
|
||||
<div class="designPage_left" ref="hidden">
|
||||
@@ -1456,19 +1454,7 @@ export default defineComponent({
|
||||
.page_content {
|
||||
position: relative;
|
||||
|
||||
.userSystem{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
z-index:2;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
font-size: 4rem;
|
||||
}
|
||||
|
||||
.designPage_left_bottom{
|
||||
position: absolute;
|
||||
width: 4rem;
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<template>
|
||||
<div class="patternMaking3D">
|
||||
<div class="selectModel">
|
||||
<div class="heard">Clothing</div>
|
||||
<div class="list" v-if="maskShow">
|
||||
<div class="heard selectList">
|
||||
<div :class="{active:libraryOrModel == 'model'}" @click="setLibraryOrModel('model')">Clothing</div>
|
||||
<div :class="{active:libraryOrModel == 'print'}" @click="setLibraryOrModel('print')">Print</div>
|
||||
</div>
|
||||
<div class="list" v-show="libraryOrModel == 'model'" v-if="maskShow">
|
||||
<div v-for="item in modelList" class="modelItem" :class="{active:item.id == selectModel.id}" @click="setSelectModel(item)">
|
||||
<img :src="item.url" alt="">
|
||||
</div>
|
||||
@@ -13,6 +16,11 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list printList" v-show="libraryOrModel == 'print'">
|
||||
<div v-for="item in printList" class="modelItem" :class="{active:item.id == selectModel.id}" @click="setMaterial(item)">
|
||||
<img :src="item.url || item.imgUrl" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="model" v-show="selectModel.id != -1">
|
||||
<div class="heard">
|
||||
@@ -48,7 +56,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent,computed,ref,provide,nextTick,createVNode,toRefs, reactive} from 'vue'
|
||||
import { defineComponent,computed,ref,provide,nextTick,createVNode,toRefs, reactive, watch} from 'vue'
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { Https } from "@/tool/https";
|
||||
import { useStore } from "vuex";
|
||||
@@ -68,7 +76,12 @@ export default defineComponent({
|
||||
selectModel:{
|
||||
id:-1,
|
||||
} as any,
|
||||
// printCatecoryList:computed(()=>{
|
||||
// return store.state.UserHabit.printType
|
||||
// }),
|
||||
selectObject:computed(()=>store.state.Workspace.probjects),//选择的项目
|
||||
modelList:[] as any,
|
||||
printList:computed(()=>store.state.UploadFilesModule.allBoardData.printboardFiles),
|
||||
isShowMark:false,
|
||||
isNoData:false,
|
||||
isShowLoading:false,
|
||||
@@ -77,6 +90,13 @@ export default defineComponent({
|
||||
imgOrThree:false,
|
||||
isFront:false,
|
||||
maskShow:false,
|
||||
libraryOrModel:'model'
|
||||
})
|
||||
watch(()=>data.selectObject.sex,(newVal)=>{
|
||||
data.modelList = []
|
||||
data.currentPage = 0,
|
||||
data.isNoData = false
|
||||
data.isShowMark = false
|
||||
})
|
||||
const setSelectModel = (item:any)=>{
|
||||
data.isShowMark = true
|
||||
@@ -114,14 +134,14 @@ export default defineComponent({
|
||||
let value = {
|
||||
page: data.currentPage,
|
||||
size:data.pageSize,
|
||||
|
||||
sex:data.selectObject.sex,
|
||||
}
|
||||
data.isShowLoading = true
|
||||
Https.axiosPost(Https.httpUrls.threeDPage,value).then(
|
||||
(rv: any) => {
|
||||
if(rv.content.length == 0)data.isNoData = true
|
||||
data.isShowLoading = false
|
||||
data.modelList.push(...rv.content)
|
||||
data.isShowLoading = false
|
||||
}
|
||||
).catch((res)=>{
|
||||
data.isNoData = true
|
||||
@@ -147,6 +167,14 @@ export default defineComponent({
|
||||
const openDown = ()=>{
|
||||
dataDom.download.openDown(data.selectModel.id)
|
||||
}
|
||||
const setLibraryOrModel = (str:any)=>{
|
||||
if(str == 'print' && data.selectModel.id == -1)return
|
||||
data.libraryOrModel = str
|
||||
}
|
||||
const setMaterial = (item:any)=>{
|
||||
let url = item.url || item.url || item.imgUrl
|
||||
dataDom.threeBox.addMaterial(url)
|
||||
}
|
||||
return{
|
||||
...toRefs(dataDom),
|
||||
...toRefs(data),
|
||||
@@ -155,6 +183,8 @@ export default defineComponent({
|
||||
getModelList,
|
||||
setImgOrThree,
|
||||
openDown,
|
||||
setLibraryOrModel,
|
||||
setMaterial,
|
||||
}
|
||||
},
|
||||
directives:{
|
||||
@@ -202,6 +232,33 @@ export default defineComponent({
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
&.selectList{
|
||||
justify-content: flex-start;
|
||||
> div{
|
||||
position: relative;
|
||||
margin-right: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
> div::before{
|
||||
position: absolute;
|
||||
content: "";
|
||||
display: block;
|
||||
background: #000;
|
||||
height: calc(.4rem*1.2);
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: -.5rem;
|
||||
width: 0px;
|
||||
transition: 0.3s all;
|
||||
}
|
||||
> .active {
|
||||
color: #000;
|
||||
font-weight: 600;
|
||||
}
|
||||
> .active::before {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
> .switch{
|
||||
font-weight: 400;
|
||||
}
|
||||
@@ -219,6 +276,14 @@ export default defineComponent({
|
||||
flex-wrap: wrap;
|
||||
overflow-y: auto;
|
||||
align-content: flex-start;
|
||||
&.printList{
|
||||
> .modelItem{
|
||||
aspect-ratio: 1 / 1;
|
||||
>img{
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
> .modelItem{
|
||||
width: calc(100% / 4 - 1rem);
|
||||
margin: .5rem;
|
||||
@@ -230,7 +295,9 @@ export default defineComponent({
|
||||
> img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-fit: contain;
|
||||
padding: 1rem;
|
||||
|
||||
}
|
||||
&.active{
|
||||
border: 2px solid #000;
|
||||
@@ -247,6 +314,7 @@ export default defineComponent({
|
||||
// height: 20rem;
|
||||
// height: 75rem;
|
||||
flex: 1;
|
||||
padding: 1rem 0;
|
||||
overflow: hidden;
|
||||
margin: auto;
|
||||
>.img{
|
||||
|
||||
@@ -209,20 +209,31 @@ export default defineComponent({
|
||||
await addModel(url)
|
||||
// addMaterial()
|
||||
}
|
||||
const addMaterial = ()=>{
|
||||
const addMaterial = (url:any)=>{
|
||||
//添加图片材质
|
||||
data.load.state = true
|
||||
let textureLoader = new THREE.TextureLoader()
|
||||
textureLoader.load('https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E7%99%BD%E8%89%B2%E5%9B%BE%E7%89%87&hs=0&pn=8&spn=0&di=7466852183703552001&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=1061489690%2C1376605706&os=2709213815%2C2487532130&simid=3551480199%2C346831275&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=&bdtype=0&oriquery=&objurl=https%3A%2F%2Fwx2.sinaimg.cn%2Fmw690%2F941fd00fgy1hrx01tvys1j20zk1bet8s.jpg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fojtk5_z%26e3Bv54AzdH3Fd9bc88db90AzdH3FO5LdNyykj&gsm=&islist=&querylist=', // 图片放在public/textures目录下
|
||||
textureLoader.load(url, // 图片放在public/textures目录下
|
||||
(texture:any) => {
|
||||
// 3. 配置纹理参数
|
||||
texture.wrapS = THREE.RepeatWrapping;
|
||||
texture.wrapT = THREE.RepeatWrapping;
|
||||
texture.repeat.set(1, 1); // 纹理重复次数
|
||||
|
||||
// texture.repeat.set(1, 1); // 纹理重复次数
|
||||
texture.anisotropy = 32; // 提高纹理清晰度
|
||||
data.group?.traverse((child:any) => {
|
||||
if (child.isMesh) {
|
||||
// 5. 创建新材质(根据需求选择材质类型)
|
||||
const textureWidth = texture.image.width;
|
||||
const textureHeight = texture.image.height;
|
||||
const box = new THREE.Box3().setFromObject(child);
|
||||
const modelWidth = box.getSize(new THREE.Vector3()).x;
|
||||
const modelHeight = box.getSize(new THREE.Vector3()).y;
|
||||
const repeatX = modelWidth / textureWidth;
|
||||
const repeatY = modelHeight / textureHeight;
|
||||
// texture.repeat.set(1, 1); // 纹理重复次数
|
||||
texture.repeat.set(repeatX, repeatY); // 纹理重复次数
|
||||
|
||||
const newMaterial = new THREE.MeshStandardMaterial({
|
||||
map: texture, // 基础颜色贴图
|
||||
roughness: 0.7, // 表面粗糙度 (0-1)
|
||||
@@ -231,7 +242,6 @@ export default defineComponent({
|
||||
});
|
||||
// 6. 替换原有材质
|
||||
child.material = newMaterial;
|
||||
|
||||
// 7. 如果需要单独控制某些子模型的UV
|
||||
if (child.geometry.attributes.uv) {
|
||||
// 可以在这里修改UV坐标
|
||||
@@ -336,6 +346,7 @@ export default defineComponent({
|
||||
...toRefs(dataDom),
|
||||
...toRefs(data),
|
||||
openSetData,
|
||||
addMaterial,
|
||||
}
|
||||
},
|
||||
provide() {
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<div class="element">
|
||||
<div class="title"><i class="fi fi-rs-comments"></i><span>Selected Video</span></div>
|
||||
<div class="content">
|
||||
<generalDrag ref="generalDragLeft" v-if="isState" :list="likeList" :isVideo="true" @setBtn="likeSetBtn"></generalDrag>
|
||||
<generalDrag ref="generalDragLeft" v-if="isState" :list="likeList" :isLike="true" :isVideo="true" @setBtn="likeSetBtn"></generalDrag>
|
||||
</div>
|
||||
<!-- <div class="btnLeft" @click="setSize('left')" :class="{'active':button.left}">
|
||||
<span class="icon iconfont icon-xiala"></span>
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="content">
|
||||
<generalDrag ref="generalDragLeft" @setBtn="selectSetBtn" :list="likeList[productimgMenu.value]"></generalDrag>
|
||||
<generalDrag ref="generalDragLeft" @setBtn="selectSetBtn" :isLike="true" :list="likeList[productimgMenu.value]"></generalDrag>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
<template>
|
||||
<div class="contentBox" :class="{active:selectKey_ == 'design'}">
|
||||
<seriesDesign v-if="selectObject.id && workflowType == 'seriesDesign'" ref="seriesDesign" :selectKey_="selectKey_" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType"></seriesDesign>
|
||||
<singleProductDesign v-if="selectObject.id && workflowType == 'singleProductDesign'" ref="singleProductDesign" :selectKey_="selectKey_" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType"></singleProductDesign>
|
||||
<sketchDesign v-if="selectObject.id && workflowType == 'sketchDesign'" ref="sketchDesign" :selectKey_="selectKey_" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType"></sketchDesign>
|
||||
<productDrawingDesign v-if="selectObject.id && workflowType == 'productDrawingDesign'" ref="productDrawingDesign" :selectKey_="selectKey_" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType"></productDrawingDesign>
|
||||
<printingDesign3D v-if="selectObject.id && workflowType == 'printingDesign3D'" ref="printingDesign3D" :selectKey_="selectKey_" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType"></printingDesign3D>
|
||||
<printDesign v-if="selectObject.id && workflowType == 'printDesign'" ref="printDesign" :selectKey_="selectKey_" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType"></printDesign>
|
||||
<div class="contentBox" :class="{active:(selectKey_ == 'design' || selectKey_ == 'toProduct' || selectKey_ == 'relight' || selectKey_ == 'poseTransfer')}">
|
||||
<seriesDesign v-show="selectKey_ != 'yun'" v-if="selectObject.id && workflowType == 'seriesDesign'" ref="seriesDesign" :selectKey_="selectKey_" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType"></seriesDesign>
|
||||
<singleProductDesign v-show="selectKey_ != 'yun'" v-if="selectObject.id && workflowType == 'singleProductDesign'" ref="singleProductDesign" :selectKey_="selectKey_" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType"></singleProductDesign>
|
||||
<sketchDesign v-show="selectKey_ != 'yun'" v-if="selectObject.id && workflowType == 'sketchDesign'" ref="sketchDesign" :selectKey_="selectKey_" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType"></sketchDesign>
|
||||
<productDrawingDesign v-show="selectKey_ != 'yun'" v-if="selectObject.id && workflowType == 'productDrawingDesign'" ref="productDrawingDesign" :selectKey_="selectKey_" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType"></productDrawingDesign>
|
||||
<printingDesign3D v-show="selectKey_ != 'yun'" v-if="selectObject.id && workflowType == 'printingDesign3D'" ref="printingDesign3D" :selectKey_="selectKey_" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType"></printingDesign3D>
|
||||
<printDesign v-show="selectKey_ != 'yun'" v-if="selectObject.id && workflowType == 'printDesign'" ref="printDesign" :selectKey_="selectKey_" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType"></printDesign>
|
||||
<div class="public">
|
||||
<cloudUploading v-show="selectKey_ == 'yun'" v-if="selectObject.id" :workflowType="workflowType" ref="cloudUploading"></cloudUploading>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
@@ -22,13 +25,15 @@ import singleProductDesign from './singleProductDesign.vue'
|
||||
import sketchDesign from './sketchDesign.vue'
|
||||
import productDrawingDesign from './productDrawingDesign.vue'
|
||||
import printingDesign3D from './printingDesign3D.vue'
|
||||
import cloudUploading from '../../model/cloudUploading/index.vue'
|
||||
import { rgbToHsv, dataURLtoBlob } from "@/tool/util";
|
||||
|
||||
import { gsap, TweenMax } from "gsap";
|
||||
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
||||
export default defineComponent({
|
||||
components:{
|
||||
workspace,seriesDesign,printDesign,singleProductDesign,sketchDesign,productDrawingDesign,printingDesign3D
|
||||
workspace,seriesDesign,printDesign,singleProductDesign,sketchDesign,productDrawingDesign,printingDesign3D,
|
||||
cloudUploading
|
||||
},
|
||||
props:{
|
||||
selectKey_:String,
|
||||
@@ -55,27 +60,31 @@ export default defineComponent({
|
||||
})
|
||||
//处理design数据
|
||||
const setDesignData = (str:any)=>{
|
||||
if(str == 'workspace')return
|
||||
return new Promise(async (resolve,reject)=>{
|
||||
if(str == "colorBoard")await setColor()
|
||||
// if(str == "sketchBoard")await setSketch()
|
||||
let allBoardData = ['sketchBoard','moodBoard','printBoard','colorBoard']
|
||||
let value = {
|
||||
type:str,
|
||||
objectName:data.selectObject.type,
|
||||
}
|
||||
if(allBoardData.indexOf(str) != -1){
|
||||
await store.dispatch('setAllBoardData',value)
|
||||
}else{
|
||||
if (str in dataDom) {
|
||||
if(str == 'workspace' || str == '')return
|
||||
return new Promise(async (resolve,reject)=>{
|
||||
if(str == "colorBoard")await setColor()
|
||||
// if(str == "sketchBoard")await setSketch()
|
||||
let allBoardData = ['sketchBoard','moodBoard','printBoard','colorBoard']
|
||||
let value = {
|
||||
type:str,
|
||||
objectName:data.selectObject.type,
|
||||
}
|
||||
store.dispatch('setModularData',value)
|
||||
}
|
||||
saveProject(str)
|
||||
resolve('')
|
||||
})
|
||||
if(allBoardData.indexOf(str) != -1){
|
||||
await store.dispatch('setAllBoardData',value)
|
||||
}else{
|
||||
let value = {
|
||||
type:str,
|
||||
objectName:data.selectObject.type,
|
||||
}
|
||||
store.dispatch('setModularData',value)
|
||||
}
|
||||
saveProject(str)
|
||||
resolve('')
|
||||
})
|
||||
} else {
|
||||
return
|
||||
}
|
||||
}
|
||||
const saveCanvas = (value:any,str:any)=>{
|
||||
let json = dataDom[data.selectObject.type][str].getCanvasData()
|
||||
@@ -208,14 +217,19 @@ export default defineComponent({
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
&.active{
|
||||
overflow: initial;
|
||||
// overflow: hidden;
|
||||
height: calc(100% - 5rem);
|
||||
// &.active{
|
||||
// overflow: initial;
|
||||
// }
|
||||
> .public{
|
||||
flex: 1;
|
||||
}
|
||||
> .contentBox{
|
||||
position: relative;
|
||||
flex: 1;
|
||||
overflow-x: initial;
|
||||
|
||||
> .content,
|
||||
>.homeContent{
|
||||
width: 100%;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="seriesDesign">
|
||||
<workspace @setProject="workspaceBack" ref="workspace" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType" class="workspace" :isState="selectKey_ =='workspace'" v-show="selectKey_ == 'workspace'"></workspace>
|
||||
<PrintboardUpload ref="printBoard" class="printBoard" :isState="selectKey_ =='printBoard'" v-show="selectKey_ == 'printBoard'"></PrintboardUpload>
|
||||
<patternMaking3D ref="patternMaking3D" class="patternMaking3D" :isState="selectKey_ =='patternMaking3D'" v-show="selectKey_ == 'patternMaking3D'"></patternMaking3D>
|
||||
<!-- <canvasUpload></canvasUpload> -->
|
||||
</div>
|
||||
@@ -15,12 +16,13 @@ import { useI18n } from 'vue-i18n'
|
||||
import patternMaking3D from '../../model/patternMaking3D/index.vue'
|
||||
import canvasUpload from "@/component/Canvas/test.vue";
|
||||
import workspace from '../../workflow/workspace.vue'
|
||||
import PrintboardUpload from '../../model/collection/PrintboardUpload.vue'
|
||||
|
||||
import { gsap, TweenMax } from "gsap";
|
||||
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
||||
export default defineComponent({
|
||||
components:{
|
||||
patternMaking3D,canvasUpload,workspace
|
||||
patternMaking3D,canvasUpload,workspace,PrintboardUpload
|
||||
},
|
||||
props:{
|
||||
selectKey_:{
|
||||
@@ -42,6 +44,7 @@ export default defineComponent({
|
||||
workspaceBack:inject('setBack') as any,
|
||||
})
|
||||
const dataDom:any = reactive({
|
||||
printBoard:null as any,
|
||||
patternMaking3D:null as any,
|
||||
})
|
||||
const open = (str:any)=>{
|
||||
@@ -69,11 +72,11 @@ export default defineComponent({
|
||||
const getCollection = ()=>{
|
||||
let value:any = {
|
||||
"id":data.selectObject.id,
|
||||
"moduleList":["patternMaking3D", ]
|
||||
"moduleList":["patternMaking3D", 'printBoard']
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.getModuleContent,value).then(async (rv)=>{
|
||||
historyChooseData(rv)
|
||||
let allBoardData = ['patternMaking3D']
|
||||
let allBoardData = ['patternMaking3D','printBoard']
|
||||
await setitemData(allBoardData)
|
||||
allBoardData.forEach((item)=>{
|
||||
let value = {
|
||||
@@ -91,8 +94,39 @@ export default defineComponent({
|
||||
})
|
||||
}
|
||||
const historyChooseData = (value:any)=>{
|
||||
let collectionData = {
|
||||
printboardFiles: dealViewChooseData(
|
||||
value.printBoard,"Printboard"
|
||||
),
|
||||
generatePrintFiles: [],
|
||||
};
|
||||
store.commit("setAllBoardDataChoose", collectionData);
|
||||
store.commit('setPatternMaking3D',value.threeDSimpleId)
|
||||
}
|
||||
const dealViewChooseData = (data: any,str:string)=> {
|
||||
if (!data) {
|
||||
return [];
|
||||
}
|
||||
let filesList = data.map((v: any) => {
|
||||
let newData: any = {
|
||||
imgUrl: v.url?v.url:v.designOutfitUrl,
|
||||
id: v.id,
|
||||
status: "done",
|
||||
resData: v,
|
||||
type_:{
|
||||
type1:'material',
|
||||
type2:v.level1Type
|
||||
}
|
||||
};
|
||||
if (v.level1Type === "Printboard") {
|
||||
newData.pin = v.isPin;
|
||||
newData.level2Type = v.level2Type;
|
||||
newData.categoryValue = v.level2Type;
|
||||
}
|
||||
return newData;
|
||||
});
|
||||
return filesList;
|
||||
}
|
||||
onMounted(()=>{
|
||||
nextTick(()=>{
|
||||
getCollection()
|
||||
|
||||
@@ -15,8 +15,14 @@
|
||||
<div class="content">
|
||||
<div class="back">
|
||||
<div class="title">
|
||||
<i :class="[navListData?.find((item:any) => item.value === selectKey_)?.icon]"></i>
|
||||
{{ navListData?.find((item:any) => item.value === selectKey_)?.name }}
|
||||
<div v-show="navListData?.find((item:any) => item.value === selectKey_)?.name">
|
||||
<i :class="[navListData?.find((item:any) => item.value === selectKey_)?.icon]"></i>
|
||||
{{ navListData?.find((item:any) => item.value === selectKey_)?.name }}
|
||||
</div>
|
||||
<div v-show="!navListData?.find((item:any) => item.value === selectKey_)?.name ">
|
||||
<i class="fi fi-rr-cloud-upload-alt"></i>
|
||||
All files
|
||||
</div>
|
||||
</div>
|
||||
<div class="text" @click="setBack()"><i class="fi fi-bs-down-left-and-up-right-to-center"></i></div>
|
||||
</div>
|
||||
@@ -25,7 +31,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!isUpdataPorject && !selectObject.id" class="workflow">
|
||||
<workspace :workflowType="workflowType" @setProject="setProject" :httpWorkflowType="httpWorkflowType"></workspace>
|
||||
<workspace :firstTime="true" :workflowType="workflowType" @setProject="setProject" :httpWorkflowType="httpWorkflowType"></workspace>
|
||||
</div>
|
||||
<div class="mark_loading" v-show="isShowMark">
|
||||
<a-spin size="large" />
|
||||
@@ -211,8 +217,8 @@ export default defineComponent({
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
> *{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
}
|
||||
> .back{
|
||||
width: auto;
|
||||
@@ -224,16 +230,20 @@ export default defineComponent({
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
> i{
|
||||
font-size: 2rem;
|
||||
> div{
|
||||
display: flex;
|
||||
margin-right: 1rem;
|
||||
align-items: center;
|
||||
i{
|
||||
font-size: 2rem;
|
||||
display: flex;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
> .text{
|
||||
cursor: pointer;
|
||||
margin-left: auto;
|
||||
> i{
|
||||
i{
|
||||
font-size: 3rem;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
<i :class="item.icon"></i>
|
||||
<span v-show="isUnfold">{{ item.name }}</span>
|
||||
</div>
|
||||
<div class="navList list exist" @click="setNav('yun', $event)">
|
||||
<i class="fi fi-rr-cloud-upload-alt"></i>
|
||||
<span v-show="isUnfold">云生成</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div class="workspace">
|
||||
<div class="workspaceBox">
|
||||
<div class="title marginBottom">Porject setting </div>
|
||||
<div class="title marginBottom" style=" display:flex;align-items: center;">
|
||||
<i v-if="firstTime" @click="setBack" style="font-size:3rem; display:flex; cursor: pointer;margin-right:2rem" class="fi fi-rr-arrow-small-left"></i>
|
||||
Porject setting
|
||||
</div>
|
||||
<div class="projectName marginBottom" v-if="show.title">
|
||||
<div class="text">Project name: <span style="color: red;">*</span></div>
|
||||
<div class="input">
|
||||
@@ -9,7 +12,7 @@
|
||||
<!-- <i class="fi fi-rr-edit"></i> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="gender marginBottom" v-if="show.style">
|
||||
<div class="gender marginBottom" v-if="show.age">
|
||||
<div class="text">Age</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
@@ -92,7 +95,11 @@ export default defineComponent({
|
||||
httpWorkflowType:{
|
||||
type:String,
|
||||
default:''
|
||||
}
|
||||
},
|
||||
firstTime:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
},
|
||||
emits:['setProject'],
|
||||
setup(props,{emit}) {
|
||||
@@ -108,6 +115,7 @@ export default defineComponent({
|
||||
title:true,
|
||||
gender:false,
|
||||
style:false,
|
||||
age:false,
|
||||
systemDesigner:false,
|
||||
position:false,
|
||||
},
|
||||
@@ -192,11 +200,20 @@ export default defineComponent({
|
||||
}
|
||||
const openSetData = ()=>{
|
||||
|
||||
}
|
||||
const setBack = ()=>{
|
||||
let data = {
|
||||
type:'',
|
||||
httpType:'',//项目类型
|
||||
}
|
||||
store.commit('setProbject',data)
|
||||
store.commit('setProjectList',[])
|
||||
}
|
||||
onMounted(()=>{
|
||||
data.selectObject = JSON.parse(JSON.stringify(data.selectObject_))
|
||||
data.show.gender = (props.workflowType == 'seriesDesign' || props.workflowType == 'singleProductDesign' || props.workflowType == 'printingDesign3D')
|
||||
data.show.style = (props.workflowType == 'seriesDesign' || props.workflowType == 'singleProductDesign')
|
||||
data.show.age = (props.workflowType == 'seriesDesign' || props.workflowType == 'singleProductDesign' || props.workflowType == 'sketchDesign')
|
||||
data.show.systemDesigner = (props.workflowType == 'seriesDesign' || props.workflowType == 'singleProductDesign')
|
||||
data.show.position = (props.workflowType == 'singleProductDesign')
|
||||
|
||||
@@ -237,6 +254,7 @@ export default defineComponent({
|
||||
formatter,
|
||||
complete,
|
||||
openSetData,
|
||||
setBack,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -47,6 +47,18 @@
|
||||
{{ $t('Renew.Yearly') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="type promotion">
|
||||
<div class="text">{{ $t('Renew.promotionCode') }}:</div>
|
||||
<div class="succeed" v-show="promotionData.error == 'true'">
|
||||
{{promotionData.code}}
|
||||
<i class="fi fi-sr-times-hexagon" @click="clearPromotionCode"></i>
|
||||
</div>
|
||||
<div class="input" v-show="!promotionData.error || promotionData.error == 'false'">
|
||||
<input type="text" v-model="promotionData.code">
|
||||
<div style="cursor: pointer;" @click="examine">{{ $t('Renew.use') }}</div>
|
||||
</div>
|
||||
<div class="error" v-show="promotionData.error == 'false'">{{promotionData.str}}</div>
|
||||
</div>
|
||||
<div class="type payment">
|
||||
<div class="text">{{ $t('Renew.Payment') }}:</div>
|
||||
<label>
|
||||
@@ -134,6 +146,12 @@ export default defineComponent({
|
||||
isShowMark_:false,
|
||||
})
|
||||
let renewData = reactive({
|
||||
promotionData:{
|
||||
code:'',
|
||||
error:'',
|
||||
str:'',
|
||||
oldPrice:'',
|
||||
},
|
||||
personage:computed(()=>{
|
||||
return {
|
||||
title:t('Renew.PersonalVersion'),
|
||||
@@ -233,6 +251,7 @@ export default defineComponent({
|
||||
returnUrl:url,
|
||||
subscribeType:subscribeType,//yearly为年费,monthly为月费
|
||||
wallet:'ALIPAYHK',
|
||||
promotionCode:renewData.promotionData.code,
|
||||
}
|
||||
let httpsUrl = Https.httpUrls.payStripe
|
||||
payMethodData.isShowMark_ = true
|
||||
@@ -269,6 +288,38 @@ export default defineComponent({
|
||||
renew.renewModel = false
|
||||
setPaidBack()
|
||||
}
|
||||
const examine = ()=>{
|
||||
// renewData.promotionData.error
|
||||
let price = renewData.current?.price[renewData.current?.type]
|
||||
const normalNumber = Number(price.replace(/,/g, ''));
|
||||
if(!renewData.promotionData.code){
|
||||
return
|
||||
}
|
||||
let data = {
|
||||
promotionCode:renewData.promotionData.code,
|
||||
price:normalNumber,
|
||||
}
|
||||
Https.axiosGet(Https.httpUrls.checkCoupon,{params:data}).then((rv:any)=>{
|
||||
if(rv){
|
||||
if(rv.status == "valid"){
|
||||
renewData.promotionData.error = 'true'
|
||||
renewData.promotionData.oldPrice = renewData.current?.price[renewData.current?.type]
|
||||
renewData.current.price[renewData.current.type] = (Number(rv.discountedPrice)).toLocaleString()
|
||||
|
||||
}else{
|
||||
renewData.promotionData.error = 'false'
|
||||
renewData.promotionData.str = rv.message
|
||||
}
|
||||
}else{
|
||||
}
|
||||
})
|
||||
}
|
||||
const clearPromotionCode = ()=>{
|
||||
renewData.promotionData.error = '';
|
||||
renewData.promotionData.code = ''
|
||||
renewData.current.price[renewData.current.type] = renewData.promotionData.oldPrice
|
||||
renewData.promotionData.oldPrice = ''
|
||||
}
|
||||
return{
|
||||
store,
|
||||
...toRefs(renew),
|
||||
@@ -281,6 +332,8 @@ export default defineComponent({
|
||||
payment,
|
||||
setPaidBack,
|
||||
completePayment,
|
||||
examine,
|
||||
clearPromotionCode,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -334,6 +387,41 @@ export default defineComponent({
|
||||
}
|
||||
.type{
|
||||
display: flex;
|
||||
&.promotion{
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
> .succeed{
|
||||
padding: 1rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 1rem;
|
||||
background: #eee;
|
||||
> i{
|
||||
display: flex;
|
||||
margin-left: 1rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
> .input{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 2rem;
|
||||
border: 2px solid #000;
|
||||
overflow: hidden;
|
||||
padding: 0 1rem;
|
||||
input{
|
||||
border: none;
|
||||
height: 3rem;
|
||||
}
|
||||
}
|
||||
> .error{
|
||||
color: red;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
> .text{
|
||||
margin-right: 2rem;
|
||||
// font-weight: 600;
|
||||
|
||||
@@ -64,12 +64,23 @@
|
||||
<div style="margin-left:2rem;" @click="deleteBatchPic" class="gallery_btn">Delete</div>
|
||||
</div>
|
||||
<div class="imgBox">
|
||||
<div class="imgItem" v-for="item,index in imgList" :key="item.id" :class="{active:selectImgList.indexOf(item.id) > -1}" @click="selectImg(item)">
|
||||
<Falls ref="fall" @loadend="isShowMark = false" :itemWidth="200" :isScroll="false" :isText="false"></Falls>
|
||||
<div class="page_loading_box" v-show="!isNoData" style="text-align: center;width: 100%;">
|
||||
<span class="page_loading" ref="loadingDom" v-show="!isShowMark"></span>
|
||||
<span v-show="isShowMark">
|
||||
<a-spin size="large" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="imgNull" v-show="isNoData && isNull">
|
||||
<img src="@/assets/images/homePage/null_img.png">
|
||||
</div>
|
||||
|
||||
<!-- <div class="imgItem" v-for="item,index in imgList" :key="item.id" :class="{active:selectImgList.indexOf(item.id) > -1}" @click="selectImg(item)">
|
||||
<img :src="item.url" alt="">
|
||||
<i class="fi fi-rr-trash icon_delete" @click="deleteSinglePic(item,index)"></i>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="total">
|
||||
<!-- <div class="total">
|
||||
<a-pagination
|
||||
v-model:current="currentPage"
|
||||
v-model:pageSize="pageSize"
|
||||
@@ -78,11 +89,11 @@
|
||||
:showSizeChanger="false"
|
||||
@change="changePage"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="mark_loading" v-show="isShowMark">
|
||||
<!-- <div class="mark_loading" v-show="isShowMark">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
</div> -->
|
||||
<Cropper ref="Cropper" @handleCropperSuccess="handleCropperSuccess" :cropperFileData="cropperFileData" :isRound="true"></Cropper>
|
||||
<!-- <loadBrandDNA ref="loadBrandDNA"></loadBrandDNA> -->
|
||||
</div>
|
||||
@@ -97,10 +108,12 @@ import { useI18n } from 'vue-i18n'
|
||||
import Cropper from '@/component/HomePage/Cropper.vue'
|
||||
// import loadBrandDNA from '@/component/LibraryPage/loadBrandDNA.vue'
|
||||
import { getCookie } from "@/tool/cookie";
|
||||
import Falls from "@/component/WorksPage/Falls.vue";
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
components:{
|
||||
Cropper
|
||||
Cropper,Falls
|
||||
},
|
||||
|
||||
emits:['update:isShowMark','handleBack'],
|
||||
@@ -135,14 +148,17 @@ export default defineComponent({
|
||||
schedule:{
|
||||
num:0,
|
||||
state:false
|
||||
}
|
||||
},
|
||||
isNoData:false,//如果数据为空就不加载
|
||||
isNull:true,
|
||||
})
|
||||
const dataDom = reactive({
|
||||
Cropper:null as any,
|
||||
fall:null as any,
|
||||
loadBrandDNA:null as any,
|
||||
loadingDom:null as any,
|
||||
})
|
||||
const customRequest = (event:any)=>{
|
||||
console.log(data.detail)
|
||||
let new_data = {
|
||||
file:event.file,
|
||||
brandId:data.detail.id,
|
||||
@@ -150,11 +166,13 @@ export default defineComponent({
|
||||
data.isShowMark = true
|
||||
Https.axiosPost(Https.httpUrls.brandDNAUpload, new_data,{headers:{'Content-Type': 'multipart/form-data'}}).then(
|
||||
(rv: any) => {
|
||||
getLibraryList()
|
||||
// getLibraryList()
|
||||
rv.canvasUrl = rv.minIOPath
|
||||
dataDom.fall.push([rv]);
|
||||
data.isShowMark = false
|
||||
}
|
||||
).catch((res)=>{
|
||||
getLibraryList()
|
||||
// getLibraryList()
|
||||
data.isShowMark = false
|
||||
});
|
||||
}
|
||||
@@ -187,16 +205,39 @@ export default defineComponent({
|
||||
brandId:data.detail.id,
|
||||
// intersection:intersection.value,
|
||||
}
|
||||
if(data.isShowMark && !data.isNoData)return
|
||||
data.isShowMark = true
|
||||
Https.axiosPost(Https.httpUrls.queryLibraryPage,value).then(
|
||||
(rv: any) => {
|
||||
data.imgList = rv.content
|
||||
data.total = rv.total
|
||||
data.isShowMark = false
|
||||
Https.axiosPost(Https.httpUrls.queryLibraryPage,value)
|
||||
.then((rv) => {
|
||||
if(value.page == 1 && rv.content.length == 0){
|
||||
data.isNull = true
|
||||
}else{
|
||||
data.isNull = false
|
||||
}
|
||||
).catch((res)=>{
|
||||
if (rv.content.length > 0) {
|
||||
data.isNull = false
|
||||
dataDom.fall.push(rv.content);
|
||||
} else {
|
||||
data.isNoData = true
|
||||
}
|
||||
// filter.worksList = rv.content
|
||||
})
|
||||
.catch((rv) => {
|
||||
data.isShowMark = false
|
||||
if(data.currentPage == 1){
|
||||
data.isNull = true
|
||||
}
|
||||
data.isNoData = true
|
||||
});
|
||||
// .then(
|
||||
// (rv: any) => {
|
||||
// data.imgList = rv.content
|
||||
// data.total = rv.total
|
||||
// data.isShowMark = false
|
||||
// }
|
||||
// ).catch((res)=>{
|
||||
// data.isShowMark = false
|
||||
// });
|
||||
}
|
||||
let beforeUpload=(file:any,fileList:any)=>{
|
||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/bmp';
|
||||
@@ -245,11 +286,22 @@ export default defineComponent({
|
||||
data.minioUrl = value.brandLogo
|
||||
clearInterval(data.getProgressTime)
|
||||
getProgress()
|
||||
getLibraryList()
|
||||
// emit("update:isShowMark",true)
|
||||
// setTimeout(()=>{
|
||||
// emit("update:isShowMark",false)
|
||||
// },2000)
|
||||
// getLibraryList()
|
||||
data.isNoData = false
|
||||
data.currentPage = 0
|
||||
dataDom.fall.clearData()
|
||||
dataDom.fall.list = []
|
||||
dataDom.fall.wait_list = []
|
||||
new IntersectionObserver(
|
||||
(entries, observer) => {
|
||||
// 如果不是相交,则直接返回
|
||||
// console.log(entries[0]);
|
||||
if (!entries[0].intersectionRatio) return;
|
||||
data.currentPage+=1
|
||||
getLibraryList()
|
||||
},
|
||||
// { root:worksPage }
|
||||
).observe(dataDom.loadingDom);
|
||||
}
|
||||
const back = ()=>{
|
||||
clearInterval(data.getProgressTime)
|
||||
@@ -369,6 +421,9 @@ export default defineComponent({
|
||||
deleteSinglePic,
|
||||
selectImg,
|
||||
}
|
||||
},
|
||||
directives:{
|
||||
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
@@ -481,6 +536,14 @@ export default defineComponent({
|
||||
display: flex;
|
||||
align-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
overflow-y: auto;
|
||||
> .imgNull{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
> .imgItem{
|
||||
width: 100px;
|
||||
margin: 1rem;
|
||||
|
||||
@@ -156,6 +156,7 @@ export default defineComponent({
|
||||
httpsUrl = Https.httpUrls.payPaypal
|
||||
}else if (payMethodData.modeOfPayment == 'stripe') {
|
||||
httpsUrl = Https.httpUrls.payStripe
|
||||
// data.
|
||||
}else{
|
||||
httpsUrl = Https.httpUrls.payAlipayHK
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 文字 -->
|
||||
<div class="falls_item_bottom">
|
||||
<div class="falls_item_bottom" v-if="isText">
|
||||
<div class="falls_item_text" :title="item.text">
|
||||
{{item.text}}
|
||||
</div>
|
||||
@@ -58,7 +58,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -72,6 +71,14 @@ export default defineComponent({
|
||||
type:Boolean,
|
||||
default:true,
|
||||
},
|
||||
isText:{
|
||||
type:Boolean,
|
||||
default:true,
|
||||
},
|
||||
itemWidth:{
|
||||
type:Number,
|
||||
default:300,
|
||||
}
|
||||
},
|
||||
setup(){
|
||||
let list = ref([])
|
||||
@@ -139,7 +146,9 @@ export default defineComponent({
|
||||
const textMarginTop = domCss.getPropertyValue('--textMarginTop').split('px')[0]*1;
|
||||
const textHeight = domCss.getPropertyValue('--textHeight').split('px')[0]*1;
|
||||
const contentHeight = domCss.getPropertyValue('--contentHeight').split('px')[0]*1;
|
||||
this.computedHeight = paddingBottom + textMarginTop + textHeight + contentHeight;
|
||||
if(this.$props.isText){
|
||||
this.computedHeight = paddingBottom + textMarginTop + textHeight + contentHeight;
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
this.wait_list = []
|
||||
@@ -149,7 +158,7 @@ export default defineComponent({
|
||||
methods: {
|
||||
clearData(){
|
||||
this.wait_list = []
|
||||
this.width = 300
|
||||
this.width = this.itemWidth
|
||||
this.num_x = 1
|
||||
this.gap_x = 0
|
||||
this.gap_y = 0
|
||||
@@ -185,12 +194,12 @@ export default defineComponent({
|
||||
return;
|
||||
}
|
||||
|
||||
let url = this.wait_list[0].canvasUrl;
|
||||
let url = this.wait_list[0].canvasUrl || this.wait_list[0].url;
|
||||
let data = this.wait_list[0]
|
||||
this.imgDom = document.createElement("img");
|
||||
this.imgDom.src = url;
|
||||
this.imgDom.style.width = this.width + "px";
|
||||
this.imgDom.style.maxHeight = this.width+330 + "px";
|
||||
this.imgDom.style.width = this.itemWidth + "px";
|
||||
this.imgDom.style.maxHeight = this.itemWidth+330 + "px";
|
||||
this.imgDom.style.position = "absolute";
|
||||
this.imgDom.style.top = "-99999px";
|
||||
document.body.appendChild(this.imgDom);
|
||||
@@ -204,6 +213,7 @@ export default defineComponent({
|
||||
pos_num = this.poss[i];
|
||||
}
|
||||
}
|
||||
// this.computedHeight = 0
|
||||
let width = this.imgDom.offsetWidth;
|
||||
let height = this.imgDom.offsetHeight+this.computedHeight;
|
||||
let top = this.poss[idx] + this.gap_y;
|
||||
@@ -230,19 +240,22 @@ export default defineComponent({
|
||||
});
|
||||
},
|
||||
resize() {
|
||||
var t_width = this.$el.offsetWidth;
|
||||
var width = this.width;
|
||||
var num_x = parseInt(t_width / (width + 20));
|
||||
if (num_x < 1) num_x = 1;
|
||||
var remain = t_width - width * num_x;
|
||||
var gap_x = remain / (num_x + 1);
|
||||
this.gap_x = gap_x;
|
||||
this.gap_y = gap_x > 30 ? 30 : gap_x < 30 ? 20 : gap_x;
|
||||
this.num_x = num_x;
|
||||
var poss = [];
|
||||
for (var i = 0; i < num_x; i++) poss.push(0);
|
||||
this.poss = poss;
|
||||
this.reset();
|
||||
nextTick(() => {
|
||||
var t_width = this.$el.offsetWidth;
|
||||
var width = this.itemWidth;
|
||||
var num_x = parseInt(t_width / (width + 20));
|
||||
if (num_x < 1) num_x = 1;
|
||||
var remain = t_width - width * num_x;
|
||||
var gap_x = remain / (num_x + 1);
|
||||
this.gap_x = gap_x;
|
||||
this.gap_y = gap_x > 30 ? 30 : gap_x < 30 ? 20 : gap_x;
|
||||
this.num_x = num_x;
|
||||
var poss = [];
|
||||
for (var i = 0; i < num_x; i++) poss.push(0);
|
||||
this.poss = poss;
|
||||
this.reset();
|
||||
})
|
||||
|
||||
},
|
||||
reset() {
|
||||
for (let i = 0; i < this.list.length; i++) {
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<img v-for="item in scaleImageData?.designPythonOutfitList" v-lazy="item.designUrl">
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="userDetail.systemUser == 1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" >{{$t('newScaleImage.SecondaryCreation')}}</div>
|
||||
<div v-if="userDetail.systemList.indexOf(1) > -1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" >{{$t('newScaleImage.SecondaryCreation')}}</div>
|
||||
<!-- <div v-if="systemUser.value == 1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" :title="systemUser.value != 1?$t('newScaleImage.jsContent1'): scaleImageData.openSource == 0?$t('newScaleImage.jsContent2'):''" :class="{active:systemUser.value != 1?true:scaleImageData.openSource == 0}">{{$t('newScaleImage.SecondaryCreation')}}</div> -->
|
||||
</div>
|
||||
<div v-else class="newScaleImage_right_content_generate">
|
||||
@@ -408,7 +408,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
let setChoose = () =>{
|
||||
if(userDetail.value.systemUser !== 1){
|
||||
if(userDetail.value.systemList.indexOf(1) == -1){
|
||||
return message.info(t('newScaleImage.jsContent1'))
|
||||
}
|
||||
if(imgData.scaleImageData.openSource == 0){
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<a-spin v-else size="large" class="content_img_flex"></a-spin>
|
||||
<div class="btn">
|
||||
<div class="like" v-if="item.url" @click.stop="()=>$emit('setBtn',item.id,'like')">
|
||||
<i class="fi fi-rr-heart"></i>
|
||||
<i :class="['fi',isLike?'fi-sr-heart srLike':'fi-rr-heart']"></i>
|
||||
</div>
|
||||
<div class="down" v-if="isVideo && item.url" @click.stop="down(item)">
|
||||
<i class="fi fi-ss-down-to-line"></i>
|
||||
@@ -49,6 +49,7 @@ export default defineComponent({
|
||||
list:{type:Array,default:()=>[]},
|
||||
isVideo:{type:Boolean,default:false},
|
||||
showMark:{type:Boolean,default:false},
|
||||
isLike:{type:Boolean,default:false},
|
||||
},
|
||||
emits:['setBtn','setSort'],
|
||||
setup(props,{emit}) {
|
||||
@@ -351,6 +352,9 @@ export default defineComponent({
|
||||
i{
|
||||
display: flex;
|
||||
font-size: 3rem;
|
||||
&.srLike{
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:hover{
|
||||
|
||||
@@ -692,6 +692,9 @@ export default {
|
||||
Renew:{
|
||||
title:'根据您的需求选择最佳计划',
|
||||
Monthly:'月付',
|
||||
promotionCode:'优惠码',
|
||||
use:'应用',
|
||||
PromoCodeError:'请检查优惠码是否正确或者是否过期',
|
||||
Yearly:'年付',
|
||||
CreditCard:'信用卡',
|
||||
Alipay:'支付宝',
|
||||
|
||||
@@ -692,6 +692,9 @@ export default {
|
||||
title:'Select The Best Plan For Your Needs',
|
||||
Monthly:'Monthly',
|
||||
Yearly:'Yearly',
|
||||
promotionCode:'Promotion code',
|
||||
use:'Use',
|
||||
PromoCodeError:'Please check if the promo code is correct or if the date has expired',
|
||||
CreditCard:'Credit Card',
|
||||
Alipay:'Alipay',
|
||||
Payment:'Payment method',
|
||||
|
||||
@@ -22,6 +22,16 @@ const routes: Array<RouteRecordRaw> = [
|
||||
name: 'login',
|
||||
meta:{enter:'all',},
|
||||
component: _import('LoginPage')
|
||||
},{
|
||||
path: '/schoolLogin',
|
||||
name: 'schoolLogin',
|
||||
meta:{enter:'all',},
|
||||
component: _import('LoginPageSchool')
|
||||
},{
|
||||
path: '/enterpriseLogin',
|
||||
name: 'enterpriseLogin',
|
||||
meta:{enter:'all',},
|
||||
component: _import('LoginPageEnterprise')
|
||||
},
|
||||
{
|
||||
path: '/test',
|
||||
@@ -183,18 +193,19 @@ const routes: Array<RouteRecordRaw> = [
|
||||
meta:{enter:3,},
|
||||
component: _import('Administrator'),
|
||||
children:[
|
||||
{
|
||||
path: "",
|
||||
name:'adminChil',
|
||||
meta:{enter:3,},
|
||||
redirect: "/administrator/allUser"
|
||||
},
|
||||
|
||||
{
|
||||
path:'allUser',
|
||||
name:'allUser',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/allUser.vue'),
|
||||
},
|
||||
{
|
||||
path:'coupons',
|
||||
name:'coupons',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/coupons/index.vue'),
|
||||
},
|
||||
{
|
||||
path:'testClickData',
|
||||
name:'testClickData',
|
||||
@@ -262,6 +273,36 @@ const routes: Array<RouteRecordRaw> = [
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/Transaction/TransactionTable.vue'),
|
||||
},
|
||||
//企业版教育管理员页面
|
||||
{
|
||||
path:'allUserSE',
|
||||
name:'allUserSE',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/SE/allUser/index.vue'),
|
||||
},
|
||||
{
|
||||
path:'testClickDataSE',
|
||||
name:'testClickDataSE',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/SE/designDetailList/index.vue'),
|
||||
},
|
||||
{
|
||||
path:'generateFrequencySE',
|
||||
name:'generateFrequencySE',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/SE/getGenerateFrequency/index.vue'),
|
||||
},
|
||||
// {
|
||||
// path:'allUserSE',
|
||||
// name:'allUserSE',
|
||||
// meta:{enter:3,},
|
||||
// component: _import_component('Administrator/SE/allUser.vue'),
|
||||
// },{
|
||||
// path:'allUserSE',
|
||||
// name:'allUserSE',
|
||||
// meta:{enter:3,},
|
||||
// component: _import_component('Administrator/SE/allUser.vue'),
|
||||
// },
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ interface DesignDetail{
|
||||
allUserList:any,
|
||||
city:any,
|
||||
country:any,
|
||||
allGenerateType:any,
|
||||
}
|
||||
|
||||
const adminPage : Module<DesignDetail,RootState> = {
|
||||
@@ -12,6 +13,7 @@ const adminPage : Module<DesignDetail,RootState> = {
|
||||
allUserList:[],
|
||||
city:[],
|
||||
country:[],
|
||||
allGenerateType:[],
|
||||
},
|
||||
mutations:{
|
||||
setAllUserList(state,files){
|
||||
@@ -32,6 +34,14 @@ const adminPage : Module<DesignDetail,RootState> = {
|
||||
value:item,
|
||||
})
|
||||
})
|
||||
},
|
||||
setAllGenerateType(state,files){
|
||||
files.forEach((item:any) => {
|
||||
state.allGenerateType.push({
|
||||
label:item,
|
||||
value:item,
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
actions:{
|
||||
|
||||
@@ -259,9 +259,12 @@ const userHabit : Module<UserHabit,RootState> = {
|
||||
state.userDetail.systemList = []
|
||||
if(data.systemUser != 0)state.userDetail.systemList.push(1)
|
||||
if(data.affiliate)state.userDetail.systemList.push(2)
|
||||
|
||||
let adminIdList = [88,6,46,31,73,83,87,4,11482,11630,12201,12592]
|
||||
// if(data.email == '' || data.email)state.userDetail.systemList.push(3)
|
||||
if(adminIdList.indexOf(data.userId) > -1)state.userDetail.systemList.push(3)
|
||||
if(adminIdList.indexOf(data.userId) > -1 || data.systemUser == 6 || data.systemUser == 7){
|
||||
state.userDetail.systemList.push(3)
|
||||
}
|
||||
|
||||
state.userDetail.followeeCount = data.followeeCount//粉丝数量
|
||||
state.userDetail.followerCount = data.followerCount//关注数量
|
||||
|
||||
202
src/tool/adminRouter.js
Normal file
202
src/tool/adminRouter.js
Normal file
@@ -0,0 +1,202 @@
|
||||
const adminRouter = {
|
||||
all:[{
|
||||
name:'All User',
|
||||
route:'/administrator/allUser',
|
||||
icon:'yonghu',
|
||||
expandIcon:'icon-xiala',
|
||||
key:'sub1',
|
||||
isShow:true,
|
||||
// children: [
|
||||
// {
|
||||
// name:'User Management',
|
||||
// route:'/home/excil1',
|
||||
// icon:'',
|
||||
// key:'/home/excil22',
|
||||
// isShow:true,
|
||||
// },
|
||||
// {
|
||||
// code:'ROLE_MANAGER',
|
||||
// name:'Access Permission',
|
||||
// route:'/home/excil2',
|
||||
// icon:'',
|
||||
// key:'/home/excil33',
|
||||
// isShow:true,
|
||||
// },
|
||||
// ],
|
||||
},{
|
||||
name:'Design Frequency',
|
||||
route:'/administrator/testClickData',
|
||||
icon:'shenpi',
|
||||
expandIcon:'icon-xiala',
|
||||
key:'sub2',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Trial User',
|
||||
icon:'usetime',
|
||||
expandIcon:'icon-xiala',
|
||||
key:'sub3',
|
||||
isShow:true,
|
||||
children:[
|
||||
{
|
||||
name:'All Trial User',
|
||||
route:'/administrator/trialAllUser',
|
||||
icon:'usetime',
|
||||
key:'sub3-1',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Trial User Approval',
|
||||
route:'/administrator/trialApproval',
|
||||
icon:'usetime',
|
||||
key:'sub3-2',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Trial User CHART',
|
||||
route:'/administrator/trialUserCountry',
|
||||
icon:'',
|
||||
key:'sub3-3',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Conversion Rate',
|
||||
route:'/administrator/trialUserConversionRateChart',
|
||||
icon:'',
|
||||
key:'sub3-4',
|
||||
isShow:true,
|
||||
},
|
||||
]
|
||||
},{
|
||||
name:'Function Use CHART',
|
||||
route:'/administrator/recentActiveChart',
|
||||
icon:'usetime',
|
||||
key:'sub4',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Active User',
|
||||
icon:'usetime',
|
||||
route:'/administrator/recentActiveUser',
|
||||
key:'sub5',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'New User',
|
||||
icon:'usetime',
|
||||
expandIcon:'icon-xiala',
|
||||
key:'sub6',
|
||||
isShow:true,
|
||||
children:[
|
||||
{
|
||||
name:'New User List',
|
||||
route:'/administrator/recentNewUser',
|
||||
icon:'',
|
||||
key:'sub6-1',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'New User CHART',
|
||||
route:'/administrator/recentNewUserChart',
|
||||
icon:'',
|
||||
key:'sub6-2',
|
||||
isShow:true,
|
||||
},
|
||||
]
|
||||
},{
|
||||
name:'Events',
|
||||
icon:'usetime',
|
||||
key:'sub9',
|
||||
expandIcon:'icon-xiala',
|
||||
isShow:true,
|
||||
children: [
|
||||
{
|
||||
name:'Questionnaire Survey',
|
||||
route:'/administrator/questionnaire',
|
||||
icon:'',
|
||||
key:'sub9-1',
|
||||
isShow:true,
|
||||
},
|
||||
// {
|
||||
// code:'ROLE_MANAGER',
|
||||
// name:'Access Permission',
|
||||
// route:'/home/excil2',
|
||||
// icon:'',
|
||||
// key:'/home/excil33',
|
||||
// isShow:true,
|
||||
// },
|
||||
],
|
||||
},{
|
||||
name:'Approval Affiliate',
|
||||
icon:'usetime',
|
||||
route:'/administrator/affiliateAudit',
|
||||
key:'sub10',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Transaction',
|
||||
icon:'usetime',
|
||||
expandIcon:'icon-xiala',
|
||||
key:'sub11',
|
||||
isShow:true,
|
||||
children: [
|
||||
{
|
||||
name:'Transaction Record',
|
||||
route:'/administrator/TransactionTable',
|
||||
icon:'',
|
||||
key:'sub11-1',
|
||||
isShow:true,
|
||||
},
|
||||
// {
|
||||
// code:'ROLE_MANAGER',
|
||||
// name:'Access Permission',
|
||||
// route:'/home/excil2',
|
||||
// icon:'',
|
||||
// key:'/home/excil33',
|
||||
// isShow:true,
|
||||
// },
|
||||
],
|
||||
},{
|
||||
name:'Promotion Code',
|
||||
icon:'usetime',
|
||||
route:'/administrator/coupons',
|
||||
key:'sub12',
|
||||
isShow:true,
|
||||
}],
|
||||
schoolOrEnterprise:[
|
||||
{
|
||||
name:'All User',
|
||||
route:'/administrator/allUserSE',
|
||||
icon:'usetime',
|
||||
key:'sub1',
|
||||
isShow:true,
|
||||
},
|
||||
{
|
||||
name:'Design Frequency',
|
||||
route:'/administrator/testClickDataSE',
|
||||
icon:'usetime',
|
||||
key:'sub2',
|
||||
isShow:true,
|
||||
},
|
||||
{
|
||||
name:'Credits Detail',
|
||||
route:'/administrator/generateFrequencySE',
|
||||
icon:'usetime',
|
||||
key:'sub3',
|
||||
isShow:true,
|
||||
}
|
||||
// ,{
|
||||
// name:'Coupons',
|
||||
// icon:'usetime',
|
||||
// route:'/administrator/coupons',
|
||||
// key:'sub12',
|
||||
// isShow:true,
|
||||
// },
|
||||
// {
|
||||
// name:'Design Frequency',
|
||||
// icon:'usetime',
|
||||
// route:'/administrator/designFrequency',
|
||||
// key:'sub5',
|
||||
// isShow:true,
|
||||
// },{
|
||||
// name:'Generate Frequency',
|
||||
// icon:'usetime',
|
||||
// route:'/administrator/generateFrequency',
|
||||
// key:'sub5',
|
||||
// isShow:true,
|
||||
// }
|
||||
]
|
||||
}
|
||||
export {adminRouter}
|
||||
@@ -233,7 +233,6 @@ class MyCanvas {
|
||||
async canvasInit (dom, val,img,editGroupImg,data,exportWidth = -1){//初始化
|
||||
// let {erasable} = data
|
||||
// this.canvasClear()
|
||||
console.log(exportWidth)
|
||||
this.exportData.width = exportWidth
|
||||
this.canvasWH={
|
||||
width:val.width,
|
||||
@@ -1033,28 +1032,28 @@ class MyCanvas {
|
||||
cloned._objects = cloned._objects.filter(item => item.type == 'image')
|
||||
}
|
||||
if(this.exportData.width != -1){
|
||||
if (cloned.type !== 'image') {
|
||||
if (cloned.type !== 'image' || cloned.type !== 'group') {
|
||||
cloned.set({
|
||||
left: scaleXY?.scale?cloned.left * scaleXY?.scale:cloned.left - xy.x,
|
||||
top: scaleXY?.scale?cloned.top * scaleXY?.scale:cloned.top - xy.y,
|
||||
scaleX: cloned.scaleX * scaleXY?.scale?scaleXY?.scale:1,
|
||||
scaleY: cloned.scaleY * scaleXY?.scale?scaleXY?.scale:1
|
||||
scaleX: cloned.scaleX * (scaleXY?.scale?scaleXY?.scale:1),
|
||||
scaleY: cloned.scaleY * (scaleXY?.scale?scaleXY?.scale:1)
|
||||
});
|
||||
} else {
|
||||
// 对图片对象单独处理:重新计算图片的缩放
|
||||
cloned.set({
|
||||
left: scaleXY?.scale?cloned.left * scaleXY?.scale:cloned.left - xy.x,
|
||||
top: scaleXY?.scale?cloned.top * scaleXY?.scale:cloned.top - xy.y,
|
||||
scaleX: cloned.scaleX * scaleXY?.scale?scaleXY?.scale:1, // 根据原有 scaleX 进行缩放
|
||||
scaleY: cloned.scaleY * scaleXY?.scale?scaleXY?.scale:1 // 根据原有 scaleY 进行缩放
|
||||
scaleX: cloned.scaleX * (scaleXY?.scale?scaleXY?.scale:1), // 根据原有 scaleX 进行缩放
|
||||
scaleY: cloned.scaleY * (scaleXY?.scale?scaleXY?.scale:1) // 根据原有 scaleY 进行缩放
|
||||
});
|
||||
|
||||
// 确保图片的尺寸缩放是基于原始宽高和当前缩放
|
||||
var originalWidth = cloned.width * cloned.scaleX; // 原始宽度 * 当前缩放
|
||||
var originalHeight = cloned.height * cloned.scaleY; // 原始高度 * 当前缩放
|
||||
cloned.set({
|
||||
width: originalWidth * scaleXY?.scale?scaleXY?.scale:1, // 调整后的宽度
|
||||
height: originalHeight * scaleXY?.scale?scaleXY?.scale:1 // 调整后的高度
|
||||
width: originalWidth * (scaleXY?.scale?scaleXY?.scale:1), // 调整后的宽度
|
||||
height: originalHeight * (scaleXY?.scale?scaleXY?.scale:1) // 调整后的高度
|
||||
});
|
||||
}
|
||||
}else{
|
||||
@@ -1063,7 +1062,6 @@ class MyCanvas {
|
||||
top: (cloned.top - xy.y),
|
||||
})
|
||||
}
|
||||
|
||||
if(cloned.custom?.layerId != -1){
|
||||
temporar.add(cloned)
|
||||
}
|
||||
@@ -1218,7 +1216,6 @@ class MyCanvas {
|
||||
this.setPencilWidth()
|
||||
}
|
||||
async addImage (imgData){
|
||||
console.log(imgData)
|
||||
if(!imgData.imgUrl)imgData.imgUrl = imgData.url
|
||||
let img = await this.createImage(imgData)
|
||||
let position = {
|
||||
@@ -1234,7 +1231,6 @@ class MyCanvas {
|
||||
// minioUrl:getMinioUrl(imgData.url)
|
||||
},
|
||||
})
|
||||
console.log(this.exportData.width)
|
||||
if(this.exportData.width != -1)await this.createLayer({})
|
||||
// if(this.dashed.isDetail)await this.createLayer({})
|
||||
this.setCanvasImage(img,position,"upImgFiles",imgData)
|
||||
@@ -1245,7 +1241,8 @@ class MyCanvas {
|
||||
img.set({
|
||||
hasControls: true,
|
||||
})
|
||||
img.minioUrl=getMinioUrl(imgData.imgUrl || imgData.minioUrl)
|
||||
let url = imgData.imgUrl || imgData.minioUrl
|
||||
img.minioUrl=getMinioUrl(url)
|
||||
resolve(img)
|
||||
},{ crossOrigin: "Anonymous" })
|
||||
})
|
||||
@@ -2044,7 +2041,6 @@ class MyCanvas {
|
||||
// MyCanvas?.[this.id].add(img)
|
||||
// }
|
||||
}else{
|
||||
console.log(v,'add')
|
||||
MyCanvas?.[this.id].add(v)
|
||||
}
|
||||
if(index == elements.length - 1){
|
||||
@@ -2218,12 +2214,15 @@ class MyCanvas {
|
||||
texture:0,
|
||||
}
|
||||
this.operation = 'movePosition'
|
||||
this.clearEvent()
|
||||
delete MyCanvas[this.id]
|
||||
// MyCanvas[this.id] = null
|
||||
}
|
||||
clearEvent(){
|
||||
document.removeEventListener("keydown", this.canvasKeyDown);
|
||||
document.removeEventListener("keyup", this.canvasKeyUp);
|
||||
document.removeEventListener('mousemove', this.mouseMove);
|
||||
document.removeEventListener('touchmove', this.touchmove);
|
||||
delete MyCanvas[this.id]
|
||||
// MyCanvas[this.id] = null
|
||||
}
|
||||
//删除选中元素
|
||||
deleteObject(){
|
||||
@@ -2292,7 +2291,6 @@ class MyCanvas {
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
|
||||
this._clipboard = copyObj;
|
||||
}
|
||||
paste(){//粘贴
|
||||
|
||||
@@ -56,8 +56,8 @@ axios.interceptors.request.use((config) => {
|
||||
return Promise.reject(error);
|
||||
});
|
||||
let isLoginTime = false
|
||||
const binaryToUrl = (binary,type = 'application/octet-stream')=>{
|
||||
let blob = new Blob([binary], {type});
|
||||
const binaryToUrl = (binary,type = 'application/octet-stream',res)=>{
|
||||
let blob = new Blob([binary], {'content-type':res.headers['content-type']});
|
||||
let url = URL.createObjectURL(blob);
|
||||
return url
|
||||
}
|
||||
@@ -68,7 +68,7 @@ axios.interceptors.response.use((res) =>{
|
||||
// return Promise.reject(res.data);
|
||||
// }else
|
||||
if(res.config.env.binary){
|
||||
let url = binaryToUrl(res.data,res.config.env.binaryType)
|
||||
let url = binaryToUrl(res.data,res.config.env.binaryType,res)
|
||||
return Promise.resolve({url,data:res.data})
|
||||
}
|
||||
if (res.data) {
|
||||
@@ -137,6 +137,7 @@ export const Https = {
|
||||
parseWeChatCode:'/api/third/party/parseWeChatCode',//微信登录
|
||||
accountIsLogin:'/api/account/isLogin', //判断用户是否登录
|
||||
accountLogin:`/api/account/login`, //账号密码登录接口
|
||||
organizationNameSearch:`/api/account/organizationNameSearch`, //查询学校或者企业版名字
|
||||
getUserLanguage:`/api/account/getUserLanguage`, //获取当前用户语言
|
||||
changeUserLanguage:`/api/account/changeUserLanguage`, //切换用户当前语言
|
||||
uploadAvatar:`/api/account/uploadAvatar`, //修改头像
|
||||
@@ -286,6 +287,9 @@ export const Https = {
|
||||
modifySketch:'/api/generate/modifySketch',//修改画布内容并且储存
|
||||
|
||||
elementUpload:`/api/element/upload`,//上传图片
|
||||
imageSegmentation:`/api/element/imageSegmentation`,//分割衣服
|
||||
|
||||
|
||||
// oldHis:`/oldHis/history/queryUserGroup`,//上传图片
|
||||
sketchBoardsBoundingBox:`/api/design/sketchBoardsBoundingBox`,//裁剪sketch图片
|
||||
|
||||
@@ -302,6 +306,20 @@ export const Https = {
|
||||
getUserInfo:`/api/inquiry/getUserInfo`,//查询所有用户
|
||||
queryTransaction:`/api/inquiry/queryTransaction`,//查询交易记录
|
||||
queryTransactionDownload:`/api/inquiry/queryTransaction/download`,//导出交易记录
|
||||
createCoupon:`/api/stripe/createCoupon`,//创建优惠码
|
||||
updatePromCodeInfo:`/api/stripe/updatePromCodeInfo`,//修改优惠码
|
||||
getAllCoupons:`/api/stripe/getAllCoupons`,//查询优惠码列表
|
||||
checkCoupon:`/api/stripe/checkCoupon`,//根据优惠码获取结算后的金额
|
||||
|
||||
//企业版教育版管理员页面
|
||||
subAccountList:`/api/account/subAccountList`,//查询子账号
|
||||
addOrUpdateSubAccount:`/api/account/addOrUpdateSubAccount`,//添加子账号
|
||||
deleteSubAccount:`/api/account/deleteSubAccount`,//删除子账号
|
||||
subAccountImportExcelDownload:`/api/account/subAccountImportExcelDownload`,//批量添加模板下载模板
|
||||
subAccountImport:`/api/account/subAccountImport`,//模板导入
|
||||
getGenerateFrequency:`/api/inquiry/getGenerateFrequency`,//积分使用详情
|
||||
getAllGenerateFuncName:`/api/inquiry/getAllGenerateFuncName`,//获取所有generate类型
|
||||
|
||||
//查询某个时间内design点击次数
|
||||
getDesignStatistic:`/api/inquiry/getDesignStatistic`,//拒绝审批
|
||||
getAllQuestionnaire:`/api/inquiry/getAllQuestionnaire`,//拒绝审批
|
||||
|
||||
@@ -196,14 +196,14 @@ const projectList = {
|
||||
],
|
||||
printingDesign3D:[
|
||||
{
|
||||
icon:'fi fi-rs-objects-column',
|
||||
value:'printBoard',
|
||||
name:'Printboard',
|
||||
task:'1-1',
|
||||
},{
|
||||
icon:'fi fi-rr-cubes',
|
||||
value:'patternMaking3D',
|
||||
name:'3D Pattern Making',
|
||||
task:'1-1',
|
||||
},{
|
||||
icon:'fi fi-br-download',
|
||||
value:'download',
|
||||
name:'Download',
|
||||
task:'2-1',
|
||||
}
|
||||
],
|
||||
|
||||
@@ -68,11 +68,12 @@
|
||||
<script lang="ts">
|
||||
import { LoadingOutlined } from "@ant-design/icons-vue";
|
||||
import { message, Upload } from "ant-design-vue";
|
||||
import { defineComponent, onMounted, h, ref, nextTick, inject,reactive, toRefs } from "vue";
|
||||
import { defineComponent, onMounted, h, ref, nextTick, computed,reactive, toRefs } from "vue";
|
||||
import { MailOutlined, AppstoreOutlined, SettingOutlined } from '@ant-design/icons-vue';
|
||||
import { Https } from "@/tool/https";
|
||||
import { useStore } from "vuex";
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { adminRouter } from "@/tool/adminRouter";
|
||||
import GO from "@/tool/GO";
|
||||
import { country } from "@/tool/country";
|
||||
import { getUploadUrl } from "@/tool/util";
|
||||
@@ -92,157 +93,13 @@ export default defineComponent({
|
||||
const router = useRouter()
|
||||
// const route:any = useRoute()
|
||||
const store:any = useStore()
|
||||
let userDetail:any= computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
const state:any = reactive({
|
||||
rootSubmenuKeys: [{
|
||||
name:'All User',
|
||||
route:'/administrator/allUser',
|
||||
icon:'yonghu',
|
||||
expandIcon:'icon-xiala',
|
||||
key:'sub1',
|
||||
isShow:true,
|
||||
// children: [
|
||||
// {
|
||||
// name:'User Management',
|
||||
// route:'/home/excil1',
|
||||
// icon:'',
|
||||
// key:'/home/excil22',
|
||||
// isShow:true,
|
||||
// },
|
||||
// {
|
||||
// code:'ROLE_MANAGER',
|
||||
// name:'Access Permission',
|
||||
// route:'/home/excil2',
|
||||
// icon:'',
|
||||
// key:'/home/excil33',
|
||||
// isShow:true,
|
||||
// },
|
||||
// ],
|
||||
},{
|
||||
name:'Design Frequency',
|
||||
route:'/administrator/testClickData',
|
||||
icon:'shenpi',
|
||||
expandIcon:'icon-xiala',
|
||||
key:'sub2',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Trial User',
|
||||
icon:'usetime',
|
||||
expandIcon:'icon-xiala',
|
||||
key:'sub3',
|
||||
isShow:true,
|
||||
children:[
|
||||
{
|
||||
name:'All Trial User',
|
||||
route:'/administrator/trialAllUser',
|
||||
icon:'usetime',
|
||||
key:'sub3-1',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Trial User Approval',
|
||||
route:'/administrator/trialApproval',
|
||||
icon:'usetime',
|
||||
key:'sub3-2',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Trial User CHART',
|
||||
route:'/administrator/trialUserCountry',
|
||||
icon:'',
|
||||
key:'sub3-3',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Conversion Rate',
|
||||
route:'/administrator/trialUserConversionRateChart',
|
||||
icon:'',
|
||||
key:'sub3-4',
|
||||
isShow:true,
|
||||
},
|
||||
]
|
||||
},{
|
||||
name:'Function Use CHART',
|
||||
route:'/administrator/recentActiveChart',
|
||||
icon:'usetime',
|
||||
key:'sub4',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Active User',
|
||||
icon:'usetime',
|
||||
route:'/administrator/recentActiveUser',
|
||||
key:'sub5',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'New User',
|
||||
icon:'usetime',
|
||||
expandIcon:'icon-xiala',
|
||||
key:'sub6',
|
||||
isShow:true,
|
||||
children:[
|
||||
{
|
||||
name:'New User List',
|
||||
route:'/administrator/recentNewUser',
|
||||
icon:'',
|
||||
key:'sub6-1',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'New User CHART',
|
||||
route:'/administrator/recentNewUserChart',
|
||||
icon:'',
|
||||
key:'sub6-2',
|
||||
isShow:true,
|
||||
},
|
||||
]
|
||||
},{
|
||||
name:'Events',
|
||||
icon:'usetime',
|
||||
key:'sub9',
|
||||
expandIcon:'icon-xiala',
|
||||
isShow:true,
|
||||
children: [
|
||||
{
|
||||
name:'Questionnaire Survey',
|
||||
route:'/administrator/questionnaire',
|
||||
icon:'',
|
||||
key:'sub9-1',
|
||||
isShow:true,
|
||||
},
|
||||
// {
|
||||
// code:'ROLE_MANAGER',
|
||||
// name:'Access Permission',
|
||||
// route:'/home/excil2',
|
||||
// icon:'',
|
||||
// key:'/home/excil33',
|
||||
// isShow:true,
|
||||
// },
|
||||
],
|
||||
},{
|
||||
name:'Approval Affiliate',
|
||||
icon:'usetime',
|
||||
route:'/administrator/affiliateAudit',
|
||||
key:'sub10',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Transaction',
|
||||
icon:'usetime',
|
||||
expandIcon:'icon-xiala',
|
||||
key:'sub11',
|
||||
isShow:true,
|
||||
children: [
|
||||
{
|
||||
name:'Transaction Record',
|
||||
route:'/administrator/TransactionTable',
|
||||
icon:'',
|
||||
key:'sub11-1',
|
||||
isShow:true,
|
||||
},
|
||||
// {
|
||||
// code:'ROLE_MANAGER',
|
||||
// name:'Access Permission',
|
||||
// route:'/home/excil2',
|
||||
// icon:'',
|
||||
// key:'/home/excil33',
|
||||
// isShow:true,
|
||||
// },
|
||||
],
|
||||
}],
|
||||
|
||||
// 5,7
|
||||
rootSubmenuKeys: [],
|
||||
openKeys: [],
|
||||
selectedKeys: ['sub1'],
|
||||
nowPageName:'All User',//当前页面名称
|
||||
@@ -267,6 +124,18 @@ export default defineComponent({
|
||||
router.push('/home');
|
||||
}
|
||||
onMounted(() => {
|
||||
if(userDetail.value.systemUser == 5 || userDetail.value.systemUser == 7){
|
||||
state.rootSubmenuKeys = adminRouter.schoolOrEnterprise;
|
||||
}else{
|
||||
state.rootSubmenuKeys = adminRouter.all;
|
||||
}
|
||||
const route = router.currentRoute.value
|
||||
if(state.rootSubmenuKeys.some((item:any) => item.route === route.path) || route.path == "/administrator"){
|
||||
router.push(state.rootSubmenuKeys[0].route)
|
||||
}else{
|
||||
router.push('/administrator')
|
||||
}
|
||||
|
||||
state.rootSubmenuKeys.forEach((item:any) => {
|
||||
if(item.children){
|
||||
item.children.forEach((item:any) => {
|
||||
@@ -291,6 +160,11 @@ export default defineComponent({
|
||||
store.commit('setAllCitiesList',rv);
|
||||
}
|
||||
})
|
||||
Https.axiosGet(Https.httpUrls.getAllGenerateFuncName,).then((rv: any) => {
|
||||
if (rv) {
|
||||
store.commit('setAllGenerateType',rv);
|
||||
}
|
||||
})
|
||||
let allCountry = country
|
||||
sessionStorage.setItem('allCountry',JSON.stringify(allCountry));
|
||||
// state.nowPageName = state.rootSubmenuKeys[0].name
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
<!-- <i @click="Assignment" class="fi fi-rr-gift" title="Assignment"></i> -->
|
||||
<i @click="UpgradePlan" title="Purchase" class="fi fi-rr-shop"></i>
|
||||
</div>
|
||||
<!-- <div class="gallery_btn" style="margin-left: 3rem;" @click="subscribe">{{$t('Header.SubscribeNow')}}</div> -->
|
||||
<div v-if="userDetail.systemUser == 0 || userDetail.systemUser == 3" class="gallery_btn" style="margin-left: 3rem;" @click="subscribe">{{$t('Header.SubscribeNow')}}</div>
|
||||
<div v-else style="width: 30rem;"></div>
|
||||
</div>
|
||||
@@ -495,7 +496,7 @@ export default defineComponent({
|
||||
this.$router.replace("/");
|
||||
}
|
||||
this.store.commit('createDetail')
|
||||
store.commit('createProbject')
|
||||
this.store.commit('createProbject')
|
||||
|
||||
// WriteCookie("token");
|
||||
clonAllCookie()
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<brandDetail v-show="isBrandDetail" v-model:isShowMark="isShowMark" :selectCode="selectCode" ref="brandDetail" @handleBack="()=>isBrandDetail = false"></brandDetail>
|
||||
<brandDetail v-if="isBrandDetail" v-model:isShowMark="isShowMark" :selectCode="selectCode" ref="brandDetail" @handleBack="()=>isBrandDetail = false"></brandDetail>
|
||||
|
||||
</div>
|
||||
<div class="right_content_body" v-show="uploadGenerate !='Upload'">
|
||||
@@ -791,7 +791,9 @@ export default defineComponent({
|
||||
}
|
||||
const openBrandDetail = (item:any)=>{
|
||||
pageData.isBrandDetail = true
|
||||
dataDom.brandDetail.getBranDetailData(item)
|
||||
nextTick(()=>{
|
||||
dataDom.brandDetail.getBranDetailData(item)
|
||||
})
|
||||
}
|
||||
const addBrand = ()=>{
|
||||
dataDom.createBrand.openAddBrand()
|
||||
|
||||
1120
src/views/LoginPageEnterprise.vue
Normal file
1120
src/views/LoginPageEnterprise.vue
Normal file
File diff suppressed because it is too large
Load Diff
1120
src/views/LoginPageSchool.vue
Normal file
1120
src/views/LoginPageSchool.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="homeRecommend_right">
|
||||
<div class="gallery_btn" v-if="userDetail.systemUser == 1 && !isMoblie" @click="goHome">Home</div>
|
||||
<div class="gallery_btn" v-if="userDetail.systemList.indexOf(1) > -1 && !isMoblie" @click="goHome">Home</div>
|
||||
<div class="gallery_btn white" v-if="userDetail.systemUser != -1" @click="logout">log off</div>
|
||||
</div>
|
||||
<div class="homeRecommend_right" v-if="userDetail.systemUser == -1">
|
||||
|
||||
Reference in New Issue
Block a user