Compare commits
10 Commits
e7a6822bc1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ebee5ac6e9 | ||
|
|
a92e31fc6a | ||
|
|
d5a4e102e4 | ||
|
|
3ee93c5ef0 | ||
|
|
5ebff67eb1 | ||
|
|
6acc1434f1 | ||
|
|
39e3418029 | ||
|
|
bc62a77b72 | ||
|
|
825158cd4d | ||
|
|
44efcc4283 |
149
.history/src/tool/https_20240730122739.js
Normal file
149
.history/src/tool/https_20240730122739.js
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
import axios from 'axios'
|
||||||
|
// import qs from 'qs'
|
||||||
|
// import message from '@/components/public/message/src'
|
||||||
|
|
||||||
|
import router from '@/router/index'
|
||||||
|
import {getCookie} from '@/tool/cookie'
|
||||||
|
// import cookie from '@/tools/cookie.js'
|
||||||
|
|
||||||
|
axios.defaults.timeout = 60000 * 60; //响应时间
|
||||||
|
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'; //配置请求头
|
||||||
|
axios.defaults.withCredentials = true; //跨域携带cookie
|
||||||
|
import { message } from 'ant-design-vue';
|
||||||
|
axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
|
||||||
|
|
||||||
|
//POST传参序列化(添加请求拦截器)
|
||||||
|
axios.interceptors.request.use((config) => {
|
||||||
|
//在发送请求之前做某件事
|
||||||
|
if(config.method === 'post' || config.method === 'put' || config.method === 'delete'){
|
||||||
|
// config.data = qs.stringify(config.data);
|
||||||
|
// config.data = JSON.stringify(config.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
config.headers.Authorization = getCookie('token');
|
||||||
|
return config;
|
||||||
|
},(error) =>{
|
||||||
|
return Promise.reject(error);
|
||||||
|
});
|
||||||
|
|
||||||
|
//返回状态判断(添加响应拦截器)
|
||||||
|
axios.interceptors.response.use((res) =>{
|
||||||
|
if (res.data) {
|
||||||
|
if (res.data.errCode === 0) {
|
||||||
|
return Promise.resolve(res.data.data);
|
||||||
|
|
||||||
|
} else if(!res.data.errMsg){
|
||||||
|
let obj = {
|
||||||
|
data:res.data,
|
||||||
|
type:res.headers['content-type'],
|
||||||
|
name:res.headers['content-disposition'],
|
||||||
|
}
|
||||||
|
return Promise.resolve(obj);
|
||||||
|
}else{
|
||||||
|
message.error(res.data.errMsg)
|
||||||
|
return Promise.reject(res.data);
|
||||||
|
}
|
||||||
|
} else{
|
||||||
|
message.error(res.data.errMsg)
|
||||||
|
return Promise.reject(res.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
}, function(error) {
|
||||||
|
if(error?.response?.status === 401){
|
||||||
|
router.replace('/login')
|
||||||
|
return Promise.reject()
|
||||||
|
}
|
||||||
|
let data_new = error?.response?.data
|
||||||
|
message.error(data_new?.errMsg || 'Error: server exception')
|
||||||
|
return Promise.reject(data_new);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
export const Https = {
|
||||||
|
httpUrls: {
|
||||||
|
interfaceUrl: '',
|
||||||
|
accountLogin:'/api/account/login', //登入
|
||||||
|
accountLogout:'/api/account/logout',//登出
|
||||||
|
queryStorePage:'/api/store/queryStorePage',//门店分页列表
|
||||||
|
sotreSaveOrEdit:'/api/store/saveOrEdit',//新增或编辑门店
|
||||||
|
storeDelete:'/api/store/delete',//删除门店
|
||||||
|
labelQueryStorePage:'/api/label/queryStorePage',//标签分页列表
|
||||||
|
labelSaveOrEdit:'/api/label/saveOrEdit', //新增或编辑标签
|
||||||
|
labelDelete:'/api/label/delete',//删除标签
|
||||||
|
accountQueryUserPage:'/api/account/queryUserPage',//用户分页列表
|
||||||
|
storeQueryAll:'/api/store/queryAll',//下拉-查询所有店铺
|
||||||
|
roleQueryRolePage:'/api/role/queryRolePage', //角色分页列表
|
||||||
|
roleQueryAll:'/api/role/queryAll', // 下拉-查询所有角色
|
||||||
|
accountSaveOrEdit:'/api/account/saveOrEdit',//添加或编辑账号
|
||||||
|
accountEnable:'/api/account/enable', // 禁用-停用账户
|
||||||
|
accountDelete:'/api/account/delete',//删除账户
|
||||||
|
roleQueryPermissionList:'/api/role/queryPermissionList',//查询权限列表
|
||||||
|
roleSaveOrEdit:'/api/role/saveOrEdit', //新增或编辑角色
|
||||||
|
roleDelete:'/api/role/delete', //删除角色
|
||||||
|
queryProductPage:'/api/product/queryProductPage',//商品分页列表
|
||||||
|
queryProductLabel:'/api/label/queryProductLabel',//下拉-查询所有商品标签
|
||||||
|
queryProductAssortmentPage:'/api/product/queryProductAssortmentPage',//商品搭配分页列表
|
||||||
|
attributeQueryAll:'/api/attribute/queryAll',//下拉-查询所有属性值
|
||||||
|
productConfirmUpload:'/api/product/confirmUpload',
|
||||||
|
countWorkBench:'/api/product/countWorkBench',//首页工作台统计
|
||||||
|
batchUploadProductRelation:'/api/product/batchUploadProductRelation',//批量上传商品后传对应的关联信息,新增商品
|
||||||
|
productDelete:'/api/product/delete', //删除商品
|
||||||
|
countProductUpdateProcess:'/api/product/countProductUpdateProcess', //统计商品批量上传进度
|
||||||
|
productEdit:'/api/product/edit',//编辑商品
|
||||||
|
productDetail:'/api/product/detail',//商品详情
|
||||||
|
doOnSale:'/api/product/doOnSale', //上架-下架商品
|
||||||
|
queryUsrPermission:'/api/role/queryUsrPermission',//菜单权限
|
||||||
|
queryProductStore:'/api/store/queryProductStore', //下拉-查询所有商品店铺
|
||||||
|
exportProduct:'/api/product/exportProduct', //商品导出
|
||||||
|
miTuExportPage:'/api/miTuExport/miTuExportPage', //获取导出报表列表
|
||||||
|
miTuExportExport:'/api/miTuExport/export', //商品导出
|
||||||
|
salesIncentivesAddTask:'/api/salesIncentives/addTask', //创建激励任务
|
||||||
|
salesIncentivesQueryPage:'/api/salesIncentives/queryPage', //激励任务列表
|
||||||
|
salesIncentivesSalesRanking:'/api/salesIncentives/salesRanking', //激励任务列表
|
||||||
|
},
|
||||||
|
|
||||||
|
axiosGet(url,config) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
axios.get(url,config).then(response => {
|
||||||
|
resolve(response)
|
||||||
|
}).catch((error) => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
axiosPut(url, data) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
axios.put(url, data).then(response => {
|
||||||
|
resolve(response)
|
||||||
|
}).catch((error) => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
axiosPost(url, data,config) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
axios.post(url, data,config).then(response => {
|
||||||
|
resolve(response)
|
||||||
|
}).catch((error) => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
axiosDelete(url, newData) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
axios.delete(url,{data:newData}).then(response => {
|
||||||
|
resolve(response)
|
||||||
|
}).catch((error) => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
149
.history/src/tool/https_20240814143954.js
Normal file
149
.history/src/tool/https_20240814143954.js
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
import axios from 'axios'
|
||||||
|
// import qs from 'qs'
|
||||||
|
// import message from '@/components/public/message/src'
|
||||||
|
|
||||||
|
import router from '@/router/index'
|
||||||
|
import {getCookie} from '@/tool/cookie'
|
||||||
|
// import cookie from '@/tools/cookie.js'
|
||||||
|
|
||||||
|
axios.defaults.timeout = 60000 * 60; //响应时间
|
||||||
|
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'; //配置请求头
|
||||||
|
axios.defaults.withCredentials = true; //跨域携带cookie
|
||||||
|
import { message } from 'ant-design-vue';
|
||||||
|
axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
|
||||||
|
console.log(process.env.VUE_APP_BASE_URL);
|
||||||
|
//POST传参序列化(添加请求拦截器)
|
||||||
|
axios.interceptors.request.use((config) => {
|
||||||
|
//在发送请求之前做某件事
|
||||||
|
if(config.method === 'post' || config.method === 'put' || config.method === 'delete'){
|
||||||
|
// config.data = qs.stringify(config.data);
|
||||||
|
// config.data = JSON.stringify(config.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
config.headers.Authorization = getCookie('token');
|
||||||
|
return config;
|
||||||
|
},(error) =>{
|
||||||
|
return Promise.reject(error);
|
||||||
|
});
|
||||||
|
|
||||||
|
//返回状态判断(添加响应拦截器)
|
||||||
|
axios.interceptors.response.use((res) =>{
|
||||||
|
if (res.data) {
|
||||||
|
if (res.data.errCode === 0) {
|
||||||
|
return Promise.resolve(res.data.data);
|
||||||
|
|
||||||
|
} else if(!res.data.errMsg){
|
||||||
|
let obj = {
|
||||||
|
data:res.data,
|
||||||
|
type:res.headers['content-type'],
|
||||||
|
name:res.headers['content-disposition'],
|
||||||
|
}
|
||||||
|
return Promise.resolve(obj);
|
||||||
|
}else{
|
||||||
|
message.error(res.data.errMsg)
|
||||||
|
return Promise.reject(res.data);
|
||||||
|
}
|
||||||
|
} else{
|
||||||
|
message.error(res.data.errMsg)
|
||||||
|
return Promise.reject(res.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
}, function(error) {
|
||||||
|
if(error?.response?.status === 401){
|
||||||
|
router.replace('/login')
|
||||||
|
return Promise.reject()
|
||||||
|
}
|
||||||
|
let data_new = error?.response?.data
|
||||||
|
message.error(data_new?.errMsg || 'Error: server exception')
|
||||||
|
return Promise.reject(data_new);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
export const Https = {
|
||||||
|
httpUrls: {
|
||||||
|
interfaceUrl: '',
|
||||||
|
accountLogin:'/api/account/login', //登入
|
||||||
|
accountLogout:'/api/account/logout',//登出
|
||||||
|
queryStorePage:'/api/store/queryStorePage',//门店分页列表
|
||||||
|
sotreSaveOrEdit:'/api/store/saveOrEdit',//新增或编辑门店
|
||||||
|
storeDelete:'/api/store/delete',//删除门店
|
||||||
|
labelQueryStorePage:'/api/label/queryStorePage',//标签分页列表
|
||||||
|
labelSaveOrEdit:'/api/label/saveOrEdit', //新增或编辑标签
|
||||||
|
labelDelete:'/api/label/delete',//删除标签
|
||||||
|
accountQueryUserPage:'/api/account/queryUserPage',//用户分页列表
|
||||||
|
storeQueryAll:'/api/store/queryAll',//下拉-查询所有店铺
|
||||||
|
roleQueryRolePage:'/api/role/queryRolePage', //角色分页列表
|
||||||
|
roleQueryAll:'/api/role/queryAll', // 下拉-查询所有角色
|
||||||
|
accountSaveOrEdit:'/api/account/saveOrEdit',//添加或编辑账号
|
||||||
|
accountEnable:'/api/account/enable', // 禁用-停用账户
|
||||||
|
accountDelete:'/api/account/delete',//删除账户
|
||||||
|
roleQueryPermissionList:'/api/role/queryPermissionList',//查询权限列表
|
||||||
|
roleSaveOrEdit:'/api/role/saveOrEdit', //新增或编辑角色
|
||||||
|
roleDelete:'/api/role/delete', //删除角色
|
||||||
|
queryProductPage:'/api/product/queryProductPage',//商品分页列表
|
||||||
|
queryProductLabel:'/api/label/queryProductLabel',//下拉-查询所有商品标签
|
||||||
|
queryProductAssortmentPage:'/api/product/queryProductAssortmentPage',//商品搭配分页列表
|
||||||
|
attributeQueryAll:'/api/attribute/queryAll',//下拉-查询所有属性值
|
||||||
|
productConfirmUpload:'/api/product/confirmUpload',
|
||||||
|
countWorkBench:'/api/product/countWorkBench',//首页工作台统计
|
||||||
|
batchUploadProductRelation:'/api/product/batchUploadProductRelation',//批量上传商品后传对应的关联信息,新增商品
|
||||||
|
productDelete:'/api/product/delete', //删除商品
|
||||||
|
countProductUpdateProcess:'/api/product/countProductUpdateProcess', //统计商品批量上传进度
|
||||||
|
productEdit:'/api/product/edit',//编辑商品
|
||||||
|
productDetail:'/api/product/detail',//商品详情
|
||||||
|
doOnSale:'/api/product/doOnSale', //上架-下架商品
|
||||||
|
queryUsrPermission:'/api/role/queryUsrPermission',//菜单权限
|
||||||
|
queryProductStore:'/api/store/queryProductStore', //下拉-查询所有商品店铺
|
||||||
|
exportProduct:'/api/product/exportProduct', //商品导出
|
||||||
|
miTuExportPage:'/api/miTuExport/miTuExportPage', //获取导出报表列表
|
||||||
|
miTuExportExport:'/api/miTuExport/export', //商品导出
|
||||||
|
salesIncentivesAddTask:'/api/salesIncentives/addTask', //创建激励任务
|
||||||
|
salesIncentivesQueryPage:'/api/salesIncentives/queryPage', //激励任务列表
|
||||||
|
salesIncentivesSalesRanking:'/api/salesIncentives/salesRanking', //激励任务列表
|
||||||
|
},
|
||||||
|
|
||||||
|
axiosGet(url,config) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
axios.get(url,config).then(response => {
|
||||||
|
resolve(response)
|
||||||
|
}).catch((error) => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
axiosPut(url, data) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
axios.put(url, data).then(response => {
|
||||||
|
resolve(response)
|
||||||
|
}).catch((error) => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
axiosPost(url, data,config) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
axios.post(url, data,config).then(response => {
|
||||||
|
resolve(response)
|
||||||
|
}).catch((error) => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
axiosDelete(url, newData) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
axios.delete(url,{data:newData}).then(response => {
|
||||||
|
resolve(response)
|
||||||
|
}).catch((error) => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
46
.history/vue.config_20240812101644.js
Normal file
46
.history/vue.config_20240812101644.js
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
const {defineConfig} = require('@vue/cli-service')
|
||||||
|
const path = require('path');
|
||||||
|
module.exports = defineConfig({
|
||||||
|
transpileDependencies: ['vuetify'],
|
||||||
|
lintOnSave:false,//关闭语法检查
|
||||||
|
devServer: {
|
||||||
|
// hot: true, // 热更新
|
||||||
|
port: '8060',
|
||||||
|
proxy: {
|
||||||
|
"/api": {
|
||||||
|
// target: 'http://18.167.251.121:5568', //后端接口地址
|
||||||
|
target: 'http://192.168.1.9:5560/', //后端接口地址
|
||||||
|
// target: 'http://18.167.251.121:10220/', //后端接口地址
|
||||||
|
changeOrigin: true, //是否允许跨越
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pluginOptions: {
|
||||||
|
"style-resources-loader": {
|
||||||
|
preProcessor: "less",
|
||||||
|
patterns: [
|
||||||
|
// 存放less变量文件的路径
|
||||||
|
path.resolve(__dirname, "./src/assets/style/style.less")
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
css: {
|
||||||
|
loaderOptions: {
|
||||||
|
less: {
|
||||||
|
lessOptions: {
|
||||||
|
modifyVars: {
|
||||||
|
'primary-color': '#ec6800'
|
||||||
|
},
|
||||||
|
javascriptEnabled: true,
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
46
.history/vue.config_20240823234240.js
Normal file
46
.history/vue.config_20240823234240.js
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
const {defineConfig} = require('@vue/cli-service')
|
||||||
|
const path = require('path');
|
||||||
|
module.exports = defineConfig({
|
||||||
|
transpileDependencies: ['vuetify'],
|
||||||
|
lintOnSave:false,//关闭语法检查
|
||||||
|
devServer: {
|
||||||
|
// hot: true, // 热更新
|
||||||
|
port: '8060',
|
||||||
|
proxy: {
|
||||||
|
"/api": {
|
||||||
|
// target: 'http://18.167.251.121:5568', //后端接口地址
|
||||||
|
// target: 'http://192.168.1.9:5560/', //后端接口地址
|
||||||
|
target: 'http://18.167.251.121:10220/', //后端接口地址
|
||||||
|
changeOrigin: true, //是否允许跨越
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pluginOptions: {
|
||||||
|
"style-resources-loader": {
|
||||||
|
preProcessor: "less",
|
||||||
|
patterns: [
|
||||||
|
// 存放less变量文件的路径
|
||||||
|
path.resolve(__dirname, "./src/assets/style/style.less")
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
css: {
|
||||||
|
loaderOptions: {
|
||||||
|
less: {
|
||||||
|
lessOptions: {
|
||||||
|
modifyVars: {
|
||||||
|
'primary-color': '#ec6800'
|
||||||
|
},
|
||||||
|
javascriptEnabled: true,
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
<title>Mixi</title>
|
<title>SARA</title>
|
||||||
<link href="https://fonts.font.im/css?family=Roboto:400,500,700,700i" rel="stylesheet">
|
<link href="https://fonts.font.im/css?family=Roboto:400,500,700,700i" rel="stylesheet">
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"id": "3922178",
|
"id": "3922178",
|
||||||
"name": "mixi",
|
"name": "sara",
|
||||||
"font_family": "iconfont",
|
"font_family": "iconfont",
|
||||||
"css_prefix_text": "icon-",
|
"css_prefix_text": "icon-",
|
||||||
"description": "",
|
"description": "",
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id */
|
font-family: "iconfont"; /* Project id 4452518 */
|
||||||
src: url('iconfont.ttf?t=1709533486156') format('truetype');
|
src: url('iconfont.woff2?t=1723432108642') format('woff2'),
|
||||||
|
url('iconfont.woff?t=1723432108642') format('woff'),
|
||||||
|
url('iconfont.ttf?t=1723432108642') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
@@ -11,6 +13,22 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-renwuliebiao:before {
|
||||||
|
content: "\e60a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-paiming_paiming:before {
|
||||||
|
content: "\e6dc";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-jiazai--kuai:before {
|
||||||
|
content: "\e8b7";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-renwu:before {
|
||||||
|
content: "\e653";
|
||||||
|
}
|
||||||
|
|
||||||
.icon-xiazaiwenjian:before {
|
.icon-xiazaiwenjian:before {
|
||||||
content: "\e600";
|
content: "\e600";
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
src/assets/iconfont2/iconfont.woff
Normal file
BIN
src/assets/iconfont2/iconfont.woff
Normal file
Binary file not shown.
BIN
src/assets/iconfont2/iconfont.woff2
Normal file
BIN
src/assets/iconfont2/iconfont.woff2
Normal file
Binary file not shown.
@@ -28,7 +28,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="Label attributes" name="productLabel">
|
<a-form-item label="Fashion Attributes" name="productLabel">
|
||||||
<a-select v-model:value="formState.productLabel" mode="multiple" size="large" optionFilterProp="label" :options="productLabelList" showArrow></a-select>
|
<a-select v-model:value="formState.productLabel" mode="multiple" size="large" optionFilterProp="label" :options="productLabelList" showArrow></a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!-- <a-form-item label="Price" name="price">
|
<!-- <a-form-item label="Price" name="price">
|
||||||
@@ -225,8 +225,6 @@ export default defineComponent({
|
|||||||
let submitProcess = () =>{
|
let submitProcess = () =>{
|
||||||
Https.axiosPost(Https.httpUrls.countProductUpdateProcess, {}).then(
|
Https.axiosPost(Https.httpUrls.countProductUpdateProcess, {}).then(
|
||||||
(rv: any) => {
|
(rv: any) => {
|
||||||
console.log(rv.process);
|
|
||||||
|
|
||||||
if(rv.status != 1 && showDesignMark.value){
|
if(rv.status != 1 && showDesignMark.value){
|
||||||
let designProgressNew:any = rv.process * 100
|
let designProgressNew:any = rv.process * 100
|
||||||
designProgress.value = parseInt(designProgressNew)
|
designProgress.value = parseInt(designProgressNew)
|
||||||
|
|||||||
@@ -111,8 +111,6 @@ export default defineComponent({
|
|||||||
storeNameData.value = data.storeNameData
|
storeNameData.value = data.storeNameData
|
||||||
await storeQueryAll()
|
await storeQueryAll()
|
||||||
storeList.value = backupStoreList.value.filter((v:any) => storeIds.indexOf(v.id) == -1)
|
storeList.value = backupStoreList.value.filter((v:any) => storeIds.indexOf(v.id) == -1)
|
||||||
console.log(storeList.value);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
addStoreModal.value = true
|
addStoreModal.value = true
|
||||||
addStoreType.value = data.type
|
addStoreType.value = data.type
|
||||||
@@ -184,8 +182,6 @@ export default defineComponent({
|
|||||||
storeNameData.value.forEach((item:any) => {
|
storeNameData.value.forEach((item:any) => {
|
||||||
storeData[item] = 0
|
storeData[item] = 0
|
||||||
});
|
});
|
||||||
console.log(storeData);
|
|
||||||
|
|
||||||
Https.axiosPost(Https.httpUrls.queryProductStore,{}).then(
|
Https.axiosPost(Https.httpUrls.queryProductStore,{}).then(
|
||||||
(rv: any) => {
|
(rv: any) => {
|
||||||
if (rv) {
|
if (rv) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
:destroyOnClose="true"
|
:destroyOnClose="true"
|
||||||
v-model:visible="editProductModal"
|
v-model:visible="editProductModal"
|
||||||
:footer="null"
|
:footer="null"
|
||||||
title="Eidt Product"
|
title="Edit Product"
|
||||||
width="900px"
|
width="900px"
|
||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
:centered="true"
|
:centered="true"
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form_item_block">
|
<div class="form_item_block">
|
||||||
<div class="form_item_module_title">Label attributes</div>
|
<div class="form_item_module_title">Fashion Attributes</div>
|
||||||
<a-form-item label="Select category" name="productCategory">
|
<a-form-item label="Select category" name="productCategory">
|
||||||
<a-select v-model:value="formState.productCategory" size="large" :options="productCategoryList" placeholder="Please select" @change="productCategoryChange" :getPopupContainer="(triggerNode) => getPopupContainer(triggerNode)" optionFilterProp="label"></a-select>
|
<a-select v-model:value="formState.productCategory" size="large" :options="productCategoryList" placeholder="Please select" @change="productCategoryChange" :getPopupContainer="(triggerNode) => getPopupContainer(triggerNode)" optionFilterProp="label"></a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
<div class="detail_item_block">
|
<div class="detail_item_block">
|
||||||
<div class="detail_item_title_block">
|
<div class="detail_item_title_block">
|
||||||
<span class="icon iconfont icon-a-gengduocaidangongneng detail_icon"></span>
|
<span class="icon iconfont icon-a-gengduocaidangongneng detail_icon"></span>
|
||||||
<div>Label attributes</div>
|
<div>Fashion Attributes</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="detail_item_sec_title">类目</div>
|
<div class="detail_item_sec_title">类目</div>
|
||||||
<div class="detail_item_content">
|
<div class="detail_item_content">
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="upload_max_tip">
|
<div class="upload_max_tip">
|
||||||
<WarningFilled class="icon-zhuyi"/>
|
<WarningFilled class="icon-zhuyi"/>
|
||||||
<span>Maximum 100 images can be uploaded, Maximum 2M per image</span>
|
<span>Maximum 100 images can be uploaded, Maximum 5M per image</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal_button_list">
|
<div class="modal_button_list">
|
||||||
|
|||||||
@@ -63,6 +63,16 @@ const routes: Array<RouteRecordRaw> = [
|
|||||||
path:'exportExcil',
|
path:'exportExcil',
|
||||||
name:'exportExcil',
|
name:'exportExcil',
|
||||||
component: _import_custom('childView/exportExcil.vue'),
|
component: _import_custom('childView/exportExcil.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path:'growingThroughLifeTask',
|
||||||
|
name:'growingThroughLifeTask',
|
||||||
|
component: _import_custom('childView/growingThroughLife/growingThroughLifeTask.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path:'growingThroughLifeList',
|
||||||
|
name:'growingThroughLifeList',
|
||||||
|
component: _import_custom('childView/growingThroughLife/growingThroughLifeList.vue'),
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// path:'excil1',
|
// path:'excil1',
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded
|
|||||||
axios.defaults.withCredentials = true; //跨域携带cookie
|
axios.defaults.withCredentials = true; //跨域携带cookie
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
|
axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
|
||||||
|
console.log(process.env.VUE_APP_BASE_URL);
|
||||||
//POST传参序列化(添加请求拦截器)
|
//POST传参序列化(添加请求拦截器)
|
||||||
axios.interceptors.request.use((config) => {
|
axios.interceptors.request.use((config) => {
|
||||||
//在发送请求之前做某件事
|
//在发送请求之前做某件事
|
||||||
@@ -33,7 +33,6 @@ axios.interceptors.response.use((res) =>{
|
|||||||
return Promise.resolve(res.data.data);
|
return Promise.resolve(res.data.data);
|
||||||
|
|
||||||
} else if(!res.data.errMsg){
|
} else if(!res.data.errMsg){
|
||||||
console.log(res);
|
|
||||||
let obj = {
|
let obj = {
|
||||||
data:res.data,
|
data:res.data,
|
||||||
type:res.headers['content-type'],
|
type:res.headers['content-type'],
|
||||||
@@ -98,6 +97,9 @@ export const Https = {
|
|||||||
exportProduct:'/api/product/exportProduct', //商品导出
|
exportProduct:'/api/product/exportProduct', //商品导出
|
||||||
miTuExportPage:'/api/miTuExport/miTuExportPage', //获取导出报表列表
|
miTuExportPage:'/api/miTuExport/miTuExportPage', //获取导出报表列表
|
||||||
miTuExportExport:'/api/miTuExport/export', //商品导出
|
miTuExportExport:'/api/miTuExport/export', //商品导出
|
||||||
|
salesIncentivesAddTask:'/api/salesIncentives/addTask', //创建激励任务
|
||||||
|
salesIncentivesQueryPage:'/api/salesIncentives/queryPage', //激励任务列表
|
||||||
|
salesIncentivesSalesRanking:'/api/salesIncentives/salesRanking', //激励任务列表
|
||||||
},
|
},
|
||||||
|
|
||||||
axiosGet(url,config) {
|
axiosGet(url,config) {
|
||||||
|
|||||||
@@ -164,7 +164,6 @@ const exportExcil=(data,sheetNames,fileName,configuration)=>{
|
|||||||
const cellAddress = { r: R, c: C };
|
const cellAddress = { r: R, c: C };
|
||||||
const cellRef = XLSX.utils.encode_cell(cellAddress);
|
const cellRef = XLSX.utils.encode_cell(cellAddress);
|
||||||
if (!worksheet[cellRef]) continue;
|
if (!worksheet[cellRef]) continue;
|
||||||
console.log(worksheet[cellRef]);
|
|
||||||
worksheet[cellRef].s = { alignment: { horizontal: 'center', vertical: 'center',wrapText: true, } }; // 设置文本水平和垂直居中
|
worksheet[cellRef].s = { alignment: { horizontal: 'center', vertical: 'center',wrapText: true, } }; // 设置文本水平和垂直居中
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
.menu_title{
|
.menu_title{
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-family: Adobe Heiti Std;
|
// font-family: Adobe Heiti Std;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
color: #808185;
|
color: #808185;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<a-button class="login_button" size="large" type="primary" @click="submitPerLogin">Login</a-button>
|
<a-button class="login_button" size="large" type="primary" @click="submitPerLogin">Login</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="login_footer_content">copyright ©2023 CodeCreate</div>
|
<div class="login_footer_content">copyright ©2025 code-create</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -100,37 +100,52 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:'Report Exporting',
|
name:'Report Exporting',
|
||||||
code:'MI_TU_EXPORT',
|
code:'REPORT_EXPORTING',
|
||||||
route:'/home/exportExcil',
|
route:'/home/exportExcil',
|
||||||
icon:'icon-xiazaiwenjian',
|
icon:'icon-xiazaiwenjian',
|
||||||
key:'/home/exportExcil',
|
key:'/home/exportExcil',
|
||||||
isShow:false,
|
isShow:false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
code:'MOTIVATIONAL_TASKS',
|
||||||
|
name:'Motivational Tasks',
|
||||||
|
route:'/home/growingThroughLifeTask',
|
||||||
|
icon:'icon-renwuliebiao',
|
||||||
|
key:'/home/growingThroughLifeTask',
|
||||||
|
isShow:false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code:'MOTIVATIONAL_RANKING',
|
||||||
|
name:'Motivational Ranking',
|
||||||
|
route:'/home/growingThroughLifeList',
|
||||||
|
icon:'icon-paiming_paiming',
|
||||||
|
key:'/home/growingThroughLifeList',
|
||||||
|
isShow:false,
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// name:'Export Excil',
|
// name:'Growing Through Life',
|
||||||
// code:'EXPORT_EXCIL',
|
// code:'GROWING_THROUGH_LIFE',
|
||||||
// route:'/home/exportExcil',
|
// route:'',
|
||||||
// icon:'icon-xiazaiwenjian',
|
// icon:'icon-renwu',
|
||||||
// key:'sub3',
|
// key:'sub3',
|
||||||
// key:'/home/exportExcil',
|
|
||||||
// expandIcon:'icon-xialajiantouxiao',
|
// expandIcon:'icon-xialajiantouxiao',
|
||||||
// isShow:true,
|
// isShow:false,
|
||||||
// children:[
|
// children:[
|
||||||
// {
|
// {
|
||||||
// code:'USER_MANAGER',
|
// code:'GROWING_THROUGH_LIFE_TASK',
|
||||||
// name:'User Management',
|
// name:'Task Management',
|
||||||
// route:'/home/excil1',
|
// route:'/home/growingThroughLifeTask',
|
||||||
// icon:'',
|
// icon:'',
|
||||||
// key:'/home/excil1',
|
// key:'/home/growingThroughLifeTask',
|
||||||
// isShow:true,
|
// isShow:false,
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// code:'ROLE_MANAGER',
|
// code:'GROWING_THROUGH_LIFE_LIST',
|
||||||
// name:'Access Permission',
|
// name:'Performance',
|
||||||
// route:'/home/excil2',
|
// route:'/home/growingThroughLifeList',
|
||||||
// icon:'',
|
// icon:'',
|
||||||
// key:'/home/excil2',
|
// key:'/home/growingThroughLifeList',
|
||||||
// isShow:true,
|
// isShow:false,
|
||||||
// },
|
// },
|
||||||
// ]
|
// ]
|
||||||
// }
|
// }
|
||||||
@@ -181,7 +196,6 @@ export default defineComponent({
|
|||||||
for(let menu of menuList){
|
for(let menu of menuList){
|
||||||
|
|
||||||
if(role.code === menu.code){
|
if(role.code === menu.code){
|
||||||
console.log(menu,role);
|
|
||||||
menu.isShow = role.select == 1 ? true :false
|
menu.isShow = role.select == 1 ? true :false
|
||||||
if(role.operationList){
|
if(role.operationList){
|
||||||
menu.operationList = role.operationList
|
menu.operationList = role.operationList
|
||||||
|
|||||||
@@ -14,7 +14,9 @@
|
|||||||
allowClear
|
allowClear
|
||||||
></a-select>
|
></a-select>
|
||||||
</filterComponent>
|
</filterComponent>
|
||||||
<filterComponent :title="'Export Time'"> <a-range-picker size="large" v-model:value="date" :placeholder="['Start Time', 'End Time']" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"/></filterComponent>
|
<filterComponent :title="'Export Time'">
|
||||||
|
<a-range-picker size="large" v-model:value="date" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD" :placeholder="['Start Time', 'End Time']"/>
|
||||||
|
</filterComponent>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list_top_button_content">
|
<div class="list_top_button_content">
|
||||||
@@ -36,7 +38,8 @@
|
|||||||
<template v-slot:bodyCell="{column,record, index}" >
|
<template v-slot:bodyCell="{column,record, index}" >
|
||||||
<template v-if="column.dataIndex === 'operation'">
|
<template v-if="column.dataIndex === 'operation'">
|
||||||
<div class="operate_list">
|
<div class="operate_list">
|
||||||
<div class="operate_item" @click="setExport(record,index)">Export</div>
|
<div class="operate_item" v-if="!record.operation" @click="setExport(record,index,column)">Export</div>
|
||||||
|
<div class="operate_item icon" v-else><span class="iconfont icon-jiazai--kuai"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
@@ -65,11 +68,12 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
let tableLoading = ref(false)
|
let tableLoading = ref(false)
|
||||||
let columns = reactive([
|
let columns = reactive([
|
||||||
{ title: 'Name', align:'center', ellipsis: true, dataIndex: 'exportName', key: 'exportName', width:250 },
|
{ title: 'Name', align:'center', ellipsis: true, dataIndex: 'exportName', key: 'exportName', width:350 },
|
||||||
{ title: 'Create Time', align:'center', ellipsis: true, dataIndex: 'createTime', key: 'createTime'},
|
{ title: 'Data Time', align:'center', ellipsis: true, dataIndex: 'dataTime', key: 'dataTime', width:350},
|
||||||
|
// { title: 'Create Time', align:'center', ellipsis: true, dataIndex: 'createTime', key: 'createTime'},
|
||||||
{ title: 'Type', align:'center', ellipsis: true, dataIndex: 'span', key: 'span'},
|
{ title: 'Type', align:'center', ellipsis: true, dataIndex: 'span', key: 'span'},
|
||||||
{
|
{
|
||||||
title: 'Operations',
|
title: 'Actions',
|
||||||
key: 'operation',
|
key: 'operation',
|
||||||
align:'center',
|
align:'center',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
@@ -78,7 +82,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
let collectionList = ref([])
|
let collectionList:any = ref([])
|
||||||
let labelTypeList:any = ref([
|
let labelTypeList:any = ref([
|
||||||
{ value:'week',label:'Week'},
|
{ value:'week',label:'Week'},
|
||||||
{ value:'month',label:'Month'},
|
{ value:'month',label:'Month'},
|
||||||
@@ -94,14 +98,13 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
let getExportList = () =>{
|
let getExportList = () =>{
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
page:currentPage.value,
|
page:currentPage.value,
|
||||||
size:pageSize.value,
|
size:pageSize.value,
|
||||||
fileName:filter.name,
|
fileName:filter.name,
|
||||||
span:filter.type,
|
span:filter.type,
|
||||||
endTime:filter.date[1]?filter.date[1]:'',
|
endTime:filter?.date?.[1]?filter.date[1] + ' ' +'00:00:00':'',
|
||||||
startTime:filter.date[0]?filter.date[0]:'',
|
startTime:filter?.date?.[0]?filter.date[0] + ' ' +'23:59:59':'',
|
||||||
}
|
}
|
||||||
tableLoading.value = true
|
tableLoading.value = true
|
||||||
Https.axiosPost(Https.httpUrls.miTuExportPage, data).then(
|
Https.axiosPost(Https.httpUrls.miTuExportPage, data).then(
|
||||||
@@ -113,7 +116,10 @@ export default defineComponent({
|
|||||||
getExportList()
|
getExportList()
|
||||||
}else{
|
}else{
|
||||||
collectionList.value = rv.content
|
collectionList.value = rv.content
|
||||||
|
let operation = {
|
||||||
|
operation:false
|
||||||
|
}
|
||||||
|
collectionList.value.forEach((obj:any) => Object.assign(obj, operation));
|
||||||
total = rv.total
|
total = rv.total
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -132,13 +138,14 @@ export default defineComponent({
|
|||||||
let resetList = () =>{
|
let resetList = () =>{
|
||||||
currentPage.value = 1
|
currentPage.value = 1
|
||||||
filter.name = ''
|
filter.name = ''
|
||||||
|
filter.type = ''
|
||||||
|
filter.date = []
|
||||||
getExportList()
|
getExportList()
|
||||||
}
|
}
|
||||||
|
|
||||||
let setExport = (data:any,index:any) =>{
|
let setExport = (data:any,index:any,column:any) =>{
|
||||||
|
collectionList.value[index].operation = true
|
||||||
Https.axiosGet(Https.httpUrls.miTuExportExport+`/${data.id}`,{responseType: 'blob'}).then((rv)=>{
|
Https.axiosGet(Https.httpUrls.miTuExportExport+`/${data.id}`,{responseType: 'blob'}).then((rv)=>{
|
||||||
console.log(rv.name);
|
|
||||||
|
|
||||||
let name = rv.name.split('=')[1];
|
let name = rv.name.split('=')[1];
|
||||||
let url = window.URL.createObjectURL(new Blob([rv.data], { type: rv.type }));
|
let url = window.URL.createObjectURL(new Blob([rv.data], { type: rv.type }));
|
||||||
const link = document.createElement('a');
|
const link = document.createElement('a');
|
||||||
@@ -149,6 +156,7 @@ export default defineComponent({
|
|||||||
link.click();
|
link.click();
|
||||||
URL.revokeObjectURL(link.href)
|
URL.revokeObjectURL(link.href)
|
||||||
document.body.removeChild(link);
|
document.body.removeChild(link);
|
||||||
|
collectionList.value[index].operation = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,6 +205,17 @@ export default defineComponent({
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #343579;
|
color: #343579;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
&.icon{
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
@keyframes spin {
|
||||||
|
0%{
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100%{
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<filterComponent :title="'User State'">
|
<filterComponent :title="'User State'">
|
||||||
<a-select v-model:value="state" size="large" style="width:280px" placeholder="Please select" :options="userStateList" allowClear></a-select>
|
<a-select v-model:value="state" size="large" style="width:280px" placeholder="Please select" :options="userStateList" allowClear></a-select>
|
||||||
</filterComponent>
|
</filterComponent>
|
||||||
<filterComponent :title="'Add Time'"><a-range-picker v-model:value="addTime" size="large" :placeholder="['Start Time', 'End Time']" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"/></filterComponent>
|
<filterComponent :title="'Date'"><a-range-picker v-model:value="addTime" size="large" :placeholder="['Start Time', 'End Time']" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"/></filterComponent>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list_top_button_content">
|
<div class="list_top_button_content">
|
||||||
@@ -176,7 +176,7 @@ export default defineComponent({
|
|||||||
{ title: 'Activated', align:'center', ellipsis: true, dataIndex: 'appUserName', key: 'appUserName' },
|
{ title: 'Activated', align:'center', ellipsis: true, dataIndex: 'appUserName', key: 'appUserName' },
|
||||||
{ title: 'User State', align:'center', ellipsis: true, dataIndex: 'stateName', key: 'stateName' },
|
{ title: 'User State', align:'center', ellipsis: true, dataIndex: 'stateName', key: 'stateName' },
|
||||||
{
|
{
|
||||||
title: 'Operations',
|
title: 'Actions',
|
||||||
key: 'operation',
|
key: 'operation',
|
||||||
align:'center',
|
align:'center',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
@@ -279,7 +279,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
let editUser = (data:any,) =>{
|
let editUser = (data:any,) =>{
|
||||||
editUserModal.value = true
|
editUserModal.value = true
|
||||||
editUserTitle.value = 'Eidt user'
|
editUserTitle.value = 'Edit user'
|
||||||
formState.value = {
|
formState.value = {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
userName: data.userName,
|
userName: data.userName,
|
||||||
|
|||||||
@@ -0,0 +1,206 @@
|
|||||||
|
<template>
|
||||||
|
<div class="label_manage_page list_page">
|
||||||
|
<div class="list_page_content">
|
||||||
|
<div class="list_top_content">
|
||||||
|
<div class="list_top_search_content">
|
||||||
|
<div class="search_content_left">
|
||||||
|
<filterComponent :title="'Date'"><a-range-picker v-model:value="addTime" size="large" :placeholder="['Start Time', 'End Time']" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"/></filterComponent>
|
||||||
|
<filterComponent :title="'Name'">
|
||||||
|
<a-input v-model:value="salesmanName" size="large" placeholder="Please enter your name"/>
|
||||||
|
</filterComponent>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="list_top_button_content">
|
||||||
|
<a-button class="primary_button btn-margin-r-20" type="primary" size="large" @click="searchList()">Seach</a-button>
|
||||||
|
<a-button class="default_button" size="large" @click="resetList()">Reset</a-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="list_table_content" ref="tableParent">
|
||||||
|
<a-table :columns="columns" :data-source="collectionList" :scroll="{ y: tableHeight }" @change="changePage" :loading="tableLoading"
|
||||||
|
:pagination="{
|
||||||
|
showSizeChanger:true,
|
||||||
|
current: currentPage,
|
||||||
|
pageSize:pageSize,
|
||||||
|
total: total,
|
||||||
|
showQuickJumper:true,
|
||||||
|
bordered:false,
|
||||||
|
pageSizeOptions:['10','20','50'],
|
||||||
|
}">
|
||||||
|
<!-- <template v-slot:bodyCell="{column,record, index}" >
|
||||||
|
<template v-if="column.key === 'ranking'">
|
||||||
|
<div class="operate_list">
|
||||||
|
{{ index+1 }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</template> -->
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { defineComponent,ref,reactive,toRefs,UnwrapRef,onMounted,createVNode } from "vue";
|
||||||
|
import filterComponent from '@/component/filterComponent.vue'
|
||||||
|
import { Moment } from 'moment';
|
||||||
|
import { message,Modal } from "ant-design-vue";
|
||||||
|
import { WarningOutlined } from '@ant-design/icons-vue';
|
||||||
|
import { Https } from "@/tool/https";
|
||||||
|
import { formatTime, startTime, endTime } from "@/tool/util"
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name:'labelManage',
|
||||||
|
components:{filterComponent},
|
||||||
|
setup(){
|
||||||
|
let filter:any = reactive({
|
||||||
|
addTime:ref<Moment[]>([]),
|
||||||
|
salesmanName:''
|
||||||
|
})
|
||||||
|
let tableLoading = ref(false)
|
||||||
|
let columns = reactive([
|
||||||
|
{ title: 'Sales Name', align:'center', ellipsis: true, dataIndex: 'salesmanName', key: 'salesmanName' },
|
||||||
|
{ title: 'Star Value', align:'center', ellipsis: true, dataIndex: 'incentiveNum', key: 'incentiveNum'},
|
||||||
|
// { title: 'Add Time', align:'center', ellipsis: true, dataIndex: 'createDate', key: 'createDate',customRender:(record:any)=>{
|
||||||
|
// let time = formatTime(record.text / 1000, 'YYYY-MM-DD hh:mm:ss')
|
||||||
|
// return time },
|
||||||
|
// },
|
||||||
|
])
|
||||||
|
let collectionList = ref([])
|
||||||
|
let currentPage = ref(1)
|
||||||
|
let pageSize = ref(50)
|
||||||
|
let total = ref(1)
|
||||||
|
let formRef = ref();
|
||||||
|
let formState = ref({
|
||||||
|
id: '',
|
||||||
|
name: '',
|
||||||
|
type:[],
|
||||||
|
remarks:'',
|
||||||
|
});
|
||||||
|
let tableHeight = ref(0)
|
||||||
|
let tableParent:any = ref(null)
|
||||||
|
let changePage = (e:any) =>{
|
||||||
|
// currentPage.value = e.current
|
||||||
|
// pageSize.value = e.pageSize
|
||||||
|
// getLabelist()
|
||||||
|
}
|
||||||
|
let getLabelist = () =>{
|
||||||
|
console.log(filter.addTime);
|
||||||
|
let startTime,endTime
|
||||||
|
if(filter.addTime && filter.addTime.length){
|
||||||
|
startTime = filter.addTime[0] +' 00:00:00'
|
||||||
|
endTime = filter.addTime[1] +' 23:59:59'
|
||||||
|
}
|
||||||
|
let data = {
|
||||||
|
startTime:startTime,
|
||||||
|
// startTime:filter.addTime && filter.addTime.length ? startTime(filter.addTime[0]) : '',
|
||||||
|
// endTime:filter.addTime && filter.addTime.length ? endTime(filter.addTime[1]) : '',
|
||||||
|
endTime:endTime,
|
||||||
|
salesmanName:filter.salesmanName,
|
||||||
|
page:currentPage.value,
|
||||||
|
size:pageSize.value
|
||||||
|
}
|
||||||
|
tableLoading.value = true
|
||||||
|
Https.axiosPost(Https.httpUrls.salesIncentivesSalesRanking, data).then(
|
||||||
|
(rv: any) => {
|
||||||
|
if (rv) {
|
||||||
|
tableLoading.value = false
|
||||||
|
collectionList.value = rv
|
||||||
|
// total.value = rv.total
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
let searchList = () =>{
|
||||||
|
currentPage.value = 1
|
||||||
|
getLabelist()
|
||||||
|
}
|
||||||
|
|
||||||
|
let resetList = () =>{
|
||||||
|
currentPage.value = 1
|
||||||
|
filter.name = ''
|
||||||
|
filter.type = ''
|
||||||
|
filter.addTime = ref<Moment[]>([])
|
||||||
|
getLabelist()
|
||||||
|
}
|
||||||
|
|
||||||
|
let deleteLabel = (data:any,index:any) =>{
|
||||||
|
let confirmDelete = (data:any,index:any) =>{
|
||||||
|
let newData = {
|
||||||
|
id:data.id
|
||||||
|
}
|
||||||
|
Https.axiosPost(Https.httpUrls.labelDelete, newData).then(
|
||||||
|
(rv: any) => {
|
||||||
|
if (rv) {
|
||||||
|
message.success('Delete success')
|
||||||
|
collectionList.value.splice(index,1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Modal.confirm({
|
||||||
|
title: "Are you sure about the label? The label associated with the product will become invalid after deletion!",
|
||||||
|
icon: createVNode(WarningOutlined),
|
||||||
|
class:'confirm_style',
|
||||||
|
okText: 'Ok',
|
||||||
|
cancelText: 'Cancel',
|
||||||
|
// centered:true,
|
||||||
|
onOk() {
|
||||||
|
confirmDelete(data,index)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
tableHeight.value = tableParent.value.clientHeight - 100
|
||||||
|
getLabelist()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
return {
|
||||||
|
...toRefs(filter),
|
||||||
|
tableHeight,
|
||||||
|
tableParent,
|
||||||
|
tableLoading,
|
||||||
|
columns,
|
||||||
|
collectionList,
|
||||||
|
currentPage,
|
||||||
|
pageSize,
|
||||||
|
total,
|
||||||
|
formRef,
|
||||||
|
formState,
|
||||||
|
changePage,
|
||||||
|
searchList,
|
||||||
|
resetList,
|
||||||
|
deleteLabel
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.label_manage_page{
|
||||||
|
padding-left: 28px;
|
||||||
|
.list_page_content{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.list_table_content{
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.operate_list{
|
||||||
|
text-align: center;
|
||||||
|
.operate_item{
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: Roboto;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #343579;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,414 @@
|
|||||||
|
<template>
|
||||||
|
<div class="task_manage_page list_page">
|
||||||
|
<div class="list_page_content">
|
||||||
|
<div class="list_top_content">
|
||||||
|
<!-- <div class="list_top_search_content">
|
||||||
|
<div class="search_content_left">
|
||||||
|
<filterComponent :title="'Task Name'"><a-input v-model:value="name" size="large" placeholder="Please input Task Name or Id" @keydown.enter="searchList"/></filterComponent>
|
||||||
|
|
||||||
|
<filterComponent :title="'Fashion Attributes'">
|
||||||
|
<a-select
|
||||||
|
v-model:value="type"
|
||||||
|
size="large"
|
||||||
|
style="width:280px"
|
||||||
|
:options="taskTypeList"
|
||||||
|
placeholder="Please select"
|
||||||
|
allowClear
|
||||||
|
></a-select>
|
||||||
|
</filterComponent>
|
||||||
|
|
||||||
|
<filterComponent :title="'Date'"><a-range-picker v-model:value="addTime" size="large" :placeholder="['Start Time', 'End Time']" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"/></filterComponent>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="list_top_button_content">
|
||||||
|
<a-button class="primary_button btn-margin-r-20" type="primary" size="large" @click="searchList()">Seach</a-button>
|
||||||
|
<a-button class="default_button" size="large" @click="resetList()">Reset</a-button>
|
||||||
|
<a-button class="primary_button btn-margin-t-35" type="primary" size="large" @click="addTask()">+Add Task</a-button>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
<div class="list_table_content">
|
||||||
|
<a-table :columns="columns" :data-source="collectionList" @change="changePage" :loading="tableLoading"
|
||||||
|
:pagination="{
|
||||||
|
showSizeChanger:true,
|
||||||
|
current: currentPage,
|
||||||
|
pageSize:pageSize,
|
||||||
|
total: total,
|
||||||
|
showQuickJumper:true,
|
||||||
|
bordered:false,
|
||||||
|
pageSizeOptions:['10','20','50'],
|
||||||
|
}">
|
||||||
|
<template v-slot:bodyCell="{column,record, index}" >
|
||||||
|
<template v-if="column.dataIndex === 'operation'">
|
||||||
|
<div class="operate_list">
|
||||||
|
<div class="operate_item" @click="editTask(record)">Detail</div>
|
||||||
|
<!-- <div class="operate_item" @click="deleteTask(record,index)">Delete</div> -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a-modal class="edit_modal_component"
|
||||||
|
:destroyOnClose="true"
|
||||||
|
v-model:visible="editTaskModal"
|
||||||
|
:footer="null"
|
||||||
|
:title="editTaskTitle"
|
||||||
|
width="560px"
|
||||||
|
:maskClosable="false"
|
||||||
|
:centered="true"
|
||||||
|
@cancel="closeTask"
|
||||||
|
>
|
||||||
|
<a-form ref="formRef" :model="formState" :rules="rules" :layout="'vertical'" >
|
||||||
|
<a-row :gutter="[16,16]">
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="Task Name" name="taskName">
|
||||||
|
<a-input v-model:value="formState.taskName" size="large" placeholder="Please input task name" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="Target Value" name="targetValue">
|
||||||
|
<a-input v-model:value="formState.targetValue" size="large" placeholder="Please enter the number of stars"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-form-item label="Date" name="Date">
|
||||||
|
<a-range-picker v-model:value="formState.time" size="large" style="width: 100%;" :placeholder="['Start Time', 'End Time']" :show-time="{ format: 'HH:mm:ss' }"
|
||||||
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
valueFormat="YYYY-MM-DD HH:mm:ss"/>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item label="Description" name="description">
|
||||||
|
<a-textarea :disabled="true" style="max-height: 200px;" v-model:value="formState.description" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item label="Task List">
|
||||||
|
<div class="taskConditionList" v-for="item,index in formState.taskConditionList">
|
||||||
|
<!-- <a-checkbox v-model:checked="item.checked" style="margin-bottom: 20px;">
|
||||||
|
{{ item.viewName }}
|
||||||
|
</a-checkbox> -->
|
||||||
|
<div class="taskConditionList-title">{{ item.viewName }}</div>
|
||||||
|
<div class="taskConditionList-item">
|
||||||
|
<div class="">Condition Field:</div>
|
||||||
|
<!-- <a-input v-model:value="item.conditionValue" size="large" placeholder="Please input conditionValue"/> -->
|
||||||
|
<a-input :disabled="true" v-model:value="item.conditionField" size="large" placeholder="Please input condition value"/>
|
||||||
|
<!-- <a-select style="flex: 1;" v-model:value="item.conditionField" size="large" :options="taskTypeList" placeholder="Please select Fashion Attributes"></a-select> -->
|
||||||
|
</div>
|
||||||
|
<div class="taskConditionList-item">
|
||||||
|
<div>Condition Operator:</div>
|
||||||
|
<a-input :disabled="true" v-model:value="item.conditionOperator" size="large" placeholder="Please input condition operator"/>
|
||||||
|
</div>
|
||||||
|
<div class="taskConditionList-item">
|
||||||
|
<div>Condition Value:</div>
|
||||||
|
<a-input :disabled="!(isEdit.indexOf(item.id)>-1)" v-model:value="item.conditionValue" size="large" placeholder="Please input total prices"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <div class="taskConditionList-item">
|
||||||
|
<div>TotalPrices:</div>
|
||||||
|
<a-input v-model:value="item.conditionValue" size="large" placeholder="Please input total prices"/>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
</a-form-item>
|
||||||
|
<!-- <a-form-item label="Task Time" :title="'Mission Time'" name="time">
|
||||||
|
<a-range-picker
|
||||||
|
size="large"
|
||||||
|
style="width:100%"
|
||||||
|
v-model:value="formState.time"
|
||||||
|
:placeholder="['Start Time', 'End Time']"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
valueFormat="YYYY-MM-DD"
|
||||||
|
/>
|
||||||
|
</a-form-item> -->
|
||||||
|
|
||||||
|
|
||||||
|
</a-form>
|
||||||
|
<div class="modal_button_list">
|
||||||
|
<a-button class="default_button btn-margin-r-20" size="large" @click="closeTask">Cancel</a-button>
|
||||||
|
<a-button class="primary_button" type="primary" size="large" @click="confirmSubmit">Submit</a-button>
|
||||||
|
</div>
|
||||||
|
</a-modal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { defineComponent,ref,reactive,toRefs,UnwrapRef,onMounted,createVNode } from "vue";
|
||||||
|
import filterComponent from '@/component/filterComponent.vue'
|
||||||
|
import { Moment } from 'moment';
|
||||||
|
import { message,Modal } from "ant-design-vue";
|
||||||
|
import { WarningOutlined } from '@ant-design/icons-vue';
|
||||||
|
import { Https } from "@/tool/https";
|
||||||
|
import { formatTime, startTime, endTime } from "@/tool/util"
|
||||||
|
import { Item } from "ant-design-vue/lib/menu";
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name:'taskManage',
|
||||||
|
components:{filterComponent},
|
||||||
|
setup(){
|
||||||
|
let filter:any = reactive({
|
||||||
|
name:'',
|
||||||
|
time:'',
|
||||||
|
addTime:ref<Moment[]>([])
|
||||||
|
})
|
||||||
|
let setTime = (startTime:any,endTime:any)=>{
|
||||||
|
return endTime
|
||||||
|
}
|
||||||
|
let isEdit = [3,4,5,7]
|
||||||
|
let tableLoading = ref(false)
|
||||||
|
let taskTypeList:any = ref([
|
||||||
|
{ value:'CUSTOM',task:'greater than'},
|
||||||
|
{ value:'NEW_PRODUCT',task:'less than'},
|
||||||
|
{ value:'SALE',task:'equal to'},
|
||||||
|
])
|
||||||
|
let columns = reactive([
|
||||||
|
{ title: 'Task Name', align:'center', ellipsis: true, dataIndex: 'taskName', key: 'taskName' },
|
||||||
|
{ title: 'Target Value', align:'center', ellipsis: true, dataIndex: 'targetValue', key: 'targetValue' },
|
||||||
|
// { title: 'Task Product Counts', align:'center', ellipsis: true, dataIndex: 'counts', key: 'counts' },
|
||||||
|
{ title: 'Add Time', align:'center', ellipsis: true, dataIndex: 'createTime', key: 'createTime',customRender:(record:any)=>{
|
||||||
|
// let time = formatTime(record.text / 1000, 'YYYY-MM-DD hh:mm:ss')
|
||||||
|
let time = record.text.split('T')[0]+' '+record.text.split('T')[1]
|
||||||
|
return time },
|
||||||
|
},
|
||||||
|
{ title: 'startTime', align:'center', ellipsis: true, dataIndex: 'startTime', key: 'startTime',customRender:(record:any)=>{
|
||||||
|
// let time = formatTime(record.text / 1000, 'YYYY-MM-DD hh:mm:ss')
|
||||||
|
let time = record.text.split('T')[0]+' '+record.text.split('T')[1]
|
||||||
|
return time },
|
||||||
|
},
|
||||||
|
{ title: 'endTime', align:'center', ellipsis: true, dataIndex: 'endTime', key: 'endTime',customRender:(record:any)=>{
|
||||||
|
// let time = formatTime(record.text / 1000, 'YYYY-MM-DD hh:mm:ss')
|
||||||
|
let time = record.text.split('T')[0]+' '+record.text.split('T')[1]
|
||||||
|
return time },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Actions',
|
||||||
|
key: 'operation',
|
||||||
|
align:'center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: 150,
|
||||||
|
dataIndex:'operation',
|
||||||
|
|
||||||
|
},
|
||||||
|
])
|
||||||
|
let collectionList = ref([])
|
||||||
|
let currentPage = ref(1)
|
||||||
|
let pageSize = ref(10)
|
||||||
|
let total = ref(1)
|
||||||
|
let editTaskModal = ref(false)
|
||||||
|
let editTaskTitle = ref('Add Task')
|
||||||
|
let formRef = ref();
|
||||||
|
let formState:any = ref({
|
||||||
|
id: '',
|
||||||
|
taskName: '',
|
||||||
|
description:'',
|
||||||
|
taskConditionList:[],
|
||||||
|
targetValue:1,
|
||||||
|
time:ref([]),
|
||||||
|
});
|
||||||
|
let rules = reactive({
|
||||||
|
taskName: [
|
||||||
|
{ required: true, message: 'Please input task name', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
targetValue: [
|
||||||
|
{ required: true, message: 'Please enter the number of stars', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
time: [
|
||||||
|
{ required: true, message: 'Please enter the task time', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
})
|
||||||
|
// let conditionList = ref([
|
||||||
|
// { viewName: '数量', conditionOperator: 'type' ,checked:false, conditionValue:'1', conditionField:'greater than'},
|
||||||
|
// { viewName: '价格', conditionOperator: 'createUserName' ,checked:false, conditionValue:'1', conditionField:'greater than'},
|
||||||
|
// { viewName: '指定衣服', conditionOperator: 'SpecifiedClothing' ,checked:false, conditionValue:'1', conditionField:'greater than'},
|
||||||
|
// ])
|
||||||
|
let changePage = (e:any) =>{
|
||||||
|
currentPage.value = e.current
|
||||||
|
pageSize.value = e.pageSize
|
||||||
|
getTaskist()
|
||||||
|
}
|
||||||
|
|
||||||
|
let closeTask = () =>{
|
||||||
|
formState.value = {
|
||||||
|
id: '',
|
||||||
|
description:'',
|
||||||
|
taskName: '',
|
||||||
|
taskConditionList:[],
|
||||||
|
targetValue:0,
|
||||||
|
time:[],
|
||||||
|
}
|
||||||
|
editTaskModal.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
let addTask = () =>{
|
||||||
|
editTaskTitle.value = 'Add Task'
|
||||||
|
editTaskModal.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
let editTask = (data:any,) =>{
|
||||||
|
editTaskModal.value = true
|
||||||
|
editTaskTitle.value = 'Edit Task'
|
||||||
|
formState.value = {
|
||||||
|
id: data.id,
|
||||||
|
taskName: data.taskName,
|
||||||
|
description: data.description,
|
||||||
|
targetValue:data.targetValue,
|
||||||
|
taskConditionList:data.taskConditionList,
|
||||||
|
// time:[1726711071,1726721071],
|
||||||
|
time:[data.startTime.split('T')[0]+' '+data.startTime.split('T')[1],data.endTime.split('T')[0]+' '+data.endTime.split('T')[1]],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let getTaskist = () =>{
|
||||||
|
let data = {
|
||||||
|
page:currentPage.value,
|
||||||
|
size:pageSize.value
|
||||||
|
}
|
||||||
|
tableLoading.value = true
|
||||||
|
Https.axiosPost(Https.httpUrls.salesIncentivesQueryPage, data).then(
|
||||||
|
(rv: any) => {
|
||||||
|
if (rv) {
|
||||||
|
tableLoading.value = false
|
||||||
|
collectionList.value = rv.content
|
||||||
|
total.value = rv.total
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
let confirmSubmit = () =>{
|
||||||
|
let data = {
|
||||||
|
...formState.value,
|
||||||
|
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||||
|
}
|
||||||
|
data.startTimeString = data.time[0]
|
||||||
|
data.endTimeString = data.time[1]
|
||||||
|
formRef.value.validate().then(()=>{
|
||||||
|
submit()
|
||||||
|
})
|
||||||
|
let submit = () => {
|
||||||
|
Https.axiosPost(Https.httpUrls.salesIncentivesAddTask, data).then(
|
||||||
|
(rv: any) => {
|
||||||
|
if (rv) {
|
||||||
|
let tip = !formState.value.id ? 'Task added successfully' :'Edit task successfully'
|
||||||
|
message.success(tip)
|
||||||
|
resetList()
|
||||||
|
closeTask()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
let searchList = () =>{
|
||||||
|
currentPage.value = 1
|
||||||
|
getTaskist()
|
||||||
|
}
|
||||||
|
|
||||||
|
let resetList = () =>{
|
||||||
|
currentPage.value = 1
|
||||||
|
filter.name = ''
|
||||||
|
filter.addTime = ref<Moment[]>([])
|
||||||
|
getTaskist()
|
||||||
|
}
|
||||||
|
|
||||||
|
let deleteTask = (data:any,index:any) =>{
|
||||||
|
let confirmDelete = (data:any,index:any) =>{
|
||||||
|
let newData = {
|
||||||
|
id:data.id
|
||||||
|
}
|
||||||
|
// Https.axiosPost(Https.httpUrls.taskDelete, newData).then(
|
||||||
|
// (rv: any) => {
|
||||||
|
// if (rv) {
|
||||||
|
// message.success('Delete success')
|
||||||
|
// collectionList.value.splice(index,1)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
Modal.confirm({
|
||||||
|
title: "Are you sure about the task? The task associated with the product will become invalid after deletion!",
|
||||||
|
icon: createVNode(WarningOutlined),
|
||||||
|
class:'confirm_style',
|
||||||
|
okText: 'Ok',
|
||||||
|
cancelText: 'Cancel',
|
||||||
|
// centered:true,
|
||||||
|
onOk() {
|
||||||
|
confirmDelete(data,index)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
getTaskist()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
return {
|
||||||
|
...toRefs(filter),
|
||||||
|
isEdit,
|
||||||
|
setTime,
|
||||||
|
tableLoading,
|
||||||
|
taskTypeList,
|
||||||
|
columns,
|
||||||
|
collectionList,
|
||||||
|
currentPage,
|
||||||
|
pageSize,
|
||||||
|
total,
|
||||||
|
editTaskModal,
|
||||||
|
editTaskTitle,
|
||||||
|
formRef,
|
||||||
|
formState,
|
||||||
|
rules,
|
||||||
|
changePage,
|
||||||
|
closeTask,
|
||||||
|
addTask,
|
||||||
|
editTask,
|
||||||
|
confirmSubmit,
|
||||||
|
searchList,
|
||||||
|
resetList,
|
||||||
|
deleteTask
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.task_manage_page{
|
||||||
|
padding-left: 28px;
|
||||||
|
|
||||||
|
.operate_list{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
justify-content: center;
|
||||||
|
.operate_item{
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: Roboto;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #343579;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.taskConditionList{
|
||||||
|
margin-bottom: 24px;
|
||||||
|
background: #f7f8fc;
|
||||||
|
border: 1px solid #DFDFDF;
|
||||||
|
padding: 20px;
|
||||||
|
.taskConditionList-title{
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.taskConditionList-item{
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
>div{
|
||||||
|
width: 140px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.taskConditionList-item:last-child{
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="list_top_search_content">
|
<div class="list_top_search_content">
|
||||||
<div class="search_content_left">
|
<div class="search_content_left">
|
||||||
<filterComponent :title="'Label Name'"><a-input v-model:value="name" size="large" placeholder="Please input Label Name or Id" @keydown.enter="searchList"/></filterComponent>
|
<filterComponent :title="'Label Name'"><a-input v-model:value="name" size="large" placeholder="Please input Label Name or Id" @keydown.enter="searchList"/></filterComponent>
|
||||||
<filterComponent :title="'Label attributes'">
|
<filterComponent :title="'Fashion Attributes'">
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="type"
|
v-model:value="type"
|
||||||
size="large"
|
size="large"
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
allowClear
|
allowClear
|
||||||
></a-select>
|
></a-select>
|
||||||
</filterComponent>
|
</filterComponent>
|
||||||
<filterComponent :title="'Add Time'"><a-range-picker v-model:value="addTime" size="large" :placeholder="['Start Time', 'End Time']" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"/></filterComponent>
|
<filterComponent :title="'Date'"><a-range-picker v-model:value="addTime" size="large" :placeholder="['Start Time', 'End Time']" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"/></filterComponent>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list_top_button_content">
|
<div class="list_top_button_content">
|
||||||
@@ -62,8 +62,8 @@
|
|||||||
<a-form-item label="Label Name" name="name">
|
<a-form-item label="Label Name" name="name">
|
||||||
<a-input v-model:value="formState.name" size="large" placeholder="Please input label name" />
|
<a-input v-model:value="formState.name" size="large" placeholder="Please input label name" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="Label attributes" name="type">
|
<a-form-item label="Fashion Attributes" name="type">
|
||||||
<a-select v-model:value="formState.type" size="large" :options="labelTypeList" placeholder="Please select label attributes"></a-select>
|
<a-select v-model:value="formState.type" size="large" :options="labelTypeList" placeholder="Please select Fashion Attributes"></a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="Remarks" name="remarks">
|
<a-form-item label="Remarks" name="remarks">
|
||||||
<a-input v-model:value="formState.remarks" size="large" placeholder="Please input remarks"/>
|
<a-input v-model:value="formState.remarks" size="large" placeholder="Please input remarks"/>
|
||||||
@@ -108,7 +108,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
let columns = reactive([
|
let columns = reactive([
|
||||||
{ title: 'Label Name', align:'center', ellipsis: true, dataIndex: 'name', key: 'name' },
|
{ title: 'Label Name', align:'center', ellipsis: true, dataIndex: 'name', key: 'name' },
|
||||||
{ title: 'Label attributes', align:'center', ellipsis: true, dataIndex: 'type', key: 'type', customRender:(record:any)=>{
|
{ title: 'Fashion Attributes', align:'center', ellipsis: true, dataIndex: 'type', key: 'type', customRender:(record:any)=>{
|
||||||
let labelType = labelTypeData[record.text]
|
let labelType = labelTypeData[record.text]
|
||||||
return labelType },
|
return labelType },
|
||||||
},
|
},
|
||||||
@@ -120,7 +120,7 @@ export default defineComponent({
|
|||||||
return time },
|
return time },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Operations',
|
title: 'Actions',
|
||||||
key: 'operation',
|
key: 'operation',
|
||||||
align:'center',
|
align:'center',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
@@ -147,7 +147,7 @@ export default defineComponent({
|
|||||||
{ required: true, message: 'Please input label name', trigger: 'blur' },
|
{ required: true, message: 'Please input label name', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
type: [
|
type: [
|
||||||
{ required: true, message: 'Please select label attributes', trigger: 'blur' },
|
{ required: true, message: 'Please select Fashion Attributes', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
let editLabel = (data:any,) =>{
|
let editLabel = (data:any,) =>{
|
||||||
editLabelModal.value = true
|
editLabelModal.value = true
|
||||||
editLabelTitle.value = 'Eidt Label'
|
editLabelTitle.value = 'Edit Label'
|
||||||
formState.value = {
|
formState.value = {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
|
|||||||
@@ -50,9 +50,10 @@
|
|||||||
<div class="detail_item_block">
|
<div class="detail_item_block">
|
||||||
<div class="detail_item_title_block">
|
<div class="detail_item_title_block">
|
||||||
<span class="icon iconfont icon-a-gengduocaidangongneng detail_icon"></span>
|
<span class="icon iconfont icon-a-gengduocaidangongneng detail_icon"></span>
|
||||||
<div>Label attributes</div>
|
<div>Fashion Attributes</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="detail_item_content">
|
<div class="detail_item_content">
|
||||||
|
<div class="detail_item_sec_title red_muts">Category</div>
|
||||||
<div class="productCategory_block">{{formState.productCategory}}</div>
|
<div class="productCategory_block">{{formState.productCategory}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -306,6 +307,7 @@ export default defineComponent({
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
color: #030303;
|
color: #030303;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail_item_content{
|
.detail_item_content{
|
||||||
@@ -335,6 +337,7 @@ export default defineComponent({
|
|||||||
color: #030303;
|
color: #030303;
|
||||||
height: 46px;
|
height: 46px;
|
||||||
border: 1px solid #DFDFDF;
|
border: 1px solid #DFDFDF;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail_item_sec_title{
|
.detail_item_sec_title{
|
||||||
@@ -344,6 +347,20 @@ export default defineComponent({
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
color: #030303;
|
color: #030303;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
&.red_muts{
|
||||||
|
padding-left: 28px;
|
||||||
|
}
|
||||||
|
// &.red_muts::before{
|
||||||
|
// color: red;
|
||||||
|
// margin-right: 5px;
|
||||||
|
// display: inline-block;
|
||||||
|
// margin-right: 4px;
|
||||||
|
// color: #ff4d4f;
|
||||||
|
// font-size: 14px;
|
||||||
|
// font-family: SimSun, sans-serif;
|
||||||
|
// line-height: 1;
|
||||||
|
// content: '*';
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
.sec_title_margin{
|
.sec_title_margin{
|
||||||
|
|||||||
@@ -13,12 +13,18 @@
|
|||||||
<filterComponent :title="'On Sale State'">
|
<filterComponent :title="'On Sale State'">
|
||||||
<a-select v-model:value="onSaleState" size="large" style="width:280px" :options="onSaleStateList" placeholder="Please select" allowClear optionFilterProp="label" show-search></a-select>
|
<a-select v-model:value="onSaleState" size="large" style="width:280px" :options="onSaleStateList" placeholder="Please select" allowClear optionFilterProp="label" show-search></a-select>
|
||||||
</filterComponent>
|
</filterComponent>
|
||||||
<filterComponent :title="'Label attributes'">
|
<filterComponent :title="'Fashion Attributes'">
|
||||||
<a-select v-model:value="labelTypeMap" size="large" style="width:280px" :options="labelTypeList" placeholder="Please select" allowClear @change="labelTypeChange" optionFilterProp="label" show-search></a-select>
|
<a-select v-model:value="labelTypeMap" size="large" style="width:280px" :options="labelTypeList" placeholder="Please select" allowClear @change="labelTypeChange" optionFilterProp="label" show-search></a-select>
|
||||||
</filterComponent>
|
</filterComponent>
|
||||||
<filterComponent :title="'Add Time'"><a-range-picker v-model:value="addTime" size="large" :placeholder="['Start Time', 'End Time']" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"/></filterComponent>
|
<filterComponent :title="'Date'"><a-range-picker v-model:value="addTime" size="large" :placeholder="['Start Time', 'End Time']" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"/></filterComponent>
|
||||||
<filterComponent :title="'Store'">
|
<filterComponent :title="'Store'">
|
||||||
<a-select v-model:value="storeIds" size="large" style="width:280px" :options="shopList" placeholder="Please select" allowClear optionFilterProp="label" show-search></a-select>
|
<a-select v-model:value="storeIds" size="large" style="width:280px" :options="shopList" placeholder="Please select" allowClear optionFilterProp="label" show-search></a-select>
|
||||||
|
</filterComponent>
|
||||||
|
<filterComponent :title="'PluCode'">
|
||||||
|
<a-input v-model:value="pluCode" size="large" placeholder="Please input pluCode" />
|
||||||
|
</filterComponent>
|
||||||
|
<filterComponent :title="'Color'">
|
||||||
|
<a-input v-model:value="color" size="large" placeholder="Please input color" />
|
||||||
</filterComponent>
|
</filterComponent>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -75,8 +81,8 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'operation'">
|
<template v-if="column.dataIndex === 'operation'">
|
||||||
<div class="operate_list">
|
<div class="operate_list">
|
||||||
|
<div class="operate_item" @click="toProductDteail(record)" v-if="operatePermission.DETAIL">Details</div>
|
||||||
<div class="operate_item" @click="editProduct(record)" v-if="operatePermission.EDIT">Edit</div>
|
<div class="operate_item" @click="editProduct(record)" v-if="operatePermission.EDIT">Edit</div>
|
||||||
<div class="operate_item" @click="toProductDteail(record)" v-if="operatePermission.DETAIL">Detail</div>
|
|
||||||
<div class="operate_item" @click="deleteProduct(record,index)" v-if="operatePermission.DELETE">Delete</div>
|
<div class="operate_item" @click="deleteProduct(record,index)" v-if="operatePermission.DELETE">Delete</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -123,6 +129,8 @@ export default defineComponent({
|
|||||||
labelTypeMap:[],
|
labelTypeMap:[],
|
||||||
addTime:ref<Moment[]>([]),
|
addTime:ref<Moment[]>([]),
|
||||||
storeIds:[],
|
storeIds:[],
|
||||||
|
pluCode:'',
|
||||||
|
color:'',
|
||||||
})
|
})
|
||||||
let filterLabelTypeMap :any = ref({})
|
let filterLabelTypeMap :any = ref({})
|
||||||
let tableLoading = ref(false)
|
let tableLoading = ref(false)
|
||||||
@@ -144,11 +152,12 @@ export default defineComponent({
|
|||||||
{ title: 'Product Pic', align:'center', ellipsis: true, dataIndex: 'pictureUrl', key: 'pictureUrl' },
|
{ title: 'Product Pic', align:'center', ellipsis: true, dataIndex: 'pictureUrl', key: 'pictureUrl' },
|
||||||
{ title: 'Product Label', align:'center', dataIndex: 'productLabel', key: 'productLabel'},
|
{ title: 'Product Label', align:'center', dataIndex: 'productLabel', key: 'productLabel'},
|
||||||
{ title: 'Category', align:'center', ellipsis: true, dataIndex: 'labelItem', key: 'labelItem'},
|
{ title: 'Category', align:'center', ellipsis: true, dataIndex: 'labelItem', key: 'labelItem'},
|
||||||
{ title: 'Label attributes', align:'center', dataIndex: 'labelType', key: 'labelType'},
|
{ title: 'Fashion Attributes', align:'center', dataIndex: 'labelType', key: 'labelType'},
|
||||||
{ title: 'Shop', align:'center', dataIndex: 'shop', key: 'shop' },
|
{ title: 'Shop', align:'center', dataIndex: 'shop', key: 'shop' },
|
||||||
{ title: 'Inventory', align:'center', ellipsis: true, dataIndex: 'total', key: 'total', sorter:()=>{},
|
{ title: 'Inventory', align:'center', ellipsis: true, dataIndex: 'total', key: 'total', sorter:()=>{},
|
||||||
sortOrder: sorted.columnKey === 'total' && sorted.order,
|
sortOrder: sorted.columnKey === 'total' && sorted.order,
|
||||||
},
|
},
|
||||||
|
{ title: 'pluCode', align:'center', dataIndex: 'pluCode', key: 'pluCode' },
|
||||||
{ title: 'price', align:'center', ellipsis: true, dataIndex: 'price', key: 'price',customRender:(record:any)=>{
|
{ title: 'price', align:'center', ellipsis: true, dataIndex: 'price', key: 'price',customRender:(record:any)=>{
|
||||||
let newPrrice = '$' + record.text
|
let newPrrice = '$' + record.text
|
||||||
return newPrrice },
|
return newPrrice },
|
||||||
@@ -163,7 +172,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
{ title: 'On Sale State', align:'center', ellipsis: true, dataIndex: 'onSaleState', key: 'onSaleState' },
|
{ title: 'On Sale State', align:'center', ellipsis: true, dataIndex: 'onSaleState', key: 'onSaleState' },
|
||||||
{
|
{
|
||||||
title: 'Operations',
|
title: 'Actions',
|
||||||
key: 'operation',
|
key: 'operation',
|
||||||
align:'center',
|
align:'center',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
@@ -281,6 +290,8 @@ export default defineComponent({
|
|||||||
onSaleState:filter.onSaleState && filter.onSaleState.length ? filter.onSaleState : '',
|
onSaleState:filter.onSaleState && filter.onSaleState.length ? filter.onSaleState : '',
|
||||||
labelTypeMap:filterLabelTypeMap.value,
|
labelTypeMap:filterLabelTypeMap.value,
|
||||||
storeIds:filter.storeIds && filter.storeIds.length ? [filter.storeIds] : [],
|
storeIds:filter.storeIds && filter.storeIds.length ? [filter.storeIds] : [],
|
||||||
|
pluCode:filter.pluCode && filter.pluCode.length ? filter.pluCode : '',
|
||||||
|
color:filter.color && filter.color.length ? filter.color : '',
|
||||||
createDateStart:filter.addTime && filter.addTime.length ? startTime(filter.addTime[0]) : '',
|
createDateStart:filter.addTime && filter.addTime.length ? startTime(filter.addTime[0]) : '',
|
||||||
createDateEnd:filter.addTime && filter.addTime.length ? endTime(filter.addTime[1]) : '',
|
createDateEnd:filter.addTime && filter.addTime.length ? endTime(filter.addTime[1]) : '',
|
||||||
page:currentPage.value,
|
page:currentPage.value,
|
||||||
@@ -415,6 +426,8 @@ export default defineComponent({
|
|||||||
onSaleState:filter.onSaleState && filter.onSaleState.length ? filter.onSaleState : '',
|
onSaleState:filter.onSaleState && filter.onSaleState.length ? filter.onSaleState : '',
|
||||||
labelTypeMap:filterLabelTypeMap.value,
|
labelTypeMap:filterLabelTypeMap.value,
|
||||||
storeIds:filter.storeIds && filter.storeIds.length ? [filter.storeIds] : [],
|
storeIds:filter.storeIds && filter.storeIds.length ? [filter.storeIds] : [],
|
||||||
|
pluCode:filter.pluCode && filter.pluCode.length ? filter.pluCode : '',
|
||||||
|
color:filter.color && filter.color.length ? filter.color : '',
|
||||||
createDateStart:filter.addTime && filter.addTime.length ? startTime(filter.addTime[0]) : '',
|
createDateStart:filter.addTime && filter.addTime.length ? startTime(filter.addTime[0]) : '',
|
||||||
createDateEnd:filter.addTime && filter.addTime.length ? endTime(filter.addTime[1]) : '',
|
createDateEnd:filter.addTime && filter.addTime.length ? endTime(filter.addTime[1]) : '',
|
||||||
}
|
}
|
||||||
@@ -442,6 +455,8 @@ export default defineComponent({
|
|||||||
filter.labelTypeMap = []
|
filter.labelTypeMap = []
|
||||||
filter.addTime = ref<Moment[]>([])
|
filter.addTime = ref<Moment[]>([])
|
||||||
filter.storeIds = []
|
filter.storeIds = []
|
||||||
|
filter.pluCode = '',
|
||||||
|
filter.color = '',
|
||||||
sortedInfo.value = null
|
sortedInfo.value = null
|
||||||
columnSortListData = []
|
columnSortListData = []
|
||||||
getProductlist()
|
getProductlist()
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
<a-form-item label="Store Name" name="name">
|
<a-form-item label="Store Name" name="name">
|
||||||
<a-input v-model:value="formState.name" size="large" placeholder="Please input store name"/>
|
<a-input v-model:value="formState.name" size="large" placeholder="Please input store name"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="Store Adress" name="address">
|
<a-form-item label="Adress" name="address">
|
||||||
<a-input v-model:value="formState.address" size="large" placeholder="Please select"/>
|
<a-input v-model:value="formState.address" size="large" placeholder="Please select"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="Remarks" name="remarks">
|
<a-form-item label="Remarks" name="remarks">
|
||||||
@@ -94,7 +94,7 @@ export default defineComponent({
|
|||||||
return time },
|
return time },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Operations',
|
title: 'Actions',
|
||||||
key: 'operation',
|
key: 'operation',
|
||||||
align:'center',
|
align:'center',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
@@ -149,7 +149,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
let editStore = (data:any,) =>{
|
let editStore = (data:any,) =>{
|
||||||
editStoreModal.value = true
|
editStoreModal.value = true
|
||||||
editStoreTitle.value = 'Eidt Store'
|
editStoreTitle.value = 'Edit Store'
|
||||||
formState.value = {
|
formState.value = {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="form_item_title required">Role Permission</div>
|
<div class="form_item_title required">Role Permission</div>
|
||||||
<a-checkbox class="form_check_all" size="large" v-model:checked="permissionCheckAll" @change="perCheckAll">All</a-checkbox>
|
<a-checkbox class="form_check_all" size="large" v-model:checked="permissionCheckAll" @change="perCheckAll">All</a-checkbox>
|
||||||
<table class="permission_table">{{ rolePermission }}
|
<table class="permission_table">
|
||||||
<tr v-for="(role) in rolePermission" :key="role.code">
|
<tr v-for="(role) in rolePermission" :key="role.code">
|
||||||
<td class="first_td">
|
<td class="first_td">
|
||||||
<div class="table_td_block"><a-checkbox size="large" v-model:checked="role.select" @change="checkLevelFirst(role)">{{role.resource}}</a-checkbox></div>
|
<div class="table_td_block"><a-checkbox size="large" v-model:checked="role.select" @change="checkLevelFirst(role)">{{role.resource}}</a-checkbox></div>
|
||||||
@@ -61,13 +61,18 @@
|
|||||||
<td class="second_td">
|
<td class="second_td">
|
||||||
<div class="table_td_block" v-for="(menu) in role.level2ResourceList" :key="menu.code"><a-checkbox size="large" v-model:checked="menu.select" @change="checkLevelSec(role,menu)">{{menu.resource}}</a-checkbox></div>
|
<div class="table_td_block" v-for="(menu) in role.level2ResourceList" :key="menu.code"><a-checkbox size="large" v-model:checked="menu.select" @change="checkLevelSec(role,menu)">{{menu.resource}}</a-checkbox></div>
|
||||||
</td>
|
</td>
|
||||||
<td class="third_td">
|
<td class="third_td">
|
||||||
|
<div class="table_td_block td_block_padding0" v-for="(menu) in role.level2ResourceList" :key="menu.code">
|
||||||
|
<div class="table_td_block" v-for="(per) in menu.operationList" :key="per.code"><a-checkbox :disabled="!menu.select" size="large" v-model:checked="per.select">{{per.resource}}</a-checkbox></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<!-- <td class="third_td">
|
||||||
<div class="table_td_block" v-for="(menu) in role.level2ResourceList" :key="menu.code">
|
<div class="table_td_block" v-for="(menu) in role.level2ResourceList" :key="menu.code">
|
||||||
<div class="table_td_permission">
|
<div class="table_td_permission">
|
||||||
<div v-for="(per) in menu.operationList" :key="per.code"><a-checkbox :disabled="!menu.select" size="large" v-model:checked="per.select">{{per.resource}}</a-checkbox></div>
|
<div v-for="(per) in menu.operationList" :key="per.code"><a-checkbox :disabled="!menu.select" size="large" v-model:checked="per.select">{{per.resource}}</a-checkbox></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td> -->
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -100,7 +105,7 @@ export default defineComponent({
|
|||||||
{ title: 'Role Name', align:'center', ellipsis: true, dataIndex: 'name', key: 'name', width:250 },
|
{ title: 'Role Name', align:'center', ellipsis: true, dataIndex: 'name', key: 'name', width:250 },
|
||||||
{ title: 'Role Permission', align:'center', ellipsis: true, dataIndex: 'permission', key: 'permission'},
|
{ title: 'Role Permission', align:'center', ellipsis: true, dataIndex: 'permission', key: 'permission'},
|
||||||
{
|
{
|
||||||
title: 'Operations',
|
title: 'Actions',
|
||||||
key: 'operation',
|
key: 'operation',
|
||||||
align:'center',
|
align:'center',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
@@ -155,12 +160,18 @@ export default defineComponent({
|
|||||||
|
|
||||||
let editRole = (data:any,) =>{
|
let editRole = (data:any,) =>{
|
||||||
editRoleModal.value = true
|
editRoleModal.value = true
|
||||||
editRoleTitle.value = 'Eidt Role'
|
editRoleTitle.value = 'Edit Role'
|
||||||
formState.value = {
|
formState.value = {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
}
|
}
|
||||||
rolePermission.value = changeSelectBoolean(data.rolePermission.level1ResourceList)
|
rolePermission.value = changeSelectBoolean(data.rolePermission.level1ResourceList)
|
||||||
|
//添加新权限时候用
|
||||||
|
// backupRolePermission.value.forEach((backItem:any) => {
|
||||||
|
// if(!rolePermission.value.some((obj:any) => obj.code === backItem.code)){
|
||||||
|
// rolePermission.value.push(backItem)
|
||||||
|
// }
|
||||||
|
// });
|
||||||
permissionCheckAll.value = data.rolePermission.allSelect
|
permissionCheckAll.value = data.rolePermission.allSelect
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,7 +205,6 @@ export default defineComponent({
|
|||||||
if (rv) {
|
if (rv) {
|
||||||
rolePermission.value = changeSelectBoolean(rv)
|
rolePermission.value = changeSelectBoolean(rv)
|
||||||
backupRolePermission.value = changeSelectBoolean(rv)
|
backupRolePermission.value = changeSelectBoolean(rv)
|
||||||
console.log(rolePermission.value);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -212,6 +222,26 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// newData.push(
|
||||||
|
// {
|
||||||
|
// code:'Growing Through Life',
|
||||||
|
// level2ResourceList:[
|
||||||
|
// {
|
||||||
|
// code:'Growing Through Life',
|
||||||
|
// operationList:[],
|
||||||
|
// select:false,
|
||||||
|
// sort:11,
|
||||||
|
// },{
|
||||||
|
// code:'Growing Through Life',
|
||||||
|
// operationList:[],
|
||||||
|
// select:false,
|
||||||
|
// sort:11,
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// select:false,
|
||||||
|
// sort:11,
|
||||||
|
// }
|
||||||
|
// )
|
||||||
return newData
|
return newData
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,6 +478,10 @@ export default defineComponent({
|
|||||||
&:last-child{
|
&:last-child{
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
&.td_block_padding0{
|
||||||
|
// padding: 16px 0 16px 0px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.table_td_permission{
|
.table_td_permission{
|
||||||
@@ -457,12 +491,15 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
.first_td{
|
.first_td{
|
||||||
width: 120px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.second_td{
|
.second_td{
|
||||||
width: 150px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
.third_td{
|
||||||
|
width: 130px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<filterComponent :title="'User State'">
|
<filterComponent :title="'User State'">
|
||||||
<a-select v-model:value="state" size="large" style="width:280px" placeholder="Please select" :options="userStateList" allowClear></a-select>
|
<a-select v-model:value="state" size="large" style="width:280px" placeholder="Please select" :options="userStateList" allowClear></a-select>
|
||||||
</filterComponent>
|
</filterComponent>
|
||||||
<filterComponent :title="'Add Time'"><a-range-picker v-model:value="addTime" size="large" :placeholder="['Start Time', 'End Time']" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"/></filterComponent>
|
<filterComponent :title="'Date'"><a-range-picker v-model:value="addTime" size="large" :placeholder="['Start Time', 'End Time']" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"/></filterComponent>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list_top_button_content">
|
<div class="list_top_button_content">
|
||||||
@@ -177,7 +177,7 @@ export default defineComponent({
|
|||||||
{ title: 'Activated', align:'center', ellipsis: true, dataIndex: 'appUserName', key: 'appUserName' },
|
{ title: 'Activated', align:'center', ellipsis: true, dataIndex: 'appUserName', key: 'appUserName' },
|
||||||
{ title: 'User State', align:'center', ellipsis: true, dataIndex: 'stateName', key: 'stateName' },
|
{ title: 'User State', align:'center', ellipsis: true, dataIndex: 'stateName', key: 'stateName' },
|
||||||
{
|
{
|
||||||
title: 'Operations',
|
title: 'Actions',
|
||||||
key: 'operation',
|
key: 'operation',
|
||||||
align:'center',
|
align:'center',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
@@ -259,7 +259,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
let editUser = (data:any,) =>{
|
let editUser = (data:any,) =>{
|
||||||
editUserModal.value = true
|
editUserModal.value = true
|
||||||
editUserTitle.value = 'Eidt user'
|
editUserTitle.value = 'Edit user'
|
||||||
formState.value = {
|
formState.value = {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
userName: data.userName,
|
userName: data.userName,
|
||||||
|
|||||||
Reference in New Issue
Block a user