3d添加印花 等
This commit is contained in:
@@ -551,13 +551,15 @@ li {
|
|||||||
.ant-btn-primary {
|
.ant-btn-primary {
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
}
|
}
|
||||||
.ant-picker-range-wrapper {
|
.ant-picker-range-wrapper,
|
||||||
|
.ant-picker-dropdown {
|
||||||
border-radius: 2rem;
|
border-radius: 2rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 2px solid #000;
|
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;
|
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,
|
.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;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
.admin_page .admin_state_item > span {
|
||||||
|
white-space: nowrap;
|
||||||
|
width: 13rem;
|
||||||
|
}
|
||||||
.admin_page .admin_state_item > span > span {
|
.admin_page .admin_state_item > span > span {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
@@ -1283,7 +1289,6 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
|||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
display: block;
|
display: block;
|
||||||
width: 10.5rem;
|
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
.admin_page .admin_state_item > input {
|
.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;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
.admin_page .admin_search_item {
|
.admin_page .admin_search_item {
|
||||||
background: #343579;
|
|
||||||
border-color: #343579;
|
|
||||||
height: 4rem;
|
height: 4rem;
|
||||||
padding: 0.64rem 1.5rem;
|
width: 13rem;
|
||||||
font-size: 1.6rem;
|
height: 6rem;
|
||||||
border-radius: 2px;
|
display: flex;
|
||||||
display: inline-block;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 1.8rem;
|
||||||
|
font-weight: 600;
|
||||||
|
border-radius: 3rem;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin: 0 2rem 2rem 0;
|
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 {
|
.admin_page .admin_search_item:last-child {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -1334,7 +1347,7 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
border: 1px solid #b6b6b6;
|
border: 1px solid #b6b6b6;
|
||||||
background: #39215b;
|
background: #000;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
margin: 0 10px 10px 0;
|
margin: 0 10px 10px 0;
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
|
|||||||
@@ -612,7 +612,7 @@ input:focus{
|
|||||||
.ant-btn-primary{
|
.ant-btn-primary{
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
}
|
}
|
||||||
.ant-picker-range-wrapper{
|
.ant-picker-range-wrapper,.ant-picker-dropdown{
|
||||||
border-radius: 2rem;
|
border-radius: 2rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@@ -1399,6 +1399,8 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
>span{
|
>span{
|
||||||
|
white-space: nowrap;
|
||||||
|
width: 13rem;
|
||||||
>span{
|
>span{
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
@@ -1412,7 +1414,6 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
|||||||
display: block;
|
display: block;
|
||||||
// min-width: 20%;
|
// min-width: 20%;
|
||||||
// width: 100px;
|
// width: 100px;
|
||||||
width: 10.5rem;
|
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
>input{
|
>input{
|
||||||
@@ -1426,16 +1427,25 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.admin_search_item{
|
.admin_search_item{
|
||||||
background: #343579;
|
|
||||||
border-color: #343579;
|
|
||||||
height: 4rem;
|
height: 4rem;
|
||||||
padding: .64rem 1.5rem;
|
width: 13rem;
|
||||||
font-size: 1.6rem;
|
height: 6rem;
|
||||||
border-radius: 2px;
|
display: flex;
|
||||||
display: inline-block;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 1.8rem;
|
||||||
|
font-weight: 600;
|
||||||
|
border-radius: 3rem;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin: 0 2rem 2rem 0;
|
margin: 0 2rem 2rem 0;
|
||||||
|
background-color: #000;
|
||||||
|
|
||||||
|
&:hover{
|
||||||
|
color: #000;
|
||||||
|
border: 2px solid #000;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.admin_search_item:last-child{
|
.admin_search_item:last-child{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -1464,7 +1474,7 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
border: 1px solid #b6b6b6;
|
border: 1px solid #b6b6b6;
|
||||||
background: #39215b;
|
background: #000;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
margin: 0 10px 10px 0;
|
margin: 0 10px 10px 0;
|
||||||
font-size: 1.4rem;
|
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) {
|
changePage(e: any) {
|
||||||
this.currentPage = e.current;
|
this.currentPage = e.current;
|
||||||
this.pageSize = e.pageSize;
|
this.pageSize = e.pageSize;
|
||||||
// this.gettrialList();
|
this.gettrialList();
|
||||||
},
|
},
|
||||||
|
|
||||||
//查询列表
|
//查询列表
|
||||||
|
|||||||
@@ -278,10 +278,11 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.allUserPoeration_modal{
|
:deep(.allUserPoeration_modal){
|
||||||
.ant-modal-body{
|
.ant-modal-body{
|
||||||
height: auto;
|
height: auto;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -303,7 +304,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.allUserPoeration_center{
|
.allUserPoeration_center{
|
||||||
height: 85%;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: wrap;
|
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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<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";
|
} from "vue";
|
||||||
import {message} from 'ant-design-vue'
|
import {message} from 'ant-design-vue'
|
||||||
import { Https } from "@/tool/https";
|
import { Https } from "@/tool/https";
|
||||||
@@ -48,7 +48,16 @@ export default defineComponent({
|
|||||||
canvasContent,
|
canvasContent,
|
||||||
liquefaction,publish
|
liquefaction,publish
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
isState: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
setup(props,{emit}) {
|
setup(props,{emit}) {
|
||||||
|
watch(()=>props.isState,(newVal)=>{
|
||||||
|
if(!newVal && canvasObj)canvasObj.clearEvent()
|
||||||
|
})
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const isShowMark = ref(false)
|
const isShowMark = ref(false)
|
||||||
@@ -67,6 +76,7 @@ export default defineComponent({
|
|||||||
let data = reactive({
|
let data = reactive({
|
||||||
elementList:null,
|
elementList:null,
|
||||||
showCanvas:false,
|
showCanvas:false,
|
||||||
|
|
||||||
})
|
})
|
||||||
provide('canvasType',canvasType)
|
provide('canvasType',canvasType)
|
||||||
provide('canvasObj',canvasObj)
|
provide('canvasObj',canvasObj)
|
||||||
|
|||||||
@@ -68,6 +68,11 @@ export default defineComponent({
|
|||||||
default:'' as any,
|
default:'' as any,
|
||||||
required:true
|
required:true
|
||||||
},
|
},
|
||||||
|
isSegmentation:{
|
||||||
|
type:Boolean,
|
||||||
|
default:false as any,
|
||||||
|
required:true
|
||||||
|
},
|
||||||
},
|
},
|
||||||
emits:['selectImgItem'],
|
emits:['selectImgItem'],
|
||||||
setup(props,{emit}) {
|
setup(props,{emit}) {
|
||||||
@@ -86,7 +91,6 @@ export default defineComponent({
|
|||||||
currentPage:1,
|
currentPage:1,
|
||||||
})
|
})
|
||||||
const init = ()=>{
|
const init = ()=>{
|
||||||
console.log(123)
|
|
||||||
detailData.designTypeList = props.catecoryList
|
detailData.designTypeList = props.catecoryList
|
||||||
detailData.designType = detailData.designTypeList[0].value
|
detailData.designType = detailData.designTypeList[0].value
|
||||||
getLibraryList()
|
getLibraryList()
|
||||||
@@ -115,7 +119,9 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let data = JSON.parse(JSON.stringify(file))
|
let data = JSON.parse(JSON.stringify(file))
|
||||||
|
if(!props.isSegmentation){
|
||||||
data.id = id
|
data.id = id
|
||||||
|
}
|
||||||
emit('selectImgItem',data)
|
emit('selectImgItem',data)
|
||||||
// store.commit('DesignDetailCopy/setNewDetail',data)
|
// store.commit('DesignDetailCopy/setNewDetail',data)
|
||||||
}
|
}
|
||||||
@@ -263,6 +269,9 @@ export default defineComponent({
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc((34rem - 2rem) / 2);
|
height: calc((34rem - 2rem) / 2);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
> img{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,10 +28,11 @@
|
|||||||
<currentList ref="currentList" :level1Type="level1Type" :type="type" @selectImgItem="selectImgItem" :catecoryList="catecoryList"></currentList>
|
<currentList ref="currentList" :level1Type="level1Type" :type="type" @selectImgItem="selectImgItem" :catecoryList="catecoryList"></currentList>
|
||||||
</div>
|
</div>
|
||||||
<div class="content_item" v-show="selectTitle == 'upload'" v-if="type != 'element'">
|
<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>
|
||||||
<div class="content_item" v-show="selectTitle == 'library'">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -45,12 +46,14 @@ import { useI18n } from 'vue-i18n'
|
|||||||
// import sketchCategory from "@/component/HomePage/sketchCategory.vue";
|
// import sketchCategory from "@/component/HomePage/sketchCategory.vue";
|
||||||
import libraryList from './libraryList.vue'
|
import libraryList from './libraryList.vue'
|
||||||
import uploadList from './uploadList.vue'
|
import uploadList from './uploadList.vue'
|
||||||
|
import uploadSegmentation from './uploadSegmentation.vue'
|
||||||
import currentList from './currentList.vue'
|
import currentList from './currentList.vue'
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components:{
|
components:{
|
||||||
currentList,
|
currentList,
|
||||||
libraryList,
|
libraryList,
|
||||||
uploadList,
|
uploadList,
|
||||||
|
uploadSegmentation,
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
catecoryList:{
|
catecoryList:{
|
||||||
@@ -62,6 +65,16 @@ export default defineComponent({
|
|||||||
default:true,
|
default:true,
|
||||||
required:false
|
required:false
|
||||||
},
|
},
|
||||||
|
isSegmentation:{//决定上传的入参,是否需要分割
|
||||||
|
type:Boolean,
|
||||||
|
default:false,
|
||||||
|
required:false
|
||||||
|
},
|
||||||
|
segmentationType:{//决定上传的入参,是否需要分割
|
||||||
|
type:String,
|
||||||
|
default:'',
|
||||||
|
required:false
|
||||||
|
},
|
||||||
type:{
|
type:{
|
||||||
type:String,
|
type:String,
|
||||||
default:'' as any,
|
default:'' as any,
|
||||||
|
|||||||
@@ -13,10 +13,10 @@
|
|||||||
<div class="upload_item">
|
<div class="upload_item">
|
||||||
<div class="upload_file_item upload_component">
|
<div class="upload_file_item upload_component">
|
||||||
<a-upload
|
<a-upload
|
||||||
:action="uploadUrl + '/api/element/upload'"
|
:action="uploadUrl + (upLoadHttpsUrl?upLoadHttpsUrl:'/api/element/upload')"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
:capture="null"
|
:capture="null"
|
||||||
|
:multiple="true"
|
||||||
:data="{
|
:data="{
|
||||||
...upload,
|
...upload,
|
||||||
}"
|
}"
|
||||||
@@ -64,6 +64,14 @@ export default defineComponent({
|
|||||||
default:'' as any,
|
default:'' as any,
|
||||||
required:true
|
required:true
|
||||||
},
|
},
|
||||||
|
segmentation:{
|
||||||
|
type:Object,
|
||||||
|
default:null as any,
|
||||||
|
},
|
||||||
|
upLoadHttpsUrl:{//决定上传的入参,是否需要分割
|
||||||
|
type:String,
|
||||||
|
default:'' as any,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
emits:['selectImgItem'],
|
emits:['selectImgItem'],
|
||||||
setup(props,{emit}) {
|
setup(props,{emit}) {
|
||||||
@@ -72,7 +80,8 @@ export default defineComponent({
|
|||||||
const detailData = reactive({
|
const detailData = reactive({
|
||||||
isShowLoading:false,//懒加载,加载中
|
isShowLoading:false,//懒加载,加载中
|
||||||
uploadList:[],
|
uploadList:[],
|
||||||
upload:{
|
upload:props.segmentation?
|
||||||
|
props.segmentation:{
|
||||||
isPin: 0,
|
isPin: 0,
|
||||||
level1Type: props.level1Type,
|
level1Type: props.level1Type,
|
||||||
gender:store.state.Workspace.probjects.sex ,
|
gender:store.state.Workspace.probjects.sex ,
|
||||||
@@ -124,8 +133,6 @@ export default defineComponent({
|
|||||||
let fileList = detailData.uploadList.filter(
|
let fileList = detailData.uploadList.filter(
|
||||||
(v:any) => v.status === "done"
|
(v:any) => v.status === "done"
|
||||||
);
|
);
|
||||||
console.log(file);
|
|
||||||
|
|
||||||
detailData.uploadList = fileList
|
detailData.uploadList = fileList
|
||||||
// this.selectImgItem(detailData.uploadList[detailData.uploadList.length-1])
|
// this.selectImgItem(detailData.uploadList[detailData.uploadList.length-1])
|
||||||
}else{
|
}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 @click="getHistoryProject" class="gallery_btn white gallery_btn_radius">Resume Project</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="state == 2" class="selectProjectBtn">
|
<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="porjectBox">
|
||||||
<div class="selectProjectBtn_title" v-for="item in opjectList" :key="item.value" @click="selectProject(item)">{{item.title}}</div>
|
<div class="selectProjectBtn_title" v-for="item in opjectList" :key="item.value" @click="selectProject(item)">{{item.title}}</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -17,6 +18,9 @@
|
|||||||
<a-spin size="large" />
|
<a-spin size="large" />
|
||||||
</div>
|
</div>
|
||||||
<affiche ref="affiche"></affiche>
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -105,11 +109,45 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
const getHistory = ()=>{
|
const getHistory = ()=>{
|
||||||
let value = {
|
let value = {
|
||||||
id:route.params.id,
|
id:Number(route.params.id),
|
||||||
}
|
}
|
||||||
if(!route.params.id)return
|
if(!route.params.id)return
|
||||||
createData()
|
createData()
|
||||||
Https.axiosPost(Https.httpUrls.selectHistoryProject,value).then((rv: any) => {
|
Https.axiosPost(Https.httpUrls.selectHistoryProject,value).then((rv: any) => {
|
||||||
|
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 type:any = data.opjectList.find(obj => obj.httpValue === rv.process);
|
||||||
//取出数组对象某个值
|
//取出数组对象某个值
|
||||||
let storeData = {
|
let storeData = {
|
||||||
@@ -129,10 +167,10 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
positionList:[],
|
positionList:[],
|
||||||
publishData:{
|
publishData:{
|
||||||
id:'',
|
id:rv.portfolioDTO.id?rv.portfolioDTO.id:'',
|
||||||
portfolioDes:'',
|
portfolioDes:rv.portfolioDTO.portfolioDes?rv.portfolioDTO.portfolioDes:'',
|
||||||
portfolioName:'',
|
portfolioName:rv.portfolioDTO.portfolioName?rv.portfolioDTO.portfolioName:'',
|
||||||
tagsDTO:[],
|
tagsDTO:rv.portfolioDTO.tagsDTO?rv.portfolioDTO.tagsDTO:[],
|
||||||
},
|
},
|
||||||
model:{}
|
model:{}
|
||||||
}
|
}
|
||||||
@@ -163,13 +201,7 @@ export default defineComponent({
|
|||||||
nextTick(()=>{
|
nextTick(()=>{
|
||||||
dataDom.workflow.isUpdataPorject = true
|
dataDom.workflow.isUpdataPorject = true
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
// watch(()=>data.opjectList.type,(newVal,oldVal)=>{
|
|
||||||
// console.log(newVal,oldVal);
|
|
||||||
|
|
||||||
|
|
||||||
// })
|
|
||||||
onMounted(async ()=>{
|
onMounted(async ()=>{
|
||||||
let test:any = getCookie('isTest')
|
let test:any = getCookie('isTest')
|
||||||
let isTest =JSON.parse(test)
|
let isTest =JSON.parse(test)
|
||||||
@@ -215,7 +247,11 @@ export default defineComponent({
|
|||||||
}else{
|
}else{
|
||||||
// openGuide()
|
// openGuide()
|
||||||
}
|
}
|
||||||
|
if(route.params.type == 'Works'){
|
||||||
|
getWorks()
|
||||||
|
}else{
|
||||||
getHistory()
|
getHistory()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
onBeforeMount(()=>{
|
onBeforeMount(()=>{
|
||||||
// data.selectObject = null
|
// data.selectObject = null
|
||||||
@@ -243,7 +279,21 @@ export default defineComponent({
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
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{
|
> .createProject{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 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
|
return data
|
||||||
})
|
})
|
||||||
console.log(123)
|
|
||||||
this.store.commit('setColorboardList',newColorList)
|
this.store.commit('setColorboardList',newColorList)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="deReconstruction">
|
<div class="deReconstruction">
|
||||||
<div class="selectSektch itemBox">
|
<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>
|
||||||
<div class="canvas itemBox">
|
<div class="canvas itemBox">
|
||||||
<canvasBox @setGenerateImg="setGenerateImg" ref="canvasBox"></canvasBox>
|
<canvasBox @setGenerateImg="setGenerateImg" ref="canvasBox"></canvasBox>
|
||||||
@@ -44,6 +62,7 @@ export default defineComponent({
|
|||||||
sketchCatecoryList:computed(()=>{
|
sketchCatecoryList:computed(()=>{
|
||||||
return store.state.Workspace.probjects.positionList
|
return store.state.Workspace.probjects.positionList
|
||||||
}),
|
}),
|
||||||
|
segmentationType:'product',
|
||||||
generateImg:computed(()=>store.state.HomeStoreModule.deReconstruction) as any,
|
generateImg:computed(()=>store.state.HomeStoreModule.deReconstruction) as any,
|
||||||
})
|
})
|
||||||
const setIsShowMark:any = inject('setIsShowMark')
|
const setIsShowMark:any = inject('setIsShowMark')
|
||||||
@@ -51,8 +70,33 @@ export default defineComponent({
|
|||||||
canvasBox:null as any,
|
canvasBox:null as any,
|
||||||
})
|
})
|
||||||
const selectImgItem = (data:any)=>{
|
const selectImgItem = (data:any)=>{
|
||||||
data.minioUrl = data.url
|
if(!data.designType){
|
||||||
dataDom.canvasBox.addImage(data)
|
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 = ()=>{
|
const openSetData = ()=>{
|
||||||
dataDom.canvasBox.openSetData()
|
dataDom.canvasBox.openSetData()
|
||||||
@@ -154,6 +198,24 @@ export default defineComponent({
|
|||||||
&.selectSektch{
|
&.selectSektch{
|
||||||
width: 37rem;
|
width: 37rem;
|
||||||
flex-shrink: 0;
|
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{
|
&.canvas{
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="designPage">
|
<div class="designPage">
|
||||||
<div class="page_content">
|
<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="page_content_body">
|
||||||
<div class="designPage_body">
|
<div class="designPage_body">
|
||||||
<div class="designPage_left" ref="hidden">
|
<div class="designPage_left" ref="hidden">
|
||||||
@@ -1456,19 +1454,7 @@ export default defineComponent({
|
|||||||
.page_content {
|
.page_content {
|
||||||
position: relative;
|
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{
|
.designPage_left_bottom{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 4rem;
|
width: 4rem;
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="patternMaking3D">
|
<div class="patternMaking3D">
|
||||||
<div class="selectModel">
|
<div class="selectModel">
|
||||||
<div class="heard">Clothing</div>
|
<div class="heard selectList">
|
||||||
<div class="list" v-if="maskShow">
|
<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)">
|
<div v-for="item in modelList" class="modelItem" :class="{active:item.id == selectModel.id}" @click="setSelectModel(item)">
|
||||||
<img :src="item.url" alt="">
|
<img :src="item.url" alt="">
|
||||||
</div>
|
</div>
|
||||||
@@ -13,6 +16,11 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
<div class="model" v-show="selectModel.id != -1">
|
<div class="model" v-show="selectModel.id != -1">
|
||||||
<div class="heard">
|
<div class="heard">
|
||||||
@@ -48,7 +56,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<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 { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
import { Https } from "@/tool/https";
|
import { Https } from "@/tool/https";
|
||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
@@ -68,7 +76,12 @@ export default defineComponent({
|
|||||||
selectModel:{
|
selectModel:{
|
||||||
id:-1,
|
id:-1,
|
||||||
} as any,
|
} as any,
|
||||||
|
// printCatecoryList:computed(()=>{
|
||||||
|
// return store.state.UserHabit.printType
|
||||||
|
// }),
|
||||||
|
selectObject:computed(()=>store.state.Workspace.probjects),//选择的项目
|
||||||
modelList:[] as any,
|
modelList:[] as any,
|
||||||
|
printList:computed(()=>store.state.UploadFilesModule.allBoardData.printboardFiles),
|
||||||
isShowMark:false,
|
isShowMark:false,
|
||||||
isNoData:false,
|
isNoData:false,
|
||||||
isShowLoading:false,
|
isShowLoading:false,
|
||||||
@@ -77,6 +90,13 @@ export default defineComponent({
|
|||||||
imgOrThree:false,
|
imgOrThree:false,
|
||||||
isFront:false,
|
isFront:false,
|
||||||
maskShow: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)=>{
|
const setSelectModel = (item:any)=>{
|
||||||
data.isShowMark = true
|
data.isShowMark = true
|
||||||
@@ -114,14 +134,14 @@ export default defineComponent({
|
|||||||
let value = {
|
let value = {
|
||||||
page: data.currentPage,
|
page: data.currentPage,
|
||||||
size:data.pageSize,
|
size:data.pageSize,
|
||||||
|
sex:data.selectObject.sex,
|
||||||
}
|
}
|
||||||
data.isShowLoading = true
|
data.isShowLoading = true
|
||||||
Https.axiosPost(Https.httpUrls.threeDPage,value).then(
|
Https.axiosPost(Https.httpUrls.threeDPage,value).then(
|
||||||
(rv: any) => {
|
(rv: any) => {
|
||||||
if(rv.content.length == 0)data.isNoData = true
|
if(rv.content.length == 0)data.isNoData = true
|
||||||
data.isShowLoading = false
|
|
||||||
data.modelList.push(...rv.content)
|
data.modelList.push(...rv.content)
|
||||||
|
data.isShowLoading = false
|
||||||
}
|
}
|
||||||
).catch((res)=>{
|
).catch((res)=>{
|
||||||
data.isNoData = true
|
data.isNoData = true
|
||||||
@@ -147,6 +167,14 @@ export default defineComponent({
|
|||||||
const openDown = ()=>{
|
const openDown = ()=>{
|
||||||
dataDom.download.openDown(data.selectModel.id)
|
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{
|
return{
|
||||||
...toRefs(dataDom),
|
...toRefs(dataDom),
|
||||||
...toRefs(data),
|
...toRefs(data),
|
||||||
@@ -155,6 +183,8 @@ export default defineComponent({
|
|||||||
getModelList,
|
getModelList,
|
||||||
setImgOrThree,
|
setImgOrThree,
|
||||||
openDown,
|
openDown,
|
||||||
|
setLibraryOrModel,
|
||||||
|
setMaterial,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
directives:{
|
directives:{
|
||||||
@@ -202,6 +232,33 @@ export default defineComponent({
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 100%;
|
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{
|
> .switch{
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
@@ -219,6 +276,14 @@ export default defineComponent({
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
align-content: flex-start;
|
align-content: flex-start;
|
||||||
|
&.printList{
|
||||||
|
> .modelItem{
|
||||||
|
aspect-ratio: 1 / 1;
|
||||||
|
>img{
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
> .modelItem{
|
> .modelItem{
|
||||||
width: calc(100% / 4 - 1rem);
|
width: calc(100% / 4 - 1rem);
|
||||||
margin: .5rem;
|
margin: .5rem;
|
||||||
@@ -230,7 +295,9 @@ export default defineComponent({
|
|||||||
> img{
|
> img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover;
|
object-fit: contain;
|
||||||
|
padding: 1rem;
|
||||||
|
|
||||||
}
|
}
|
||||||
&.active{
|
&.active{
|
||||||
border: 2px solid #000;
|
border: 2px solid #000;
|
||||||
@@ -247,6 +314,7 @@ export default defineComponent({
|
|||||||
// height: 20rem;
|
// height: 20rem;
|
||||||
// height: 75rem;
|
// height: 75rem;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
padding: 1rem 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
>.img{
|
>.img{
|
||||||
|
|||||||
@@ -209,20 +209,31 @@ export default defineComponent({
|
|||||||
await addModel(url)
|
await addModel(url)
|
||||||
// addMaterial()
|
// addMaterial()
|
||||||
}
|
}
|
||||||
const addMaterial = ()=>{
|
const addMaterial = (url:any)=>{
|
||||||
//添加图片材质
|
//添加图片材质
|
||||||
data.load.state = true
|
data.load.state = true
|
||||||
let textureLoader = new THREE.TextureLoader()
|
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) => {
|
(texture:any) => {
|
||||||
// 3. 配置纹理参数
|
// 3. 配置纹理参数
|
||||||
texture.wrapS = THREE.RepeatWrapping;
|
texture.wrapS = THREE.RepeatWrapping;
|
||||||
texture.wrapT = THREE.RepeatWrapping;
|
texture.wrapT = THREE.RepeatWrapping;
|
||||||
texture.repeat.set(1, 1); // 纹理重复次数
|
|
||||||
|
// texture.repeat.set(1, 1); // 纹理重复次数
|
||||||
texture.anisotropy = 32; // 提高纹理清晰度
|
texture.anisotropy = 32; // 提高纹理清晰度
|
||||||
data.group?.traverse((child:any) => {
|
data.group?.traverse((child:any) => {
|
||||||
if (child.isMesh) {
|
if (child.isMesh) {
|
||||||
// 5. 创建新材质(根据需求选择材质类型)
|
// 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({
|
const newMaterial = new THREE.MeshStandardMaterial({
|
||||||
map: texture, // 基础颜色贴图
|
map: texture, // 基础颜色贴图
|
||||||
roughness: 0.7, // 表面粗糙度 (0-1)
|
roughness: 0.7, // 表面粗糙度 (0-1)
|
||||||
@@ -231,7 +242,6 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
// 6. 替换原有材质
|
// 6. 替换原有材质
|
||||||
child.material = newMaterial;
|
child.material = newMaterial;
|
||||||
|
|
||||||
// 7. 如果需要单独控制某些子模型的UV
|
// 7. 如果需要单独控制某些子模型的UV
|
||||||
if (child.geometry.attributes.uv) {
|
if (child.geometry.attributes.uv) {
|
||||||
// 可以在这里修改UV坐标
|
// 可以在这里修改UV坐标
|
||||||
@@ -336,6 +346,7 @@ export default defineComponent({
|
|||||||
...toRefs(dataDom),
|
...toRefs(dataDom),
|
||||||
...toRefs(data),
|
...toRefs(data),
|
||||||
openSetData,
|
openSetData,
|
||||||
|
addMaterial,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
provide() {
|
provide() {
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
<div class="element">
|
<div class="element">
|
||||||
<div class="title"><i class="fi fi-rs-comments"></i><span>Selected Video</span></div>
|
<div class="title"><i class="fi fi-rs-comments"></i><span>Selected Video</span></div>
|
||||||
<div class="content">
|
<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>
|
||||||
<!-- <div class="btnLeft" @click="setSize('left')" :class="{'active':button.left}">
|
<!-- <div class="btnLeft" @click="setSize('left')" :class="{'active':button.left}">
|
||||||
<span class="icon iconfont icon-xiala"></span>
|
<span class="icon iconfont icon-xiala"></span>
|
||||||
|
|||||||
@@ -169,7 +169,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="content">
|
<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>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="contentBox" :class="{active:selectKey_ == 'design'}">
|
<div class="contentBox" :class="{active:(selectKey_ == 'design' || selectKey_ == 'toProduct' || selectKey_ == 'relight' || selectKey_ == 'poseTransfer')}">
|
||||||
<seriesDesign v-if="selectObject.id && workflowType == 'seriesDesign'" ref="seriesDesign" :selectKey_="selectKey_" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType"></seriesDesign>
|
<seriesDesign v-show="selectKey_ != 'yun'" 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>
|
<singleProductDesign v-show="selectKey_ != 'yun'" 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>
|
<sketchDesign v-show="selectKey_ != 'yun'" 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>
|
<productDrawingDesign v-show="selectKey_ != 'yun'" 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>
|
<printingDesign3D v-show="selectKey_ != 'yun'" 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>
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -22,13 +25,15 @@ import singleProductDesign from './singleProductDesign.vue'
|
|||||||
import sketchDesign from './sketchDesign.vue'
|
import sketchDesign from './sketchDesign.vue'
|
||||||
import productDrawingDesign from './productDrawingDesign.vue'
|
import productDrawingDesign from './productDrawingDesign.vue'
|
||||||
import printingDesign3D from './printingDesign3D.vue'
|
import printingDesign3D from './printingDesign3D.vue'
|
||||||
|
import cloudUploading from '../../model/cloudUploading/index.vue'
|
||||||
import { rgbToHsv, dataURLtoBlob } from "@/tool/util";
|
import { rgbToHsv, dataURLtoBlob } from "@/tool/util";
|
||||||
|
|
||||||
import { gsap, TweenMax } from "gsap";
|
import { gsap, TweenMax } from "gsap";
|
||||||
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components:{
|
components:{
|
||||||
workspace,seriesDesign,printDesign,singleProductDesign,sketchDesign,productDrawingDesign,printingDesign3D
|
workspace,seriesDesign,printDesign,singleProductDesign,sketchDesign,productDrawingDesign,printingDesign3D,
|
||||||
|
cloudUploading
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
selectKey_:String,
|
selectKey_:String,
|
||||||
@@ -55,7 +60,8 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
//处理design数据
|
//处理design数据
|
||||||
const setDesignData = (str:any)=>{
|
const setDesignData = (str:any)=>{
|
||||||
if(str == 'workspace')return
|
if (str in dataDom) {
|
||||||
|
if(str == 'workspace' || str == '')return
|
||||||
return new Promise(async (resolve,reject)=>{
|
return new Promise(async (resolve,reject)=>{
|
||||||
if(str == "colorBoard")await setColor()
|
if(str == "colorBoard")await setColor()
|
||||||
// if(str == "sketchBoard")await setSketch()
|
// if(str == "sketchBoard")await setSketch()
|
||||||
@@ -76,6 +82,9 @@ export default defineComponent({
|
|||||||
saveProject(str)
|
saveProject(str)
|
||||||
resolve('')
|
resolve('')
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const saveCanvas = (value:any,str:any)=>{
|
const saveCanvas = (value:any,str:any)=>{
|
||||||
let json = dataDom[data.selectObject.type][str].getCanvasData()
|
let json = dataDom[data.selectObject.type][str].getCanvasData()
|
||||||
@@ -208,14 +217,19 @@ export default defineComponent({
|
|||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
// overflow: hidden;
|
||||||
&.active{
|
height: calc(100% - 5rem);
|
||||||
overflow: initial;
|
// &.active{
|
||||||
|
// overflow: initial;
|
||||||
|
// }
|
||||||
|
> .public{
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
> .contentBox{
|
> .contentBox{
|
||||||
position: relative;
|
position: relative;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-x: initial;
|
overflow-x: initial;
|
||||||
|
|
||||||
> .content,
|
> .content,
|
||||||
>.homeContent{
|
>.homeContent{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="seriesDesign">
|
<div class="seriesDesign">
|
||||||
<workspace @setProject="workspaceBack" ref="workspace" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType" class="workspace" :isState="selectKey_ =='workspace'" v-show="selectKey_ == 'workspace'"></workspace>
|
<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>
|
<patternMaking3D ref="patternMaking3D" class="patternMaking3D" :isState="selectKey_ =='patternMaking3D'" v-show="selectKey_ == 'patternMaking3D'"></patternMaking3D>
|
||||||
<!-- <canvasUpload></canvasUpload> -->
|
<!-- <canvasUpload></canvasUpload> -->
|
||||||
</div>
|
</div>
|
||||||
@@ -15,12 +16,13 @@ import { useI18n } from 'vue-i18n'
|
|||||||
import patternMaking3D from '../../model/patternMaking3D/index.vue'
|
import patternMaking3D from '../../model/patternMaking3D/index.vue'
|
||||||
import canvasUpload from "@/component/Canvas/test.vue";
|
import canvasUpload from "@/component/Canvas/test.vue";
|
||||||
import workspace from '../../workflow/workspace.vue'
|
import workspace from '../../workflow/workspace.vue'
|
||||||
|
import PrintboardUpload from '../../model/collection/PrintboardUpload.vue'
|
||||||
|
|
||||||
import { gsap, TweenMax } from "gsap";
|
import { gsap, TweenMax } from "gsap";
|
||||||
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components:{
|
components:{
|
||||||
patternMaking3D,canvasUpload,workspace
|
patternMaking3D,canvasUpload,workspace,PrintboardUpload
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
selectKey_:{
|
selectKey_:{
|
||||||
@@ -42,6 +44,7 @@ export default defineComponent({
|
|||||||
workspaceBack:inject('setBack') as any,
|
workspaceBack:inject('setBack') as any,
|
||||||
})
|
})
|
||||||
const dataDom:any = reactive({
|
const dataDom:any = reactive({
|
||||||
|
printBoard:null as any,
|
||||||
patternMaking3D:null as any,
|
patternMaking3D:null as any,
|
||||||
})
|
})
|
||||||
const open = (str:any)=>{
|
const open = (str:any)=>{
|
||||||
@@ -69,11 +72,11 @@ export default defineComponent({
|
|||||||
const getCollection = ()=>{
|
const getCollection = ()=>{
|
||||||
let value:any = {
|
let value:any = {
|
||||||
"id":data.selectObject.id,
|
"id":data.selectObject.id,
|
||||||
"moduleList":["patternMaking3D", ]
|
"moduleList":["patternMaking3D", 'printBoard']
|
||||||
}
|
}
|
||||||
Https.axiosPost(Https.httpUrls.getModuleContent,value).then(async (rv)=>{
|
Https.axiosPost(Https.httpUrls.getModuleContent,value).then(async (rv)=>{
|
||||||
historyChooseData(rv)
|
historyChooseData(rv)
|
||||||
let allBoardData = ['patternMaking3D']
|
let allBoardData = ['patternMaking3D','printBoard']
|
||||||
await setitemData(allBoardData)
|
await setitemData(allBoardData)
|
||||||
allBoardData.forEach((item)=>{
|
allBoardData.forEach((item)=>{
|
||||||
let value = {
|
let value = {
|
||||||
@@ -91,8 +94,39 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const historyChooseData = (value:any)=>{
|
const historyChooseData = (value:any)=>{
|
||||||
|
let collectionData = {
|
||||||
|
printboardFiles: dealViewChooseData(
|
||||||
|
value.printBoard,"Printboard"
|
||||||
|
),
|
||||||
|
generatePrintFiles: [],
|
||||||
|
};
|
||||||
|
store.commit("setAllBoardDataChoose", collectionData);
|
||||||
store.commit('setPatternMaking3D',value.threeDSimpleId)
|
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(()=>{
|
onMounted(()=>{
|
||||||
nextTick(()=>{
|
nextTick(()=>{
|
||||||
getCollection()
|
getCollection()
|
||||||
|
|||||||
@@ -15,9 +15,15 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="back">
|
<div class="back">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
|
<div v-show="navListData?.find((item:any) => item.value === selectKey_)?.name">
|
||||||
<i :class="[navListData?.find((item:any) => item.value === selectKey_)?.icon]"></i>
|
<i :class="[navListData?.find((item:any) => item.value === selectKey_)?.icon]"></i>
|
||||||
{{ navListData?.find((item:any) => item.value === selectKey_)?.name }}
|
{{ navListData?.find((item:any) => item.value === selectKey_)?.name }}
|
||||||
</div>
|
</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 class="text" @click="setBack()"><i class="fi fi-bs-down-left-and-up-right-to-center"></i></div>
|
||||||
</div>
|
</div>
|
||||||
<content ref="content" :selectKey_="selectKey_" @projectComplete="setBack()" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType"></content>
|
<content ref="content" :selectKey_="selectKey_" @projectComplete="setBack()" :workflowType="workflowType" :httpWorkflowType="httpWorkflowType"></content>
|
||||||
@@ -25,7 +31,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!isUpdataPorject && !selectObject.id" class="workflow">
|
<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>
|
||||||
<div class="mark_loading" v-show="isShowMark">
|
<div class="mark_loading" v-show="isShowMark">
|
||||||
<a-spin size="large" />
|
<a-spin size="large" />
|
||||||
@@ -211,8 +217,8 @@ export default defineComponent({
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
> *{
|
> *{
|
||||||
width: 100%;
|
// width: 100%;
|
||||||
height: 100%;
|
// height: 100%;
|
||||||
}
|
}
|
||||||
> .back{
|
> .back{
|
||||||
width: auto;
|
width: auto;
|
||||||
@@ -224,16 +230,20 @@ export default defineComponent({
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
> i{
|
> div{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
i{
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-right: 1rem;
|
margin-right: 1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
> .text{
|
> .text{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
> i{
|
i{
|
||||||
font-size: 3rem;
|
font-size: 3rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,10 @@
|
|||||||
<i :class="item.icon"></i>
|
<i :class="item.icon"></i>
|
||||||
<span v-show="isUnfold">{{ item.name }}</span>
|
<span v-show="isUnfold">{{ item.name }}</span>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="workspace">
|
<div class="workspace">
|
||||||
<div class="workspaceBox">
|
<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="projectName marginBottom" v-if="show.title">
|
||||||
<div class="text">Project name: <span style="color: red;">*</span></div>
|
<div class="text">Project name: <span style="color: red;">*</span></div>
|
||||||
<div class="input">
|
<div class="input">
|
||||||
@@ -9,7 +12,7 @@
|
|||||||
<!-- <i class="fi fi-rr-edit"></i> -->
|
<!-- <i class="fi fi-rr-edit"></i> -->
|
||||||
</div>
|
</div>
|
||||||
</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="text">Age</div>
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<label>
|
<label>
|
||||||
@@ -92,6 +95,10 @@ export default defineComponent({
|
|||||||
httpWorkflowType:{
|
httpWorkflowType:{
|
||||||
type:String,
|
type:String,
|
||||||
default:''
|
default:''
|
||||||
|
},
|
||||||
|
firstTime:{
|
||||||
|
type:Boolean,
|
||||||
|
default:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
emits:['setProject'],
|
emits:['setProject'],
|
||||||
@@ -108,6 +115,7 @@ export default defineComponent({
|
|||||||
title:true,
|
title:true,
|
||||||
gender:false,
|
gender:false,
|
||||||
style:false,
|
style:false,
|
||||||
|
age:false,
|
||||||
systemDesigner:false,
|
systemDesigner:false,
|
||||||
position:false,
|
position:false,
|
||||||
},
|
},
|
||||||
@@ -192,11 +200,20 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
const openSetData = ()=>{
|
const openSetData = ()=>{
|
||||||
|
|
||||||
|
}
|
||||||
|
const setBack = ()=>{
|
||||||
|
let data = {
|
||||||
|
type:'',
|
||||||
|
httpType:'',//项目类型
|
||||||
|
}
|
||||||
|
store.commit('setProbject',data)
|
||||||
|
store.commit('setProjectList',[])
|
||||||
}
|
}
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
data.selectObject = JSON.parse(JSON.stringify(data.selectObject_))
|
data.selectObject = JSON.parse(JSON.stringify(data.selectObject_))
|
||||||
data.show.gender = (props.workflowType == 'seriesDesign' || props.workflowType == 'singleProductDesign' || props.workflowType == 'printingDesign3D')
|
data.show.gender = (props.workflowType == 'seriesDesign' || props.workflowType == 'singleProductDesign' || props.workflowType == 'printingDesign3D')
|
||||||
data.show.style = (props.workflowType == 'seriesDesign' || props.workflowType == 'singleProductDesign')
|
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.systemDesigner = (props.workflowType == 'seriesDesign' || props.workflowType == 'singleProductDesign')
|
||||||
data.show.position = (props.workflowType == 'singleProductDesign')
|
data.show.position = (props.workflowType == 'singleProductDesign')
|
||||||
|
|
||||||
@@ -237,6 +254,7 @@ export default defineComponent({
|
|||||||
formatter,
|
formatter,
|
||||||
complete,
|
complete,
|
||||||
openSetData,
|
openSetData,
|
||||||
|
setBack,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,18 @@
|
|||||||
{{ $t('Renew.Yearly') }}
|
{{ $t('Renew.Yearly') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</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="type payment">
|
||||||
<div class="text">{{ $t('Renew.Payment') }}:</div>
|
<div class="text">{{ $t('Renew.Payment') }}:</div>
|
||||||
<label>
|
<label>
|
||||||
@@ -134,6 +146,12 @@ export default defineComponent({
|
|||||||
isShowMark_:false,
|
isShowMark_:false,
|
||||||
})
|
})
|
||||||
let renewData = reactive({
|
let renewData = reactive({
|
||||||
|
promotionData:{
|
||||||
|
code:'',
|
||||||
|
error:'',
|
||||||
|
str:'',
|
||||||
|
oldPrice:'',
|
||||||
|
},
|
||||||
personage:computed(()=>{
|
personage:computed(()=>{
|
||||||
return {
|
return {
|
||||||
title:t('Renew.PersonalVersion'),
|
title:t('Renew.PersonalVersion'),
|
||||||
@@ -233,6 +251,7 @@ export default defineComponent({
|
|||||||
returnUrl:url,
|
returnUrl:url,
|
||||||
subscribeType:subscribeType,//yearly为年费,monthly为月费
|
subscribeType:subscribeType,//yearly为年费,monthly为月费
|
||||||
wallet:'ALIPAYHK',
|
wallet:'ALIPAYHK',
|
||||||
|
promotionCode:renewData.promotionData.code,
|
||||||
}
|
}
|
||||||
let httpsUrl = Https.httpUrls.payStripe
|
let httpsUrl = Https.httpUrls.payStripe
|
||||||
payMethodData.isShowMark_ = true
|
payMethodData.isShowMark_ = true
|
||||||
@@ -269,6 +288,38 @@ export default defineComponent({
|
|||||||
renew.renewModel = false
|
renew.renewModel = false
|
||||||
setPaidBack()
|
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{
|
return{
|
||||||
store,
|
store,
|
||||||
...toRefs(renew),
|
...toRefs(renew),
|
||||||
@@ -281,6 +332,8 @@ export default defineComponent({
|
|||||||
payment,
|
payment,
|
||||||
setPaidBack,
|
setPaidBack,
|
||||||
completePayment,
|
completePayment,
|
||||||
|
examine,
|
||||||
|
clearPromotionCode,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -334,6 +387,41 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
.type{
|
.type{
|
||||||
display: flex;
|
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{
|
> .text{
|
||||||
margin-right: 2rem;
|
margin-right: 2rem;
|
||||||
// font-weight: 600;
|
// font-weight: 600;
|
||||||
|
|||||||
@@ -64,12 +64,23 @@
|
|||||||
<div style="margin-left:2rem;" @click="deleteBatchPic" class="gallery_btn">Delete</div>
|
<div style="margin-left:2rem;" @click="deleteBatchPic" class="gallery_btn">Delete</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="imgBox">
|
<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="">
|
<img :src="item.url" alt="">
|
||||||
<i class="fi fi-rr-trash icon_delete" @click="deleteSinglePic(item,index)"></i>
|
<i class="fi fi-rr-trash icon_delete" @click="deleteSinglePic(item,index)"></i>
|
||||||
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- <div class="total">
|
||||||
<div class="total">
|
|
||||||
<a-pagination
|
<a-pagination
|
||||||
v-model:current="currentPage"
|
v-model:current="currentPage"
|
||||||
v-model:pageSize="pageSize"
|
v-model:pageSize="pageSize"
|
||||||
@@ -78,11 +89,11 @@
|
|||||||
:showSizeChanger="false"
|
:showSizeChanger="false"
|
||||||
@change="changePage"
|
@change="changePage"
|
||||||
/>
|
/>
|
||||||
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- <div class="mark_loading" v-show="isShowMark">
|
||||||
<div class="mark_loading" v-show="isShowMark">
|
|
||||||
<a-spin size="large" />
|
<a-spin size="large" />
|
||||||
</div>
|
</div> -->
|
||||||
<Cropper ref="Cropper" @handleCropperSuccess="handleCropperSuccess" :cropperFileData="cropperFileData" :isRound="true"></Cropper>
|
<Cropper ref="Cropper" @handleCropperSuccess="handleCropperSuccess" :cropperFileData="cropperFileData" :isRound="true"></Cropper>
|
||||||
<!-- <loadBrandDNA ref="loadBrandDNA"></loadBrandDNA> -->
|
<!-- <loadBrandDNA ref="loadBrandDNA"></loadBrandDNA> -->
|
||||||
</div>
|
</div>
|
||||||
@@ -97,10 +108,12 @@ import { useI18n } from 'vue-i18n'
|
|||||||
import Cropper from '@/component/HomePage/Cropper.vue'
|
import Cropper from '@/component/HomePage/Cropper.vue'
|
||||||
// import loadBrandDNA from '@/component/LibraryPage/loadBrandDNA.vue'
|
// import loadBrandDNA from '@/component/LibraryPage/loadBrandDNA.vue'
|
||||||
import { getCookie } from "@/tool/cookie";
|
import { getCookie } from "@/tool/cookie";
|
||||||
|
import Falls from "@/component/WorksPage/Falls.vue";
|
||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components:{
|
components:{
|
||||||
Cropper
|
Cropper,Falls
|
||||||
},
|
},
|
||||||
|
|
||||||
emits:['update:isShowMark','handleBack'],
|
emits:['update:isShowMark','handleBack'],
|
||||||
@@ -135,14 +148,17 @@ export default defineComponent({
|
|||||||
schedule:{
|
schedule:{
|
||||||
num:0,
|
num:0,
|
||||||
state:false
|
state:false
|
||||||
}
|
},
|
||||||
|
isNoData:false,//如果数据为空就不加载
|
||||||
|
isNull:true,
|
||||||
})
|
})
|
||||||
const dataDom = reactive({
|
const dataDom = reactive({
|
||||||
Cropper:null as any,
|
Cropper:null as any,
|
||||||
|
fall:null as any,
|
||||||
loadBrandDNA:null as any,
|
loadBrandDNA:null as any,
|
||||||
|
loadingDom:null as any,
|
||||||
})
|
})
|
||||||
const customRequest = (event:any)=>{
|
const customRequest = (event:any)=>{
|
||||||
console.log(data.detail)
|
|
||||||
let new_data = {
|
let new_data = {
|
||||||
file:event.file,
|
file:event.file,
|
||||||
brandId:data.detail.id,
|
brandId:data.detail.id,
|
||||||
@@ -150,11 +166,13 @@ export default defineComponent({
|
|||||||
data.isShowMark = true
|
data.isShowMark = true
|
||||||
Https.axiosPost(Https.httpUrls.brandDNAUpload, new_data,{headers:{'Content-Type': 'multipart/form-data'}}).then(
|
Https.axiosPost(Https.httpUrls.brandDNAUpload, new_data,{headers:{'Content-Type': 'multipart/form-data'}}).then(
|
||||||
(rv: any) => {
|
(rv: any) => {
|
||||||
getLibraryList()
|
// getLibraryList()
|
||||||
|
rv.canvasUrl = rv.minIOPath
|
||||||
|
dataDom.fall.push([rv]);
|
||||||
data.isShowMark = false
|
data.isShowMark = false
|
||||||
}
|
}
|
||||||
).catch((res)=>{
|
).catch((res)=>{
|
||||||
getLibraryList()
|
// getLibraryList()
|
||||||
data.isShowMark = false
|
data.isShowMark = false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -187,16 +205,39 @@ export default defineComponent({
|
|||||||
brandId:data.detail.id,
|
brandId:data.detail.id,
|
||||||
// intersection:intersection.value,
|
// intersection:intersection.value,
|
||||||
}
|
}
|
||||||
|
if(data.isShowMark && !data.isNoData)return
|
||||||
data.isShowMark = true
|
data.isShowMark = true
|
||||||
Https.axiosPost(Https.httpUrls.queryLibraryPage,value).then(
|
Https.axiosPost(Https.httpUrls.queryLibraryPage,value)
|
||||||
(rv: any) => {
|
.then((rv) => {
|
||||||
data.imgList = rv.content
|
if(value.page == 1 && rv.content.length == 0){
|
||||||
data.total = rv.total
|
data.isNull = true
|
||||||
data.isShowMark = false
|
}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
|
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)=>{
|
let beforeUpload=(file:any,fileList:any)=>{
|
||||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/bmp';
|
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
|
data.minioUrl = value.brandLogo
|
||||||
clearInterval(data.getProgressTime)
|
clearInterval(data.getProgressTime)
|
||||||
getProgress()
|
getProgress()
|
||||||
|
// 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()
|
getLibraryList()
|
||||||
// emit("update:isShowMark",true)
|
},
|
||||||
// setTimeout(()=>{
|
// { root:worksPage }
|
||||||
// emit("update:isShowMark",false)
|
).observe(dataDom.loadingDom);
|
||||||
// },2000)
|
|
||||||
}
|
}
|
||||||
const back = ()=>{
|
const back = ()=>{
|
||||||
clearInterval(data.getProgressTime)
|
clearInterval(data.getProgressTime)
|
||||||
@@ -369,6 +421,9 @@ export default defineComponent({
|
|||||||
deleteSinglePic,
|
deleteSinglePic,
|
||||||
selectImg,
|
selectImg,
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
directives:{
|
||||||
|
|
||||||
},
|
},
|
||||||
provide() {
|
provide() {
|
||||||
return {
|
return {
|
||||||
@@ -481,6 +536,14 @@ export default defineComponent({
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-content: flex-start;
|
align-content: flex-start;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
overflow-y: auto;
|
||||||
|
> .imgNull{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
> .imgItem{
|
> .imgItem{
|
||||||
width: 100px;
|
width: 100px;
|
||||||
margin: 1rem;
|
margin: 1rem;
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ export default defineComponent({
|
|||||||
httpsUrl = Https.httpUrls.payPaypal
|
httpsUrl = Https.httpUrls.payPaypal
|
||||||
}else if (payMethodData.modeOfPayment == 'stripe') {
|
}else if (payMethodData.modeOfPayment == 'stripe') {
|
||||||
httpsUrl = Https.httpUrls.payStripe
|
httpsUrl = Https.httpUrls.payStripe
|
||||||
|
// data.
|
||||||
}else{
|
}else{
|
||||||
httpsUrl = Https.httpUrls.payAlipayHK
|
httpsUrl = Https.httpUrls.payAlipayHK
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 文字 -->
|
<!-- 文字 -->
|
||||||
<div class="falls_item_bottom">
|
<div class="falls_item_bottom" v-if="isText">
|
||||||
<div class="falls_item_text" :title="item.text">
|
<div class="falls_item_text" :title="item.text">
|
||||||
{{item.text}}
|
{{item.text}}
|
||||||
</div>
|
</div>
|
||||||
@@ -58,7 +58,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -72,6 +71,14 @@ export default defineComponent({
|
|||||||
type:Boolean,
|
type:Boolean,
|
||||||
default:true,
|
default:true,
|
||||||
},
|
},
|
||||||
|
isText:{
|
||||||
|
type:Boolean,
|
||||||
|
default:true,
|
||||||
|
},
|
||||||
|
itemWidth:{
|
||||||
|
type:Number,
|
||||||
|
default:300,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
setup(){
|
setup(){
|
||||||
let list = ref([])
|
let list = ref([])
|
||||||
@@ -139,7 +146,9 @@ export default defineComponent({
|
|||||||
const textMarginTop = domCss.getPropertyValue('--textMarginTop').split('px')[0]*1;
|
const textMarginTop = domCss.getPropertyValue('--textMarginTop').split('px')[0]*1;
|
||||||
const textHeight = domCss.getPropertyValue('--textHeight').split('px')[0]*1;
|
const textHeight = domCss.getPropertyValue('--textHeight').split('px')[0]*1;
|
||||||
const contentHeight = domCss.getPropertyValue('--contentHeight').split('px')[0]*1;
|
const contentHeight = domCss.getPropertyValue('--contentHeight').split('px')[0]*1;
|
||||||
|
if(this.$props.isText){
|
||||||
this.computedHeight = paddingBottom + textMarginTop + textHeight + contentHeight;
|
this.computedHeight = paddingBottom + textMarginTop + textHeight + contentHeight;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
this.wait_list = []
|
this.wait_list = []
|
||||||
@@ -149,7 +158,7 @@ export default defineComponent({
|
|||||||
methods: {
|
methods: {
|
||||||
clearData(){
|
clearData(){
|
||||||
this.wait_list = []
|
this.wait_list = []
|
||||||
this.width = 300
|
this.width = this.itemWidth
|
||||||
this.num_x = 1
|
this.num_x = 1
|
||||||
this.gap_x = 0
|
this.gap_x = 0
|
||||||
this.gap_y = 0
|
this.gap_y = 0
|
||||||
@@ -185,12 +194,12 @@ export default defineComponent({
|
|||||||
return;
|
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]
|
let data = this.wait_list[0]
|
||||||
this.imgDom = document.createElement("img");
|
this.imgDom = document.createElement("img");
|
||||||
this.imgDom.src = url;
|
this.imgDom.src = url;
|
||||||
this.imgDom.style.width = this.width + "px";
|
this.imgDom.style.width = this.itemWidth + "px";
|
||||||
this.imgDom.style.maxHeight = this.width+330 + "px";
|
this.imgDom.style.maxHeight = this.itemWidth+330 + "px";
|
||||||
this.imgDom.style.position = "absolute";
|
this.imgDom.style.position = "absolute";
|
||||||
this.imgDom.style.top = "-99999px";
|
this.imgDom.style.top = "-99999px";
|
||||||
document.body.appendChild(this.imgDom);
|
document.body.appendChild(this.imgDom);
|
||||||
@@ -204,6 +213,7 @@ export default defineComponent({
|
|||||||
pos_num = this.poss[i];
|
pos_num = this.poss[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// this.computedHeight = 0
|
||||||
let width = this.imgDom.offsetWidth;
|
let width = this.imgDom.offsetWidth;
|
||||||
let height = this.imgDom.offsetHeight+this.computedHeight;
|
let height = this.imgDom.offsetHeight+this.computedHeight;
|
||||||
let top = this.poss[idx] + this.gap_y;
|
let top = this.poss[idx] + this.gap_y;
|
||||||
@@ -230,8 +240,9 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
resize() {
|
resize() {
|
||||||
|
nextTick(() => {
|
||||||
var t_width = this.$el.offsetWidth;
|
var t_width = this.$el.offsetWidth;
|
||||||
var width = this.width;
|
var width = this.itemWidth;
|
||||||
var num_x = parseInt(t_width / (width + 20));
|
var num_x = parseInt(t_width / (width + 20));
|
||||||
if (num_x < 1) num_x = 1;
|
if (num_x < 1) num_x = 1;
|
||||||
var remain = t_width - width * num_x;
|
var remain = t_width - width * num_x;
|
||||||
@@ -243,6 +254,8 @@ export default defineComponent({
|
|||||||
for (var i = 0; i < num_x; i++) poss.push(0);
|
for (var i = 0; i < num_x; i++) poss.push(0);
|
||||||
this.poss = poss;
|
this.poss = poss;
|
||||||
this.reset();
|
this.reset();
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
for (let i = 0; i < this.list.length; i++) {
|
for (let i = 0; i < this.list.length; i++) {
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
<img v-for="item in scaleImageData?.designPythonOutfitList" v-lazy="item.designUrl">
|
<img v-for="item in scaleImageData?.designPythonOutfitList" v-lazy="item.designUrl">
|
||||||
</div>
|
</div>
|
||||||
</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 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>
|
||||||
<div v-else class="newScaleImage_right_content_generate">
|
<div v-else class="newScaleImage_right_content_generate">
|
||||||
@@ -408,7 +408,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
let setChoose = () =>{
|
let setChoose = () =>{
|
||||||
if(userDetail.value.systemUser !== 1){
|
if(userDetail.value.systemList.indexOf(1) == -1){
|
||||||
return message.info(t('newScaleImage.jsContent1'))
|
return message.info(t('newScaleImage.jsContent1'))
|
||||||
}
|
}
|
||||||
if(imgData.scaleImageData.openSource == 0){
|
if(imgData.scaleImageData.openSource == 0){
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<a-spin v-else size="large" class="content_img_flex"></a-spin>
|
<a-spin v-else size="large" class="content_img_flex"></a-spin>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<div class="like" v-if="item.url" @click.stop="()=>$emit('setBtn',item.id,'like')">
|
<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>
|
||||||
<div class="down" v-if="isVideo && item.url" @click.stop="down(item)">
|
<div class="down" v-if="isVideo && item.url" @click.stop="down(item)">
|
||||||
<i class="fi fi-ss-down-to-line"></i>
|
<i class="fi fi-ss-down-to-line"></i>
|
||||||
@@ -49,6 +49,7 @@ export default defineComponent({
|
|||||||
list:{type:Array,default:()=>[]},
|
list:{type:Array,default:()=>[]},
|
||||||
isVideo:{type:Boolean,default:false},
|
isVideo:{type:Boolean,default:false},
|
||||||
showMark:{type:Boolean,default:false},
|
showMark:{type:Boolean,default:false},
|
||||||
|
isLike:{type:Boolean,default:false},
|
||||||
},
|
},
|
||||||
emits:['setBtn','setSort'],
|
emits:['setBtn','setSort'],
|
||||||
setup(props,{emit}) {
|
setup(props,{emit}) {
|
||||||
@@ -351,6 +352,9 @@ export default defineComponent({
|
|||||||
i{
|
i{
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: 3rem;
|
font-size: 3rem;
|
||||||
|
&.srLike{
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&:hover{
|
&:hover{
|
||||||
|
|||||||
@@ -692,6 +692,9 @@ export default {
|
|||||||
Renew:{
|
Renew:{
|
||||||
title:'根据您的需求选择最佳计划',
|
title:'根据您的需求选择最佳计划',
|
||||||
Monthly:'月付',
|
Monthly:'月付',
|
||||||
|
promotionCode:'优惠码',
|
||||||
|
use:'应用',
|
||||||
|
PromoCodeError:'请检查优惠码是否正确或者是否过期',
|
||||||
Yearly:'年付',
|
Yearly:'年付',
|
||||||
CreditCard:'信用卡',
|
CreditCard:'信用卡',
|
||||||
Alipay:'支付宝',
|
Alipay:'支付宝',
|
||||||
|
|||||||
@@ -692,6 +692,9 @@ export default {
|
|||||||
title:'Select The Best Plan For Your Needs',
|
title:'Select The Best Plan For Your Needs',
|
||||||
Monthly:'Monthly',
|
Monthly:'Monthly',
|
||||||
Yearly:'Yearly',
|
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',
|
CreditCard:'Credit Card',
|
||||||
Alipay:'Alipay',
|
Alipay:'Alipay',
|
||||||
Payment:'Payment method',
|
Payment:'Payment method',
|
||||||
|
|||||||
@@ -22,6 +22,16 @@ const routes: Array<RouteRecordRaw> = [
|
|||||||
name: 'login',
|
name: 'login',
|
||||||
meta:{enter:'all',},
|
meta:{enter:'all',},
|
||||||
component: _import('LoginPage')
|
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',
|
path: '/test',
|
||||||
@@ -183,18 +193,19 @@ const routes: Array<RouteRecordRaw> = [
|
|||||||
meta:{enter:3,},
|
meta:{enter:3,},
|
||||||
component: _import('Administrator'),
|
component: _import('Administrator'),
|
||||||
children:[
|
children:[
|
||||||
{
|
|
||||||
path: "",
|
|
||||||
name:'adminChil',
|
|
||||||
meta:{enter:3,},
|
|
||||||
redirect: "/administrator/allUser"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path:'allUser',
|
path:'allUser',
|
||||||
name:'allUser',
|
name:'allUser',
|
||||||
meta:{enter:3,},
|
meta:{enter:3,},
|
||||||
component: _import_component('Administrator/allUser.vue'),
|
component: _import_component('Administrator/allUser.vue'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path:'coupons',
|
||||||
|
name:'coupons',
|
||||||
|
meta:{enter:3,},
|
||||||
|
component: _import_component('Administrator/coupons/index.vue'),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path:'testClickData',
|
path:'testClickData',
|
||||||
name:'testClickData',
|
name:'testClickData',
|
||||||
@@ -262,6 +273,36 @@ const routes: Array<RouteRecordRaw> = [
|
|||||||
meta:{enter:3,},
|
meta:{enter:3,},
|
||||||
component: _import_component('Administrator/Transaction/TransactionTable.vue'),
|
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,
|
allUserList:any,
|
||||||
city:any,
|
city:any,
|
||||||
country:any,
|
country:any,
|
||||||
|
allGenerateType:any,
|
||||||
}
|
}
|
||||||
|
|
||||||
const adminPage : Module<DesignDetail,RootState> = {
|
const adminPage : Module<DesignDetail,RootState> = {
|
||||||
@@ -12,6 +13,7 @@ const adminPage : Module<DesignDetail,RootState> = {
|
|||||||
allUserList:[],
|
allUserList:[],
|
||||||
city:[],
|
city:[],
|
||||||
country:[],
|
country:[],
|
||||||
|
allGenerateType:[],
|
||||||
},
|
},
|
||||||
mutations:{
|
mutations:{
|
||||||
setAllUserList(state,files){
|
setAllUserList(state,files){
|
||||||
@@ -32,6 +34,14 @@ const adminPage : Module<DesignDetail,RootState> = {
|
|||||||
value:item,
|
value:item,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
setAllGenerateType(state,files){
|
||||||
|
files.forEach((item:any) => {
|
||||||
|
state.allGenerateType.push({
|
||||||
|
label:item,
|
||||||
|
value:item,
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
actions:{
|
actions:{
|
||||||
|
|||||||
@@ -259,9 +259,12 @@ const userHabit : Module<UserHabit,RootState> = {
|
|||||||
state.userDetail.systemList = []
|
state.userDetail.systemList = []
|
||||||
if(data.systemUser != 0)state.userDetail.systemList.push(1)
|
if(data.systemUser != 0)state.userDetail.systemList.push(1)
|
||||||
if(data.affiliate)state.userDetail.systemList.push(2)
|
if(data.affiliate)state.userDetail.systemList.push(2)
|
||||||
|
|
||||||
let adminIdList = [88,6,46,31,73,83,87,4,11482,11630,12201,12592]
|
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(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.followeeCount = data.followeeCount//粉丝数量
|
||||||
state.userDetail.followerCount = data.followerCount//关注数量
|
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){//初始化
|
async canvasInit (dom, val,img,editGroupImg,data,exportWidth = -1){//初始化
|
||||||
// let {erasable} = data
|
// let {erasable} = data
|
||||||
// this.canvasClear()
|
// this.canvasClear()
|
||||||
console.log(exportWidth)
|
|
||||||
this.exportData.width = exportWidth
|
this.exportData.width = exportWidth
|
||||||
this.canvasWH={
|
this.canvasWH={
|
||||||
width:val.width,
|
width:val.width,
|
||||||
@@ -1033,28 +1032,28 @@ class MyCanvas {
|
|||||||
cloned._objects = cloned._objects.filter(item => item.type == 'image')
|
cloned._objects = cloned._objects.filter(item => item.type == 'image')
|
||||||
}
|
}
|
||||||
if(this.exportData.width != -1){
|
if(this.exportData.width != -1){
|
||||||
if (cloned.type !== 'image') {
|
if (cloned.type !== 'image' || cloned.type !== 'group') {
|
||||||
cloned.set({
|
cloned.set({
|
||||||
left: scaleXY?.scale?cloned.left * scaleXY?.scale:cloned.left - xy.x,
|
left: scaleXY?.scale?cloned.left * scaleXY?.scale:cloned.left - xy.x,
|
||||||
top: scaleXY?.scale?cloned.top * scaleXY?.scale:cloned.top - xy.y,
|
top: scaleXY?.scale?cloned.top * scaleXY?.scale:cloned.top - xy.y,
|
||||||
scaleX: cloned.scaleX * scaleXY?.scale?scaleXY?.scale:1,
|
scaleX: cloned.scaleX * (scaleXY?.scale?scaleXY?.scale:1),
|
||||||
scaleY: cloned.scaleY * scaleXY?.scale?scaleXY?.scale:1
|
scaleY: cloned.scaleY * (scaleXY?.scale?scaleXY?.scale:1)
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// 对图片对象单独处理:重新计算图片的缩放
|
// 对图片对象单独处理:重新计算图片的缩放
|
||||||
cloned.set({
|
cloned.set({
|
||||||
left: scaleXY?.scale?cloned.left * scaleXY?.scale:cloned.left - xy.x,
|
left: scaleXY?.scale?cloned.left * scaleXY?.scale:cloned.left - xy.x,
|
||||||
top: scaleXY?.scale?cloned.top * scaleXY?.scale:cloned.top - xy.y,
|
top: scaleXY?.scale?cloned.top * scaleXY?.scale:cloned.top - xy.y,
|
||||||
scaleX: cloned.scaleX * scaleXY?.scale?scaleXY?.scale:1, // 根据原有 scaleX 进行缩放
|
scaleX: cloned.scaleX * (scaleXY?.scale?scaleXY?.scale:1), // 根据原有 scaleX 进行缩放
|
||||||
scaleY: cloned.scaleY * scaleXY?.scale?scaleXY?.scale:1 // 根据原有 scaleY 进行缩放
|
scaleY: cloned.scaleY * (scaleXY?.scale?scaleXY?.scale:1) // 根据原有 scaleY 进行缩放
|
||||||
});
|
});
|
||||||
|
|
||||||
// 确保图片的尺寸缩放是基于原始宽高和当前缩放
|
// 确保图片的尺寸缩放是基于原始宽高和当前缩放
|
||||||
var originalWidth = cloned.width * cloned.scaleX; // 原始宽度 * 当前缩放
|
var originalWidth = cloned.width * cloned.scaleX; // 原始宽度 * 当前缩放
|
||||||
var originalHeight = cloned.height * cloned.scaleY; // 原始高度 * 当前缩放
|
var originalHeight = cloned.height * cloned.scaleY; // 原始高度 * 当前缩放
|
||||||
cloned.set({
|
cloned.set({
|
||||||
width: originalWidth * scaleXY?.scale?scaleXY?.scale:1, // 调整后的宽度
|
width: originalWidth * (scaleXY?.scale?scaleXY?.scale:1), // 调整后的宽度
|
||||||
height: originalHeight * scaleXY?.scale?scaleXY?.scale:1 // 调整后的高度
|
height: originalHeight * (scaleXY?.scale?scaleXY?.scale:1) // 调整后的高度
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
@@ -1063,7 +1062,6 @@ class MyCanvas {
|
|||||||
top: (cloned.top - xy.y),
|
top: (cloned.top - xy.y),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cloned.custom?.layerId != -1){
|
if(cloned.custom?.layerId != -1){
|
||||||
temporar.add(cloned)
|
temporar.add(cloned)
|
||||||
}
|
}
|
||||||
@@ -1218,7 +1216,6 @@ class MyCanvas {
|
|||||||
this.setPencilWidth()
|
this.setPencilWidth()
|
||||||
}
|
}
|
||||||
async addImage (imgData){
|
async addImage (imgData){
|
||||||
console.log(imgData)
|
|
||||||
if(!imgData.imgUrl)imgData.imgUrl = imgData.url
|
if(!imgData.imgUrl)imgData.imgUrl = imgData.url
|
||||||
let img = await this.createImage(imgData)
|
let img = await this.createImage(imgData)
|
||||||
let position = {
|
let position = {
|
||||||
@@ -1234,7 +1231,6 @@ class MyCanvas {
|
|||||||
// minioUrl:getMinioUrl(imgData.url)
|
// minioUrl:getMinioUrl(imgData.url)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
console.log(this.exportData.width)
|
|
||||||
if(this.exportData.width != -1)await this.createLayer({})
|
if(this.exportData.width != -1)await this.createLayer({})
|
||||||
// if(this.dashed.isDetail)await this.createLayer({})
|
// if(this.dashed.isDetail)await this.createLayer({})
|
||||||
this.setCanvasImage(img,position,"upImgFiles",imgData)
|
this.setCanvasImage(img,position,"upImgFiles",imgData)
|
||||||
@@ -1245,7 +1241,8 @@ class MyCanvas {
|
|||||||
img.set({
|
img.set({
|
||||||
hasControls: true,
|
hasControls: true,
|
||||||
})
|
})
|
||||||
img.minioUrl=getMinioUrl(imgData.imgUrl || imgData.minioUrl)
|
let url = imgData.imgUrl || imgData.minioUrl
|
||||||
|
img.minioUrl=getMinioUrl(url)
|
||||||
resolve(img)
|
resolve(img)
|
||||||
},{ crossOrigin: "Anonymous" })
|
},{ crossOrigin: "Anonymous" })
|
||||||
})
|
})
|
||||||
@@ -2044,7 +2041,6 @@ class MyCanvas {
|
|||||||
// MyCanvas?.[this.id].add(img)
|
// MyCanvas?.[this.id].add(img)
|
||||||
// }
|
// }
|
||||||
}else{
|
}else{
|
||||||
console.log(v,'add')
|
|
||||||
MyCanvas?.[this.id].add(v)
|
MyCanvas?.[this.id].add(v)
|
||||||
}
|
}
|
||||||
if(index == elements.length - 1){
|
if(index == elements.length - 1){
|
||||||
@@ -2218,12 +2214,15 @@ class MyCanvas {
|
|||||||
texture:0,
|
texture:0,
|
||||||
}
|
}
|
||||||
this.operation = 'movePosition'
|
this.operation = 'movePosition'
|
||||||
|
this.clearEvent()
|
||||||
|
delete MyCanvas[this.id]
|
||||||
|
// MyCanvas[this.id] = null
|
||||||
|
}
|
||||||
|
clearEvent(){
|
||||||
document.removeEventListener("keydown", this.canvasKeyDown);
|
document.removeEventListener("keydown", this.canvasKeyDown);
|
||||||
document.removeEventListener("keyup", this.canvasKeyUp);
|
document.removeEventListener("keyup", this.canvasKeyUp);
|
||||||
document.removeEventListener('mousemove', this.mouseMove);
|
document.removeEventListener('mousemove', this.mouseMove);
|
||||||
document.removeEventListener('touchmove', this.touchmove);
|
document.removeEventListener('touchmove', this.touchmove);
|
||||||
delete MyCanvas[this.id]
|
|
||||||
// MyCanvas[this.id] = null
|
|
||||||
}
|
}
|
||||||
//删除选中元素
|
//删除选中元素
|
||||||
deleteObject(){
|
deleteObject(){
|
||||||
@@ -2292,7 +2291,6 @@ class MyCanvas {
|
|||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
this._clipboard = copyObj;
|
this._clipboard = copyObj;
|
||||||
}
|
}
|
||||||
paste(){//粘贴
|
paste(){//粘贴
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ axios.interceptors.request.use((config) => {
|
|||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
});
|
});
|
||||||
let isLoginTime = false
|
let isLoginTime = false
|
||||||
const binaryToUrl = (binary,type = 'application/octet-stream')=>{
|
const binaryToUrl = (binary,type = 'application/octet-stream',res)=>{
|
||||||
let blob = new Blob([binary], {type});
|
let blob = new Blob([binary], {'content-type':res.headers['content-type']});
|
||||||
let url = URL.createObjectURL(blob);
|
let url = URL.createObjectURL(blob);
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
@@ -68,7 +68,7 @@ axios.interceptors.response.use((res) =>{
|
|||||||
// return Promise.reject(res.data);
|
// return Promise.reject(res.data);
|
||||||
// }else
|
// }else
|
||||||
if(res.config.env.binary){
|
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})
|
return Promise.resolve({url,data:res.data})
|
||||||
}
|
}
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
@@ -137,6 +137,7 @@ export const Https = {
|
|||||||
parseWeChatCode:'/api/third/party/parseWeChatCode',//微信登录
|
parseWeChatCode:'/api/third/party/parseWeChatCode',//微信登录
|
||||||
accountIsLogin:'/api/account/isLogin', //判断用户是否登录
|
accountIsLogin:'/api/account/isLogin', //判断用户是否登录
|
||||||
accountLogin:`/api/account/login`, //账号密码登录接口
|
accountLogin:`/api/account/login`, //账号密码登录接口
|
||||||
|
organizationNameSearch:`/api/account/organizationNameSearch`, //查询学校或者企业版名字
|
||||||
getUserLanguage:`/api/account/getUserLanguage`, //获取当前用户语言
|
getUserLanguage:`/api/account/getUserLanguage`, //获取当前用户语言
|
||||||
changeUserLanguage:`/api/account/changeUserLanguage`, //切换用户当前语言
|
changeUserLanguage:`/api/account/changeUserLanguage`, //切换用户当前语言
|
||||||
uploadAvatar:`/api/account/uploadAvatar`, //修改头像
|
uploadAvatar:`/api/account/uploadAvatar`, //修改头像
|
||||||
@@ -286,6 +287,9 @@ export const Https = {
|
|||||||
modifySketch:'/api/generate/modifySketch',//修改画布内容并且储存
|
modifySketch:'/api/generate/modifySketch',//修改画布内容并且储存
|
||||||
|
|
||||||
elementUpload:`/api/element/upload`,//上传图片
|
elementUpload:`/api/element/upload`,//上传图片
|
||||||
|
imageSegmentation:`/api/element/imageSegmentation`,//分割衣服
|
||||||
|
|
||||||
|
|
||||||
// oldHis:`/oldHis/history/queryUserGroup`,//上传图片
|
// oldHis:`/oldHis/history/queryUserGroup`,//上传图片
|
||||||
sketchBoardsBoundingBox:`/api/design/sketchBoardsBoundingBox`,//裁剪sketch图片
|
sketchBoardsBoundingBox:`/api/design/sketchBoardsBoundingBox`,//裁剪sketch图片
|
||||||
|
|
||||||
@@ -302,6 +306,20 @@ export const Https = {
|
|||||||
getUserInfo:`/api/inquiry/getUserInfo`,//查询所有用户
|
getUserInfo:`/api/inquiry/getUserInfo`,//查询所有用户
|
||||||
queryTransaction:`/api/inquiry/queryTransaction`,//查询交易记录
|
queryTransaction:`/api/inquiry/queryTransaction`,//查询交易记录
|
||||||
queryTransactionDownload:`/api/inquiry/queryTransaction/download`,//导出交易记录
|
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点击次数
|
//查询某个时间内design点击次数
|
||||||
getDesignStatistic:`/api/inquiry/getDesignStatistic`,//拒绝审批
|
getDesignStatistic:`/api/inquiry/getDesignStatistic`,//拒绝审批
|
||||||
getAllQuestionnaire:`/api/inquiry/getAllQuestionnaire`,//拒绝审批
|
getAllQuestionnaire:`/api/inquiry/getAllQuestionnaire`,//拒绝审批
|
||||||
|
|||||||
@@ -196,14 +196,14 @@ const projectList = {
|
|||||||
],
|
],
|
||||||
printingDesign3D:[
|
printingDesign3D:[
|
||||||
{
|
{
|
||||||
|
icon:'fi fi-rs-objects-column',
|
||||||
|
value:'printBoard',
|
||||||
|
name:'Printboard',
|
||||||
|
task:'1-1',
|
||||||
|
},{
|
||||||
icon:'fi fi-rr-cubes',
|
icon:'fi fi-rr-cubes',
|
||||||
value:'patternMaking3D',
|
value:'patternMaking3D',
|
||||||
name:'3D Pattern Making',
|
name:'3D Pattern Making',
|
||||||
task:'1-1',
|
|
||||||
},{
|
|
||||||
icon:'fi fi-br-download',
|
|
||||||
value:'download',
|
|
||||||
name:'Download',
|
|
||||||
task:'2-1',
|
task:'2-1',
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -68,11 +68,12 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { LoadingOutlined } from "@ant-design/icons-vue";
|
import { LoadingOutlined } from "@ant-design/icons-vue";
|
||||||
import { message, Upload } from "ant-design-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 { MailOutlined, AppstoreOutlined, SettingOutlined } from '@ant-design/icons-vue';
|
||||||
import { Https } from "@/tool/https";
|
import { Https } from "@/tool/https";
|
||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
import { useRouter,useRoute } from 'vue-router'
|
import { useRouter,useRoute } from 'vue-router'
|
||||||
|
import { adminRouter } from "@/tool/adminRouter";
|
||||||
import GO from "@/tool/GO";
|
import GO from "@/tool/GO";
|
||||||
import { country } from "@/tool/country";
|
import { country } from "@/tool/country";
|
||||||
import { getUploadUrl } from "@/tool/util";
|
import { getUploadUrl } from "@/tool/util";
|
||||||
@@ -92,157 +93,13 @@ export default defineComponent({
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
// const route:any = useRoute()
|
// const route:any = useRoute()
|
||||||
const store:any = useStore()
|
const store:any = useStore()
|
||||||
|
let userDetail:any= computed(()=>{
|
||||||
|
return store.state.UserHabit.userDetail
|
||||||
|
})
|
||||||
const state:any = reactive({
|
const state:any = reactive({
|
||||||
rootSubmenuKeys: [{
|
|
||||||
name:'All User',
|
// 5,7
|
||||||
route:'/administrator/allUser',
|
rootSubmenuKeys: [],
|
||||||
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,
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
openKeys: [],
|
openKeys: [],
|
||||||
selectedKeys: ['sub1'],
|
selectedKeys: ['sub1'],
|
||||||
nowPageName:'All User',//当前页面名称
|
nowPageName:'All User',//当前页面名称
|
||||||
@@ -267,6 +124,18 @@ export default defineComponent({
|
|||||||
router.push('/home');
|
router.push('/home');
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
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) => {
|
state.rootSubmenuKeys.forEach((item:any) => {
|
||||||
if(item.children){
|
if(item.children){
|
||||||
item.children.forEach((item:any) => {
|
item.children.forEach((item:any) => {
|
||||||
@@ -291,6 +160,11 @@ export default defineComponent({
|
|||||||
store.commit('setAllCitiesList',rv);
|
store.commit('setAllCitiesList',rv);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Https.axiosGet(Https.httpUrls.getAllGenerateFuncName,).then((rv: any) => {
|
||||||
|
if (rv) {
|
||||||
|
store.commit('setAllGenerateType',rv);
|
||||||
|
}
|
||||||
|
})
|
||||||
let allCountry = country
|
let allCountry = country
|
||||||
sessionStorage.setItem('allCountry',JSON.stringify(allCountry));
|
sessionStorage.setItem('allCountry',JSON.stringify(allCountry));
|
||||||
// state.nowPageName = state.rootSubmenuKeys[0].name
|
// state.nowPageName = state.rootSubmenuKeys[0].name
|
||||||
|
|||||||
@@ -92,6 +92,7 @@
|
|||||||
<!-- <i @click="Assignment" class="fi fi-rr-gift" title="Assignment"></i> -->
|
<!-- <i @click="Assignment" class="fi fi-rr-gift" title="Assignment"></i> -->
|
||||||
<i @click="UpgradePlan" title="Purchase" class="fi fi-rr-shop"></i>
|
<i @click="UpgradePlan" title="Purchase" class="fi fi-rr-shop"></i>
|
||||||
</div>
|
</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-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 v-else style="width: 30rem;"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -495,7 +496,7 @@ export default defineComponent({
|
|||||||
this.$router.replace("/");
|
this.$router.replace("/");
|
||||||
}
|
}
|
||||||
this.store.commit('createDetail')
|
this.store.commit('createDetail')
|
||||||
store.commit('createProbject')
|
this.store.commit('createProbject')
|
||||||
|
|
||||||
// WriteCookie("token");
|
// WriteCookie("token");
|
||||||
clonAllCookie()
|
clonAllCookie()
|
||||||
|
|||||||
@@ -259,7 +259,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
<div class="right_content_body" v-show="uploadGenerate !='Upload'">
|
<div class="right_content_body" v-show="uploadGenerate !='Upload'">
|
||||||
@@ -791,7 +791,9 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
const openBrandDetail = (item:any)=>{
|
const openBrandDetail = (item:any)=>{
|
||||||
pageData.isBrandDetail = true
|
pageData.isBrandDetail = true
|
||||||
|
nextTick(()=>{
|
||||||
dataDom.brandDetail.getBranDetailData(item)
|
dataDom.brandDetail.getBranDetailData(item)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const addBrand = ()=>{
|
const addBrand = ()=>{
|
||||||
dataDom.createBrand.openAddBrand()
|
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>
|
</div>
|
||||||
<div class="homeRecommend_right">
|
<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 class="gallery_btn white" v-if="userDetail.systemUser != -1" @click="logout">log off</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="homeRecommend_right" v-if="userDetail.systemUser == -1">
|
<div class="homeRecommend_right" v-if="userDetail.systemUser == -1">
|
||||||
|
|||||||
Reference in New Issue
Block a user