[ci] 添加自动部署能力
This commit is contained in:
parent
dabf1774b0
commit
36b711c53a
|
@ -5,7 +5,7 @@ VITE_APP_TITLE = 若依管理系统
|
|||
VITE_APP_ENV = 'staging'
|
||||
|
||||
# 若依管理系统/生产环境
|
||||
VITE_APP_BASE_API = '/stage-api'
|
||||
VITE_APP_BASE_API = '/sit-api'
|
||||
|
||||
# 是否在打包时开启压缩,支持 gzip 和 brotli
|
||||
VITE_BUILD_COMPRESS = gzip
|
|
@ -0,0 +1,3 @@
|
|||
FROM nginx
|
||||
COPY dist/ /usr/share/nginx/html/
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
@ -0,0 +1,13 @@
|
|||
version: "3.8"
|
||||
services:
|
||||
market-admin:
|
||||
image: 192.168.31.22:8083/market-admin:sit
|
||||
ports:
|
||||
- "12000:80"
|
||||
networks:
|
||||
- market_net
|
||||
restart: always
|
||||
|
||||
networks:
|
||||
market_net:
|
||||
external: true
|
|
@ -0,0 +1,13 @@
|
|||
version: "3.8"
|
||||
services:
|
||||
market-admin:
|
||||
image: market-admin
|
||||
ports:
|
||||
- "12000:80"
|
||||
networks:
|
||||
- market_net
|
||||
restart: always
|
||||
|
||||
networks:
|
||||
market_net:
|
||||
external: true
|
|
@ -0,0 +1,21 @@
|
|||
server {
|
||||
listen 80;
|
||||
|
||||
#charset koi8-r;
|
||||
access_log /var/log/nginx/host.access.log main;
|
||||
error_log /var/log/nginx/error.log error;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
|
@ -9,6 +9,15 @@ export function listCategory(query) {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询商品分类树
|
||||
export function listCategoryTree(query) {
|
||||
return request({
|
||||
url: '/product/category/app/tree',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询商品分类详细
|
||||
export function getCategory(catId) {
|
||||
return request({
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683022011926" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2156" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M205.653333 737.066667c-29.184 0-55.637333-23.893333-55.637333-52.906667s23.893333-53.034667 55.68-53.034667c31.914667 0 55.893333 23.893333 55.893333 52.992s-26.538667 52.906667-55.68 52.906667z m683.178667-288.554667c-5.76-42.325333-32-76.8-66.56-103.253333l-13.44-10.666667-10.837333 13.226667c-21.077333 23.893333-29.44 66.261333-26.88 97.92 2.56 23.978667 10.24 47.786667 23.637333 66.304-10.837333 5.546667-24.234667 10.666667-34.56 16.085333a225.706667 225.706667 0 0 1-71.68 10.666667H4.138667l-2.56 15.786666a297.813333 297.813333 0 0 0 23.978666 151.04l10.410667 18.56v2.56c64 105.941333 177.92 153.6 301.994667 153.6 238.677333 0 434.432-103.253333 527.232-325.674666 60.8 2.645333 122.197333-13.226667 151.04-71.509334l7.68-13.226666-12.8-7.978667c-34.56-21.077333-81.92-23.893333-121.6-13.226667l-0.768 0.085334z m-341.674667-42.325333h-103.594666v103.253333h103.68V406.101333l-0.085334 0.128z m0-129.834667h-103.594666v103.253333h103.68V276.48l-0.085334-0.128z m0-132.437333h-103.594666v103.253333h103.68v-103.253333h-0.085334z m126.72 262.272H570.88v103.253333h103.253333V406.101333l-0.298666 0.128z m-383.914666 0H187.008v103.253333h103.338667V406.101333l-0.426667 0.128z m129.28 0h-102.4v103.253333H419.84V406.101333l-0.64 0.128z m-257.28 0H59.733333v103.253333h103.594667V406.101333l-1.28 0.128z m257.28-129.834667h-102.4v103.253333H419.84V276.48l-0.64-0.128z m-129.92 0H187.178667v103.253333H290.133333V276.48l-0.682666-0.128z" p-id="2157"></path></svg>
|
After Width: | Height: | Size: 1.8 KiB |
|
@ -219,7 +219,7 @@
|
|||
</template>
|
||||
|
||||
<script setup name="Member">
|
||||
import { listMember, getMember, delMember, addMember, updateMember } from "@/api/mms/member";
|
||||
import { listMember, getMember, delMember, addMember, updateMember } from "@/api/member/member";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_user_sex } = proxy.useDict('sys_user_sex');
|
||||
|
|
|
@ -97,14 +97,19 @@
|
|||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="categoryList" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="categoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
row-key="catId"
|
||||
default-expand-all
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="分类ID" align="center" prop="catId" />
|
||||
<el-table-column label="分类名称" align="center" prop="name" />
|
||||
<el-table-column label="父分类ID" align="center" prop="parentId" />
|
||||
<el-table-column label="删除状态" align="center" prop="delStatus" />
|
||||
<el-table-column label="排序" align="center" prop="sort" />
|
||||
<el-table-column label="分类图标" align="center" prop="icon" />
|
||||
<!-- <el-table-column label="分类ID" align="center" prop="catId" />-->
|
||||
<el-table-column label="分类图标" align="center" prop="icon">
|
||||
<template #default="scope">
|
||||
<el-image :src="scope.row.icon" style="width: 60px; height: 60px;"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品单位" align="center" prop="productUnit" />
|
||||
<el-table-column label="商品数量" align="center" prop="productCount" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
|
@ -129,21 +134,18 @@
|
|||
<el-form-item label="分类名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入分类名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="父分类ID" prop="parentId">
|
||||
<el-input v-model="form.parentId" placeholder="请输入父分类ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input v-model="form.sort" placeholder="请输入排序" />
|
||||
<el-form-item label="主分类" prop="parentId">
|
||||
<el-select v-model="form.parentId">
|
||||
<el-option :value="0" label="主类别" />
|
||||
<el-option v-for="cate in categoryList" :value="cate.id" :label="cate.name" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类图标" prop="icon">
|
||||
<el-input v-model="form.icon" placeholder="请输入分类图标" />
|
||||
<image-upload v-model="form.icon" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品单位" prop="productUnit">
|
||||
<el-input v-model="form.productUnit" placeholder="请输入商品单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品数量" prop="productCount">
|
||||
<el-input v-model="form.productCount" placeholder="请输入商品数量" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
|
@ -156,7 +158,15 @@
|
|||
</template>
|
||||
|
||||
<script setup name="Category">
|
||||
import { listCategory, getCategory, delCategory, addCategory, updateCategory } from "@/api/product/category";
|
||||
import {
|
||||
listCategory,
|
||||
getCategory,
|
||||
delCategory,
|
||||
addCategory,
|
||||
updateCategory,
|
||||
listCategoryTree
|
||||
} from "@/api/product/category";
|
||||
import ImageUpload from "@/components/ImageUpload/index.vue";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
|
@ -207,9 +217,15 @@ const { queryParams, form, rules } = toRefs(data);
|
|||
/** 查询商品分类列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listCategory(queryParams.value).then(response => {
|
||||
categoryList.value = response.rows;
|
||||
total.value = response.total;
|
||||
listCategoryTree(queryParams.value).then(response => {
|
||||
// 暂时取消
|
||||
// categoryList.value = response.rows;
|
||||
let category = response.data;
|
||||
console.log(category)
|
||||
categoryList.value = category;
|
||||
|
||||
// total.value = response.total;
|
||||
total.value = 0;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
@ -225,12 +241,12 @@ function reset() {
|
|||
form.value = {
|
||||
catId: null,
|
||||
name: null,
|
||||
parentId: null,
|
||||
parentId: 0,
|
||||
delStatus: null,
|
||||
sort: null,
|
||||
sort: 0,
|
||||
icon: null,
|
||||
productUnit: null,
|
||||
productCount: null
|
||||
productCount: 0
|
||||
};
|
||||
proxy.resetForm("categoryRef");
|
||||
}
|
||||
|
|
|
@ -139,7 +139,9 @@
|
|||
<el-input v-model="form.unit" placeholder="请输入商品单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分类ID" prop="categoryId">
|
||||
<el-input v-model="form.categoryId" placeholder="请输入分类ID" />
|
||||
<tree-select v-model:value="form.categoryId"
|
||||
:options="categoryTree"
|
||||
:obj-map="{value: 'catId', label: 'name', children: 'children'}"></tree-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
|
@ -161,6 +163,7 @@ import TreeSelect from "@/components/TreeSelect/index.vue";
|
|||
import {listStall} from "@/api/product/stall";
|
||||
import {onMounted, ref} from 'vue';
|
||||
import BatchQr from "@/views/product/stocklog/batch-qr.vue";
|
||||
import {listCategoryTree} from "@/api/product/category";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
|
@ -176,6 +179,7 @@ const title = ref("");
|
|||
|
||||
const stallList = ref([])
|
||||
const deptList = ref([])
|
||||
const categoryTree = ref([])
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
|
@ -333,6 +337,13 @@ function getStallList() {
|
|||
})
|
||||
}
|
||||
|
||||
function getCategoryList() {
|
||||
listCategoryTree().then(res => {
|
||||
categoryTree.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
getList();
|
||||
getStallList();
|
||||
getCategoryList()
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue