x
This commit is contained in:
3
vue/.npmrc
Normal file
3
vue/.npmrc
Normal file
@@ -0,0 +1,3 @@
|
||||
registry=https://registry.npmmirror.com/
|
||||
@zen:registry=https://git.proxy.yimiyisu.com/api/packages/sinbo/npm/
|
||||
save-dev=true
|
||||
8
vue/jsconfig.json
Normal file
8
vue/jsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"modules": [],
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6"
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
98
vue/package.json
Normal file
98
vue/package.json
Normal file
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"name": "iot",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "webpack-dev-server --mode=development",
|
||||
"dist": "npm run lint && webpack --mode=production",
|
||||
"deploy": "npm run dist && node ./release/cos.js",
|
||||
"prepare": "cd .. && husky install",
|
||||
"init": "yarn && npm run prepare",
|
||||
"lint": "eslint --fix --ext .js,.vue ./src"
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": "^3.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.23.5",
|
||||
"@babel/plugin-syntax-jsx": "^7.23.3",
|
||||
"@babel/plugin-transform-runtime": "^7.17.0",
|
||||
"@babel/preset-env": "^7.23.5",
|
||||
"@vue/babel-plugin-jsx": "^1.1.5",
|
||||
"@vue/babel-preset-app": "^5.0.8",
|
||||
"@vue/compiler-sfc": "^3.4.15",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-loader": "^8.2.4",
|
||||
"cos-nodejs-sdk-v5": "^2.11.6",
|
||||
"css-loader": "^3.5.3",
|
||||
"eslint": "^7.28.0",
|
||||
"eslint-plugin-vue": "^8.4.1",
|
||||
"fs-extra": "^10.0.0",
|
||||
"husky": "^7.0.4",
|
||||
"lint-staged": "^12.3.4",
|
||||
"pako": "^2.0.4",
|
||||
"prettier": "^2.5.1",
|
||||
"prismjs": "^1.22.0",
|
||||
"sass": "^1.49.7",
|
||||
"sass-loader": "^12.4.0",
|
||||
"simple-git": "^3.1.1",
|
||||
"style-loader": "^3.3.1",
|
||||
"terser-webpack-plugin": "^5.3.1",
|
||||
"vue": "^3.4.21",
|
||||
"vue-loader": "^17.3.1",
|
||||
"webpack": "^5.91.0",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^4.15.2",
|
||||
"@zen/app-plugin": "^0.2.1"
|
||||
},
|
||||
"eslintIgnore": [
|
||||
"public/*",
|
||||
"dist/*"
|
||||
],
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/vue3-essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"plugins": [
|
||||
"vue"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "babel-eslint",
|
||||
"sourceType": "module"
|
||||
},
|
||||
"globals": {
|
||||
"zen": true,
|
||||
"$": true,
|
||||
"Vue": true,
|
||||
"__webpack_public_path__": true
|
||||
},
|
||||
"rules": {
|
||||
"no-useless-escape": 0,
|
||||
"no-debugger": 0,
|
||||
"vue/multi-word-component-names": 0,
|
||||
"no-case-declaration": 0,
|
||||
"vue/no-mutating-props": 0
|
||||
}
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged",
|
||||
"pre-push": "cd vue && npm run lint"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,jsx,vue}": [
|
||||
"cd vue && npm run lint"
|
||||
]
|
||||
},
|
||||
"browserslist": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
}
|
||||
28
vue/public/design.html
Normal file
28
vue/public/design.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="chrome,IE=edge" />
|
||||
<meta name="HandheldFriendly" content="true" />
|
||||
<meta name="format-detection" content="telephone=no,email=no" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, user-scalable=no, minimal-ui, viewport-fit=cover" />
|
||||
<meta name="renderer" content="webkit" />
|
||||
<meta name="msapplication-tap-highlight" content="no" />
|
||||
<title>CMS</title>
|
||||
<script>
|
||||
var ZenEnv = 'LOCAL_DEV';
|
||||
</script>
|
||||
<script src="//b.ebus.vip/zeto/v5.1.3/zen.dev.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="//b.ebus.vip/zeto/v5.1.3/zen.css">
|
||||
<script>
|
||||
zen.host = 'http://127.0.0.1:7057';
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src="/design.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
28
vue/public/index.html
Normal file
28
vue/public/index.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="chrome,IE=edge" />
|
||||
<meta name="HandheldFriendly" content="true" />
|
||||
<meta name="format-detection" content="telephone=no,email=no" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, user-scalable=no, minimal-ui, viewport-fit=cover" />
|
||||
<meta name="renderer" content="webkit" />
|
||||
<meta name="msapplication-tap-highlight" content="no" />
|
||||
<title>CMS</title>
|
||||
<script>
|
||||
var ZenEnv = 'LOCAL_DEV';
|
||||
</script>
|
||||
<script src="//b.ebus.vip/zeto/v5.1.3/zen.dev.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="//b.ebus.vip/zeto/v5.1.3/zen.css">
|
||||
<script>
|
||||
zen.host = 'http://127.0.0.1:7057';
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src="/app.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
1
vue/public/lib/cos-auth.min.js
vendored
Normal file
1
vue/public/lib/cos-auth.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
vue/public/lib/cos-js-sdk-v5.min.js
vendored
Normal file
1
vue/public/lib/cos-js-sdk-v5.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
vue/public/lib/template-web.js
Normal file
3
vue/public/lib/template-web.js
Normal file
File diff suppressed because one or more lines are too long
80
vue/release/cos.js
Normal file
80
vue/release/cos.js
Normal file
@@ -0,0 +1,80 @@
|
||||
const os = require("os");
|
||||
|
||||
const simpleGit = require("simple-git");
|
||||
const pako = require("pako");
|
||||
const GIT = simpleGit("./");
|
||||
const CWD = process.cwd();
|
||||
|
||||
const fs = require("fs");
|
||||
const { join, dirname } = require("path");
|
||||
const packageFile = JSON.parse(fs.readFileSync("./package.json"));
|
||||
const config = JSON.parse(fs.readFileSync(join(os.homedir(), ".cos.json")));
|
||||
const domain = "//a.zeto.me/";
|
||||
const COS = require("cos-nodejs-sdk-v5");
|
||||
function findRootDir(dir) {
|
||||
if (dir === "/") {
|
||||
return "/";
|
||||
}
|
||||
if (fs.existsSync(dir, "package.json")) {
|
||||
return dir;
|
||||
}
|
||||
return findRootDir(dirname(dir));
|
||||
}
|
||||
const ROOT = findRootDir(CWD);
|
||||
const DIST_DIR = join(ROOT, "dist");
|
||||
const LIB_DIR = join(ROOT, "public", "lib");
|
||||
const client = new COS({
|
||||
SecretId: config.id,
|
||||
SecretKey: config.key,
|
||||
});
|
||||
function send(dir, output) {
|
||||
let files = fs.readdirSync(dir);
|
||||
files.forEach((item) => {
|
||||
if (item.indexOf(".") === 0 || item.indexOf(".html") > -1) {
|
||||
return;
|
||||
}
|
||||
let fpath = join(dir, item);
|
||||
let stat = fs.statSync(fpath);
|
||||
if (stat.isDirectory()) {
|
||||
send(fpath, join(output, item));
|
||||
}
|
||||
if (stat.isFile()) {
|
||||
let target = join(output, item).replace(/\\/gi, "/");
|
||||
let cosTarget = {
|
||||
Bucket: config.bucket /* 必须 */,
|
||||
Region: config.region /* 必须 */,
|
||||
Key: target /* 必须 */,
|
||||
StorageClass: "STANDARD",
|
||||
};
|
||||
let isJS = target.indexOf(".js") > -1;
|
||||
if (isJS || target.indexOf(".css") > -1) {
|
||||
cosTarget.Headers = {
|
||||
"Content-Encoding": "gzip",
|
||||
"Content-Type": isJS
|
||||
? "application/javascript"
|
||||
: "text/css",
|
||||
};
|
||||
cosTarget.Body = Buffer.from(
|
||||
pako.gzip(fs.readFileSync(fpath, "utf8"))
|
||||
);
|
||||
} else {
|
||||
cosTarget.Body = fs.createReadStream(fpath);
|
||||
}
|
||||
client.putObject(cosTarget, (err, data) => {
|
||||
if (err) {
|
||||
return console.log(err, data);
|
||||
}
|
||||
console.log(domain + target);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
GIT.branchLocal((err, branch) => {
|
||||
let name = packageFile.name,
|
||||
version = branch.current;
|
||||
send(DIST_DIR, `${name}/${version}`);
|
||||
if (fs.existsSync(LIB_DIR)) {
|
||||
send(LIB_DIR, `${name}/${version}/lib`);
|
||||
}
|
||||
});
|
||||
51
vue/release/deploy.js
Normal file
51
vue/release/deploy.js
Normal file
@@ -0,0 +1,51 @@
|
||||
const os = require("os");
|
||||
|
||||
const simpleGit = require("simple-git");
|
||||
const GIT = simpleGit("./");
|
||||
const fs = require("fs");
|
||||
const { join } = require("path");
|
||||
const packageFile = JSON.parse(fs.readFileSync("./package.json"));
|
||||
const config = JSON.parse(fs.readFileSync(join(os.homedir(), ".cos.json")));
|
||||
const domain = "//a.ebus.vip/";
|
||||
const COS = require("cos-nodejs-sdk-v5");
|
||||
const client = new COS({
|
||||
SecretId: config.id,
|
||||
SecretKey: config.key,
|
||||
});
|
||||
function send(dir, output) {
|
||||
let files = fs.readdirSync(dir);
|
||||
files.forEach((item) => {
|
||||
if (item.indexOf(".") === 0 || item.indexOf(".html") > -1) {
|
||||
return;
|
||||
}
|
||||
let fpath = join(dir, item);
|
||||
let stat = fs.statSync(fpath);
|
||||
if (stat.isDirectory()) {
|
||||
send(fpath, join(output, item));
|
||||
}
|
||||
if (stat.isFile()) {
|
||||
let target = join(output, item).replace(/\\/gi, "/");
|
||||
client.putObject(
|
||||
{
|
||||
Bucket: config.bucket /* 必须 */,
|
||||
Region: config.region /* 必须 */,
|
||||
Key: target /* 必须 */,
|
||||
StorageClass: "STANDARD",
|
||||
Body: fs.createReadStream(fpath), // 上传文件对象
|
||||
},
|
||||
(err, data) => {
|
||||
if (err) {
|
||||
return console.log(err, data);
|
||||
}
|
||||
console.log(domain + target);
|
||||
}
|
||||
);
|
||||
// client.putObject(join(output, item), fpath)
|
||||
}
|
||||
});
|
||||
}
|
||||
GIT.branchLocal((err, branch) => {
|
||||
let name = packageFile.name,
|
||||
version = branch.current;
|
||||
send(join(__dirname, "../dist"), `${name}/${version}`);
|
||||
});
|
||||
6
vue/src/app.js
Normal file
6
vue/src/app.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import Console from "./console/index.vue";
|
||||
import Routes from "./pages/routes";
|
||||
const dict = require("./pages/dict.json");
|
||||
__webpack_public_path__ = zen.path("iot");
|
||||
|
||||
zen.setup({ com: Console, routes: Routes, dict });
|
||||
12
vue/src/console/index.vue
Normal file
12
vue/src/console/index.vue
Normal file
@@ -0,0 +1,12 @@
|
||||
<template>
|
||||
<z-console :menus="data" title="社区智慧安全系统" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
created() { },
|
||||
};
|
||||
</script>
|
||||
48
vue/src/pages/article/category/.lowcode/configs.jsx
Normal file
48
vue/src/pages/article/category/.lowcode/configs.jsx
Normal file
@@ -0,0 +1,48 @@
|
||||
export default {
|
||||
title: "文章分类",
|
||||
entitys: [
|
||||
{ name: "id", label: "编号" },
|
||||
{ name: "title", label: "分类标题" },
|
||||
{ name: "describe", label: "分类描述" },
|
||||
{ name: "parentId", label: "父级id" },
|
||||
{ name: "createGmt", label: "创建时间", type: "date" },
|
||||
{ name: "updateGmt", label: "更新时间", type: "date" },
|
||||
],
|
||||
columns: ["id", "title", "describe", "createGmt", "updateGmt"],
|
||||
condition: ["title"],
|
||||
slots: {
|
||||
header$() {
|
||||
return (
|
||||
<>
|
||||
<z-action
|
||||
label="新建分类"
|
||||
fields={["title", "describe"]}
|
||||
url="/do/put/category"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
},
|
||||
action$({ row }) {
|
||||
return (
|
||||
<>
|
||||
<z-action
|
||||
label="编辑"
|
||||
mode="wicket"
|
||||
fields={["title", "describe"]}
|
||||
link
|
||||
data={row}
|
||||
url="/do/patch/category"
|
||||
/>
|
||||
<z-action
|
||||
label="删除"
|
||||
mode="confirm"
|
||||
link
|
||||
data={row}
|
||||
url="/do/delete/category"
|
||||
title="确定删除该分类吗?"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
1
vue/src/pages/article/category/.lowcode/data
Normal file
1
vue/src/pages/article/category/.lowcode/data
Normal file
@@ -0,0 +1 @@
|
||||
{"table":"category","blocks":[],"counter":6787,"basic":{"title":"文章分类","selectable":0,"showIndex":0,"compact":0,"size":"","url":"/do/select/category","actions":[{"label":"新建分类","mode":"wicket","type":"primary","url":"/do/put/category","name":"add","from":null,"fields":[{"id":"title","name":"title","width":null,"rule":{},"block":null,"blockType":null},{"id":"describe","name":"describe","width":null,"rule":{},"block":null,"blockType":null}],"_id":6787}]},"columns":[{"id":"id","name":"id","width":null,"rule":{},"block":null,"blockType":null},{"id":"title","name":"title","width":null,"rule":{},"block":null,"blockType":null},{"id":"describe","name":"describe","width":null,"rule":{},"block":null,"blockType":null},{"id":"createGmt","name":"createGmt","width":null,"rule":{},"block":null,"blockType":null},{"id":"updateGmt","name":"updateGmt","width":null,"rule":{},"block":null,"blockType":null}],"tabs":{"code":null,"defaultVal":null,"list":[],"keyword":null},"condition":[{"id":"title","name":"title","width":null,"rule":{},"block":null,"blockType":null}],"conditionLimit":null,"actions":[{"label":"编辑","mode":"wicket","type":"text","url":"/do/patch/category","name":"J_6786","from":null,"fields":[{"id":"title","name":"title","width":null,"rule":{},"block":null,"blockType":null},{"id":"describe","name":"describe","width":null,"rule":{},"block":null,"blockType":null}],"_id":6788},{"label":"删除","mode":"confirm","type":"text","url":"/do/delete/category","params":["id"],"tip":"确定删除该分类吗?","_id":6789}],"_id":6789}
|
||||
16
vue/src/pages/article/category/category.vue
Normal file
16
vue/src/pages/article/category/category.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<z-table name="6625cc13b7d97458478b8517" url="/do/select/category">
|
||||
</z-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import configs from './.lowcode/configs';
|
||||
|
||||
export default {
|
||||
name: 'page-category',
|
||||
provide: { configs },
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
4
vue/src/pages/article/index.js
Normal file
4
vue/src/pages/article/index.js
Normal file
@@ -0,0 +1,4 @@
|
||||
export default {
|
||||
'article/category': () => import( /* webpackChunkName: "pages/article/category" */ "./category/category.vue"),
|
||||
'article/list': () => import( /* webpackChunkName: "pages/article/list" */ "./list/list.vue")
|
||||
};
|
||||
25
vue/src/pages/article/list/.lowcode/configs.jsx
Normal file
25
vue/src/pages/article/list/.lowcode/configs.jsx
Normal file
@@ -0,0 +1,25 @@
|
||||
export default {
|
||||
title: "文章列表",
|
||||
tabs: {"code":"articleType","list":[],"keyword":"type"},
|
||||
entitys: [{"name":"id","label":"编号"},{"name":"title","label":"文章标题"},{"name":"categoryId","label":"文章分类"},{"name":"type","label":"文章类型","code":"articleType"},{"name":"content","label":"文章内容","type":"editor"},{"name":"commentable","label":"是否支持评论","type":"number"},{"name":"createGmt","label":"创建时间","type":"date"},{"name":"updateGmt","label":"更新时间","type":"date"},{"name":"pictures","label":"图片列表"},{"name":"uid","label":"创建者"},{"name":"author","label":"创建者"},{"name":"from","label":"来源"}],
|
||||
columns: ["id","title","type","uid","updateGmt","createGmt"],
|
||||
condition: ["title","categoryId"],
|
||||
slots: {
|
||||
header$() {
|
||||
return (
|
||||
<>
|
||||
<z-action label='新增文章' mode='drawer' fields={["title","categoryId","type","content","commentable","pictures","author","from"]} url='/do/put/article' />
|
||||
</>
|
||||
)
|
||||
},
|
||||
action$({ row }) {
|
||||
return (
|
||||
<>
|
||||
<z-action label='编辑' mode='drawer' fields={["title","categoryId","type","content","commentable","author","from","pictures"]} link data={row} url='/do/patch/article' title='编辑文章' />
|
||||
<z-action label='删除' link data={row} url='/do/delete/article' title='确定删除该文章吗?' />
|
||||
</>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1
vue/src/pages/article/list/.lowcode/data
Normal file
1
vue/src/pages/article/list/.lowcode/data
Normal file
@@ -0,0 +1 @@
|
||||
{"table":"article","blocks":[],"counter":6786,"basic":{"title":"文章列表","selectable":0,"showIndex":0,"compact":0,"size":"","url":"/do/select/article","actions":[{"label":"新增文章","mode":"drawer","type":"primary","title":null,"params":null,"width":null,"from":null,"actions":[],"_id":6787,"url":"/do/put/article","fields":[{"id":"title","name":"title","width":null,"rule":{},"block":null,"blockType":null},{"id":"categoryId","name":"categoryId","width":null,"rule":{},"block":null,"blockType":null},{"id":"type","name":"type","width":null,"rule":{},"block":null,"blockType":null},{"id":"content","name":"content","width":null,"rule":{},"block":null,"blockType":null},{"id":"commentable","name":"commentable","width":null,"rule":{},"block":null,"blockType":null},{"id":"pictures","name":"pictures","width":null,"rule":{},"block":null,"blockType":null},{"id":"author","name":"author","width":null,"rule":{},"block":null,"blockType":null},{"id":"from","name":"from","width":null,"rule":{},"block":null,"blockType":null}]}]},"columns":[{"id":"id","name":"id","width":null,"rule":{},"block":null,"blockType":null},{"id":"title","name":"title","width":null,"rule":{},"block":null,"blockType":null},{"id":"type","name":"type","width":null,"rule":{},"block":null,"blockType":null},{"id":"uid","name":"uid","width":null,"rule":{},"block":null,"blockType":null},{"id":"updateGmt","name":"updateGmt","width":null,"rule":{},"block":null,"blockType":null},{"id":"createGmt","name":"createGmt","width":null,"rule":{},"block":null,"blockType":null}],"tabs":{"code":"articleType","defaultVal":null,"list":[],"keyword":"type"},"condition":[{"id":"title","name":"title","width":null,"rule":{},"block":null,"blockType":null},{"id":"categoryId","name":"categoryId","width":null,"rule":{},"block":null,"blockType":null}],"conditionLimit":null,"actions":[{"label":"编辑","mode":"drawer","type":"text","title":"编辑文章","params":null,"width":null,"from":null,"actions":[],"_id":6788,"url":"/do/patch/article","fields":[{"id":"title","name":"title","width":null,"rule":{},"block":null,"blockType":null},{"id":"categoryId","name":"categoryId","width":null,"rule":{},"block":null,"blockType":null},{"id":"type","name":"type","width":null,"rule":{},"block":null,"blockType":null},{"id":"content","name":"content","width":null,"rule":{},"block":null,"blockType":null},{"id":"commentable","name":"commentable","width":null,"rule":{},"block":null,"blockType":null},{"id":"author","name":"author","width":null,"rule":{},"block":null,"blockType":null},{"id":"from","name":"from","width":null,"rule":{},"block":null,"blockType":null},{"id":"pictures","name":"pictures","width":null,"rule":{},"block":null,"blockType":null}]},{"label":"删除","mode":"confirm","type":"text","url":"/do/delete/article","params":["id"],"tip":"确定删除该文章吗?","_id":6789}],"_id":6789}
|
||||
16
vue/src/pages/article/list/list.vue
Normal file
16
vue/src/pages/article/list/list.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<z-table name="6625cc33b7d97458478b8518" url="/do/select/article">
|
||||
</z-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import configs from './.lowcode/configs';
|
||||
|
||||
export default {
|
||||
name: 'page-list',
|
||||
provide: { configs },
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
1
vue/src/pages/dict.json
Normal file
1
vue/src/pages/dict.json
Normal file
@@ -0,0 +1 @@
|
||||
[{"key":"articleType","title":"文章类型","type":1,"content":[{"value":1,"label":"普通图文","color":"#C71585"},{"value":2,"label":"商品","color":"#D40001"}]},{"key":"pageType","title":"页面类型","type":1,"content":[{"value":1,"label":"PC端页面","color":"#F8D03F"},{"value":2,"label":"无线端页面","color":"#C36EB5"},{"value":3,"label":"跨端页面","color":"#8F6B43"}]},{"key":"pageStatus","title":"页面状态","type":1,"content":[{"value":1,"label":"待发布","color":"#666666"},{"value":2,"label":"已发布","color":"#559B7B"},{"value":3,"label":"已下线","color":"#D40001"}]}]
|
||||
11
vue/src/pages/index.js
Normal file
11
vue/src/pages/index.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import article from "./article/index";
|
||||
import material from "./material/index";
|
||||
import page from "./page/index";
|
||||
import system from "./system/index";
|
||||
|
||||
export default {
|
||||
...article,
|
||||
...material,
|
||||
...page,
|
||||
...system,
|
||||
};
|
||||
4
vue/src/pages/material/index.js
Normal file
4
vue/src/pages/material/index.js
Normal file
@@ -0,0 +1,4 @@
|
||||
export default {
|
||||
'material/picture': () => import( /* webpackChunkName: "pages/material/picture" */ "./picture/picture.vue"),
|
||||
'material/video': () => import( /* webpackChunkName: "pages/material/video" */ "./video/video.vue")
|
||||
};
|
||||
88
vue/src/pages/material/picture/.lowcode/configs.jsx
Normal file
88
vue/src/pages/material/picture/.lowcode/configs.jsx
Normal file
@@ -0,0 +1,88 @@
|
||||
export default {
|
||||
title: "图片中心",
|
||||
entitys: [
|
||||
{ name: "id", label: "编号" },
|
||||
{ name: "name", type: "input", label: "名称" },
|
||||
{ name: "nick", label: "昵称" },
|
||||
{ name: "ukey", label: "密钥" },
|
||||
{ name: "createUid", type: "input", label: "创建人" },
|
||||
{
|
||||
name: "status",
|
||||
type: "switch",
|
||||
label: "状态",
|
||||
url: "/app/updateStatus.do",
|
||||
},
|
||||
{
|
||||
name: "config",
|
||||
type: "map",
|
||||
default: {},
|
||||
fields: [
|
||||
{ name: "api", label: "接口地址", type: "input" },
|
||||
{ name: "version", label: "资源版本", type: "input" },
|
||||
],
|
||||
},
|
||||
],
|
||||
columns: ["id", "createUid", "nick", "unionid", "dingId", "ukey"],
|
||||
condtion: ["id", "createUid", "nick", "unionid", "dingId", "ukey"],
|
||||
slots: {
|
||||
header() {
|
||||
return (
|
||||
<>
|
||||
<el-button>Default</el-button>
|
||||
<el-button type="success">Success</el-button>
|
||||
<el-button type="info">测试</el-button>
|
||||
<el-button type="warning">这里是按钮</el-button>
|
||||
<el-button type="danger">Danger</el-button>
|
||||
<z-action
|
||||
fields={[
|
||||
"id",
|
||||
"createUid",
|
||||
"nick",
|
||||
"unionid",
|
||||
"dingId",
|
||||
"ukey",
|
||||
]}
|
||||
url="/do/put/member"
|
||||
label="添加"
|
||||
title="hello"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
},
|
||||
action$({ row }) {
|
||||
return (
|
||||
<>
|
||||
<z-action
|
||||
link
|
||||
mode="drawer"
|
||||
title={row.nick + "侧滑菜单"}
|
||||
label="侧滑"
|
||||
/>
|
||||
<z-action
|
||||
link
|
||||
fields={[
|
||||
"id",
|
||||
"createUid",
|
||||
"nick",
|
||||
"unionid",
|
||||
"dingId",
|
||||
"ukey",
|
||||
]}
|
||||
data={row}
|
||||
url="/do/patch/member"
|
||||
title={"编辑" + row.nick}
|
||||
label="编辑"
|
||||
/>
|
||||
<z-action
|
||||
link
|
||||
mode="confirm"
|
||||
title="确定删除吗?"
|
||||
data={row}
|
||||
url="/do/delete/member"
|
||||
label="删除"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
1
vue/src/pages/material/picture/.lowcode/data
Normal file
1
vue/src/pages/material/picture/.lowcode/data
Normal file
@@ -0,0 +1 @@
|
||||
{"table":"picture","blocks":[],"counter":6786,"basic":{"title":"图片中心","selectable":0,"showIndex":0,"compact":0,"size":"","url":"/do/select/site","actions":[]},"columns":[],"tabs":{"code":null,"defaultVal":null,"list":[],"keyword":null},"condition":[],"conditionLimit":null,"actions":[],"_id":6786}
|
||||
16
vue/src/pages/material/picture/picture.vue
Normal file
16
vue/src/pages/material/picture/picture.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<z-table name="6625cd28b7d97458478b8519" url="/do/select/picture" mocked>
|
||||
</z-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import configs from './.lowcode/configs';
|
||||
|
||||
export default {
|
||||
name: 'page-picture',
|
||||
provide: { configs },
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
88
vue/src/pages/material/video/.lowcode/configs.jsx
Normal file
88
vue/src/pages/material/video/.lowcode/configs.jsx
Normal file
@@ -0,0 +1,88 @@
|
||||
export default {
|
||||
title: "视频编辑器",
|
||||
entitys: [
|
||||
{ name: "id", label: "编号" },
|
||||
{ name: "name", type: "input", label: "名称" },
|
||||
{ name: "nick", label: "昵称" },
|
||||
{ name: "ukey", label: "密钥" },
|
||||
{ name: "createUid", type: "input", label: "创建人" },
|
||||
{
|
||||
name: "status",
|
||||
type: "switch",
|
||||
label: "状态",
|
||||
url: "/app/updateStatus.do",
|
||||
},
|
||||
{
|
||||
name: "config",
|
||||
type: "map",
|
||||
default: {},
|
||||
fields: [
|
||||
{ name: "api", label: "接口地址", type: "input" },
|
||||
{ name: "version", label: "资源版本", type: "input" },
|
||||
],
|
||||
},
|
||||
],
|
||||
columns: ["id", "createUid", "nick", "unionid", "dingId", "ukey"],
|
||||
condtion: ["id", "createUid", "nick", "unionid", "dingId", "ukey"],
|
||||
slots: {
|
||||
header() {
|
||||
return (
|
||||
<>
|
||||
<el-button>Default</el-button>
|
||||
<el-button type="success">Success</el-button>
|
||||
<el-button type="info">测试</el-button>
|
||||
<el-button type="warning">这里是按钮</el-button>
|
||||
<el-button type="danger">Danger</el-button>
|
||||
<z-action
|
||||
fields={[
|
||||
"id",
|
||||
"createUid",
|
||||
"nick",
|
||||
"unionid",
|
||||
"dingId",
|
||||
"ukey",
|
||||
]}
|
||||
url="/do/put/member"
|
||||
label="添加"
|
||||
title="hello"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
},
|
||||
action$({ row }) {
|
||||
return (
|
||||
<>
|
||||
<z-action
|
||||
link
|
||||
mode="drawer"
|
||||
title={row.nick + "侧滑菜单"}
|
||||
label="侧滑"
|
||||
/>
|
||||
<z-action
|
||||
link
|
||||
fields={[
|
||||
"id",
|
||||
"createUid",
|
||||
"nick",
|
||||
"unionid",
|
||||
"dingId",
|
||||
"ukey",
|
||||
]}
|
||||
data={row}
|
||||
url="/do/patch/member"
|
||||
title={"编辑" + row.nick}
|
||||
label="编辑"
|
||||
/>
|
||||
<z-action
|
||||
link
|
||||
mode="confirm"
|
||||
title="确定删除吗?"
|
||||
data={row}
|
||||
url="/do/delete/member"
|
||||
label="删除"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
1
vue/src/pages/material/video/.lowcode/data
Normal file
1
vue/src/pages/material/video/.lowcode/data
Normal file
@@ -0,0 +1 @@
|
||||
{"table":"video","blocks":[],"counter":6786,"basic":{"title":"视频编辑器","selectable":0,"showIndex":0,"compact":0,"size":"","url":"/do/select/site","actions":[]},"columns":[],"tabs":{"code":null,"defaultVal":null,"list":[],"keyword":null},"condition":[],"conditionLimit":null,"actions":[],"_id":6786}
|
||||
16
vue/src/pages/material/video/video.vue
Normal file
16
vue/src/pages/material/video/video.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<z-table name="6625cd8eb7d97458478b851a" url="/do/select/video" mocked>
|
||||
</z-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import configs from './.lowcode/configs';
|
||||
|
||||
export default {
|
||||
name: 'page-video',
|
||||
provide: { configs },
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
26
vue/src/pages/page/activity/.lowcode/configs.jsx
Normal file
26
vue/src/pages/page/activity/.lowcode/configs.jsx
Normal file
@@ -0,0 +1,26 @@
|
||||
export default {
|
||||
title: "活动页列表",
|
||||
tabs: {"code":"pageStatus","list":[],"keyword":"status"},
|
||||
entitys: [{"name":"id","label":"编号"},{"name":"title","label":"页面标题"},{"name":"path","label":"页面路径"},{"name":"type","label":"页面类型","code":"pageType"},{"name":"siteId","label":"所属站点"},{"name":"content","label":"描述内容"},{"name":"status","label":"页面状态","code":"pageStatus"},{"name":"createGmt","label":"创建时间","type":"date"},{"name":"updateGmt","label":"更新时间","type":"date"},{"name":"data","label":"页面数据"}],
|
||||
columns: ["id","title","path","type","status"],
|
||||
condition: ["title","type"],
|
||||
slots: {
|
||||
header$() {
|
||||
return (
|
||||
<>
|
||||
<z-action label='新建活动页' mode='wicket' fields={["title","path","type","siteId"]} url='/do/put/activity' />
|
||||
</>
|
||||
)
|
||||
},
|
||||
action$({ row }) {
|
||||
return (
|
||||
<>
|
||||
<z-action label='编辑' mode='wicket' fields={["title"]} link data={row} url='/do/patch/activity' />
|
||||
<z-action label='装修' mode='link' href={`/design.html?id=${row.id}`} link data={row} />
|
||||
<z-action label='删除' mode='confirm' link data={row} url='/do/delete/activity' title='确定删除吗?' />
|
||||
</>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1
vue/src/pages/page/activity/.lowcode/data
Normal file
1
vue/src/pages/page/activity/.lowcode/data
Normal file
@@ -0,0 +1 @@
|
||||
{"table":"activity","blocks":[],"counter":6786,"basic":{"title":"活动页列表","selectable":0,"showIndex":0,"compact":0,"size":"","url":"/do/select/activity","actions":[{"label":"新建活动页","mode":"wicket","type":"primary","url":"/do/put/activity","name":"add","fields":[{"id":"title","name":"title","width":null,"rule":{},"block":null,"blockType":null},{"id":"path","name":"path","width":null,"rule":{},"block":null,"blockType":null},{"id":"type","name":"type","width":null,"rule":{},"block":null,"blockType":null},{"id":"siteId","name":"siteId","width":null,"rule":{},"block":null,"blockType":null}],"_id":6787}]},"columns":[{"id":"id","name":"id","width":null,"rule":{},"block":null,"blockType":null},{"id":"title","name":"title","width":null,"rule":{},"block":null,"blockType":null},{"id":"path","name":"path","width":null,"rule":{},"block":null,"blockType":null},{"id":"type","name":"type","width":null,"rule":{},"block":null,"blockType":null},{"id":"status","name":"status","width":null,"rule":{},"block":null,"blockType":null}],"tabs":{"code":"pageStatus","defaultVal":null,"list":[],"keyword":"status"},"condition":[{"id":"title","name":"title","width":null,"rule":{},"block":null,"blockType":null},{"id":"type","name":"type","width":null,"rule":{},"block":null,"blockType":null}],"conditionLimit":null,"actions":[{"label":"编辑","mode":"wicket","type":"text","url":"/do/patch/activity","name":"edit","fields":[{"id":"title","name":"title","width":null,"rule":{},"block":null,"blockType":null}],"_id":6788},{"label":"装修","mode":"link","type":"text","href":"/design.html","params":["id"],"_id":6789},{"label":"删除","mode":"confirm","type":"text","url":"/do/delete/activity","params":["id"],"tip":"确定删除吗?","_id":6790}],"_id":6790}
|
||||
16
vue/src/pages/page/activity/activity.vue
Normal file
16
vue/src/pages/page/activity/activity.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<z-table name="6625cba8b7d97458478b8515" url="/do/select/activity">
|
||||
</z-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import configs from './.lowcode/configs';
|
||||
|
||||
export default {
|
||||
name: 'page-activity',
|
||||
provide: { configs },
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
4
vue/src/pages/page/index.js
Normal file
4
vue/src/pages/page/index.js
Normal file
@@ -0,0 +1,4 @@
|
||||
export default {
|
||||
'page/activity': () => import( /* webpackChunkName: "pages/page/activity" */ "./activity/activity.vue"),
|
||||
'page/source': () => import( /* webpackChunkName: "pages/page/source" */ "./source/source.vue")
|
||||
};
|
||||
24
vue/src/pages/page/source/.lowcode/configs.jsx
Normal file
24
vue/src/pages/page/source/.lowcode/configs.jsx
Normal file
@@ -0,0 +1,24 @@
|
||||
export default {
|
||||
title: "源码页面",
|
||||
entitys: [{"name":"title","label":"页面标题"},{"name":"path","label":"页面路径"},{"name":"type","label":"平台类型","type":"number"},{"name":"siteId","label":"所属站点"},{"name":"content","label":"网站内容","type":"textarea"},{"name":"status","label":"状态","code":"pageStatus"},{"name":"templateId","label":"模版ID"},{"name":"id","label":"编号"},{"name":"createGmt","label":"创建时间","type":"date"},{"name":"updateGmt","label":"更新时间","type":"date"}],
|
||||
columns: ["id","title","path","updateGmt","createGmt"],
|
||||
condition: [],
|
||||
slots: {
|
||||
header$() {
|
||||
return (
|
||||
<>
|
||||
<z-action label='创建页面' mode='wicket' fields={["title","path","content"]} url='/do/put/page' />
|
||||
</>
|
||||
)
|
||||
},
|
||||
action$({ row }) {
|
||||
return (
|
||||
<>
|
||||
<z-action label='编辑' mode='wicket' fields={["title","content"]} from='/do/get/page' link data={row} url='/do/patch/page' />
|
||||
<z-action label='删除' mode='confirm' link data={row} url='/do/delete/page' title='确定删除该页面吗?' />
|
||||
</>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1
vue/src/pages/page/source/.lowcode/data
Normal file
1
vue/src/pages/page/source/.lowcode/data
Normal file
@@ -0,0 +1 @@
|
||||
{"table":"page","blocks":[],"counter":6786,"basic":{"title":"源码页面","selectable":0,"showIndex":0,"compact":0,"size":"","url":"/do/select/page","actions":[{"label":"创建页面","mode":"wicket","type":"primary","url":"/do/put/page","name":"add","fields":[{"id":"title","name":"title","width":null,"rule":{},"block":null,"blockType":null},{"id":"path","name":"path","width":null,"rule":{},"block":null,"blockType":null},{"id":"content","name":"content","width":null,"rule":{},"block":null,"blockType":null}],"_id":6787}]},"columns":[{"id":"id","name":"id","width":null,"rule":{},"block":null,"blockType":null},{"id":"title","name":"title","width":null,"rule":{},"block":null,"blockType":null},{"id":"path","name":"path","width":null,"rule":{},"block":null,"blockType":null},{"id":"updateGmt","name":"updateGmt","width":null,"rule":{},"block":null,"blockType":null},{"id":"createGmt","name":"createGmt","width":null,"rule":{},"block":null,"blockType":null}],"tabs":{"code":null,"defaultVal":null,"list":[],"keyword":null},"condition":[],"conditionLimit":null,"actions":[{"label":"编辑","mode":"wicket","type":"text","url":"/do/patch/page","name":"edit","fields":[{"id":"title","name":"title","width":null,"rule":{},"block":null,"blockType":null},{"id":"content","name":"content","width":null,"rule":{},"block":null,"blockType":null}],"_id":6788,"from":"/do/get/page"},{"label":"删除","mode":"confirm","type":"text","url":"/do/delete/page","params":["id"],"tip":"确定删除该页面吗?","_id":6789}],"_id":6789}
|
||||
16
vue/src/pages/page/source/source.vue
Normal file
16
vue/src/pages/page/source/source.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<z-table name="6625cbbbb7d97458478b8516" url="/do/select/page">
|
||||
</z-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import configs from './.lowcode/configs';
|
||||
|
||||
export default {
|
||||
name: 'page-source',
|
||||
provide: { configs },
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
18
vue/src/pages/routes.js
Normal file
18
vue/src/pages/routes.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import pages from "./index";
|
||||
let routes = [{ path: "/", redirect: "/welcome" }];
|
||||
let isExist;
|
||||
|
||||
Object.keys(pages).forEach((pagePath) => {
|
||||
isExist = false;
|
||||
for (let index = 0; index < routes.length; index++) {
|
||||
const route = routes[index];
|
||||
if (route.path === "/" + pagePath) {
|
||||
isExist = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isExist) {
|
||||
routes.push({ path: "/" + pagePath, component: pages[pagePath] });
|
||||
}
|
||||
});
|
||||
export default routes;
|
||||
88
vue/src/pages/system/components/.lowcode/configs.jsx
Normal file
88
vue/src/pages/system/components/.lowcode/configs.jsx
Normal file
@@ -0,0 +1,88 @@
|
||||
export default {
|
||||
title: "组件管理",
|
||||
entitys: [
|
||||
{ name: "id", label: "编号" },
|
||||
{ name: "name", type: "input", label: "名称" },
|
||||
{ name: "nick", label: "昵称" },
|
||||
{ name: "ukey", label: "密钥" },
|
||||
{ name: "createUid", type: "input", label: "创建人" },
|
||||
{
|
||||
name: "status",
|
||||
type: "switch",
|
||||
label: "状态",
|
||||
url: "/app/updateStatus.do",
|
||||
},
|
||||
{
|
||||
name: "config",
|
||||
type: "map",
|
||||
default: {},
|
||||
fields: [
|
||||
{ name: "api", label: "接口地址", type: "input" },
|
||||
{ name: "version", label: "资源版本", type: "input" },
|
||||
],
|
||||
},
|
||||
],
|
||||
columns: ["id", "createUid", "nick", "unionid", "dingId", "ukey"],
|
||||
condtion: ["id", "createUid", "nick", "unionid", "dingId", "ukey"],
|
||||
slots: {
|
||||
header() {
|
||||
return (
|
||||
<>
|
||||
<el-button>Default</el-button>
|
||||
<el-button type="success">Success</el-button>
|
||||
<el-button type="info">测试</el-button>
|
||||
<el-button type="warning">这里是按钮</el-button>
|
||||
<el-button type="danger">Danger</el-button>
|
||||
<z-action
|
||||
fields={[
|
||||
"id",
|
||||
"createUid",
|
||||
"nick",
|
||||
"unionid",
|
||||
"dingId",
|
||||
"ukey",
|
||||
]}
|
||||
url="/do/put/member"
|
||||
label="添加"
|
||||
title="hello"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
},
|
||||
action$({ row }) {
|
||||
return (
|
||||
<>
|
||||
<z-action
|
||||
link
|
||||
mode="drawer"
|
||||
title={row.nick + "侧滑菜单"}
|
||||
label="侧滑"
|
||||
/>
|
||||
<z-action
|
||||
link
|
||||
fields={[
|
||||
"id",
|
||||
"createUid",
|
||||
"nick",
|
||||
"unionid",
|
||||
"dingId",
|
||||
"ukey",
|
||||
]}
|
||||
data={row}
|
||||
url="/do/patch/member"
|
||||
title={"编辑" + row.nick}
|
||||
label="编辑"
|
||||
/>
|
||||
<z-action
|
||||
link
|
||||
mode="confirm"
|
||||
title="确定删除吗?"
|
||||
data={row}
|
||||
url="/do/delete/member"
|
||||
label="删除"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
1
vue/src/pages/system/components/.lowcode/data
Normal file
1
vue/src/pages/system/components/.lowcode/data
Normal file
@@ -0,0 +1 @@
|
||||
{"table":"components","blocks":[],"counter":6786,"basic":{"title":"组件管理","selectable":0,"showIndex":0,"compact":0,"size":"","url":"/do/select/site","actions":[]},"columns":[],"tabs":{"code":null,"defaultVal":null,"list":[],"keyword":null},"condition":[],"conditionLimit":null,"actions":[],"_id":6786}
|
||||
16
vue/src/pages/system/components/components.vue
Normal file
16
vue/src/pages/system/components/components.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<z-table name="6625ce33b7d97458478b851b" url="/do/select/components" mocked>
|
||||
</z-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import configs from './.lowcode/configs';
|
||||
|
||||
export default {
|
||||
name: 'page-components',
|
||||
provide: { configs },
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
88
vue/src/pages/system/env/.lowcode/configs.jsx
vendored
Normal file
88
vue/src/pages/system/env/.lowcode/configs.jsx
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
export default {
|
||||
title: "环境配置",
|
||||
entitys: [
|
||||
{ name: "id", label: "编号" },
|
||||
{ name: "name", type: "input", label: "名称" },
|
||||
{ name: "nick", label: "昵称" },
|
||||
{ name: "ukey", label: "密钥" },
|
||||
{ name: "createUid", type: "input", label: "创建人" },
|
||||
{
|
||||
name: "status",
|
||||
type: "switch",
|
||||
label: "状态",
|
||||
url: "/app/updateStatus.do",
|
||||
},
|
||||
{
|
||||
name: "config",
|
||||
type: "map",
|
||||
default: {},
|
||||
fields: [
|
||||
{ name: "api", label: "接口地址", type: "input" },
|
||||
{ name: "version", label: "资源版本", type: "input" },
|
||||
],
|
||||
},
|
||||
],
|
||||
columns: ["id", "createUid", "nick", "unionid", "dingId", "ukey"],
|
||||
condtion: ["id", "createUid", "nick", "unionid", "dingId", "ukey"],
|
||||
slots: {
|
||||
header() {
|
||||
return (
|
||||
<>
|
||||
<el-button>Default</el-button>
|
||||
<el-button type="success">Success</el-button>
|
||||
<el-button type="info">测试</el-button>
|
||||
<el-button type="warning">这里是按钮</el-button>
|
||||
<el-button type="danger">Danger</el-button>
|
||||
<z-action
|
||||
fields={[
|
||||
"id",
|
||||
"createUid",
|
||||
"nick",
|
||||
"unionid",
|
||||
"dingId",
|
||||
"ukey",
|
||||
]}
|
||||
url="/do/put/member"
|
||||
label="添加"
|
||||
title="hello"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
},
|
||||
action$({ row }) {
|
||||
return (
|
||||
<>
|
||||
<z-action
|
||||
link
|
||||
mode="drawer"
|
||||
title={row.nick + "侧滑菜单"}
|
||||
label="侧滑"
|
||||
/>
|
||||
<z-action
|
||||
link
|
||||
fields={[
|
||||
"id",
|
||||
"createUid",
|
||||
"nick",
|
||||
"unionid",
|
||||
"dingId",
|
||||
"ukey",
|
||||
]}
|
||||
data={row}
|
||||
url="/do/patch/member"
|
||||
title={"编辑" + row.nick}
|
||||
label="编辑"
|
||||
/>
|
||||
<z-action
|
||||
link
|
||||
mode="confirm"
|
||||
title="确定删除吗?"
|
||||
data={row}
|
||||
url="/do/delete/member"
|
||||
label="删除"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
1
vue/src/pages/system/env/.lowcode/data
vendored
Normal file
1
vue/src/pages/system/env/.lowcode/data
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"table":"env","blocks":[],"counter":6786,"basic":{"title":"环境配置","selectable":0,"showIndex":0,"compact":0,"size":"","url":"/do/select/site","actions":[]},"columns":[],"tabs":{"code":null,"defaultVal":null,"list":[],"keyword":null},"condition":[],"conditionLimit":null,"actions":[],"_id":6786}
|
||||
16
vue/src/pages/system/env/env.vue
vendored
Normal file
16
vue/src/pages/system/env/env.vue
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<z-table name="6625cf58b7d97458478b851c" url="/do/select/env" mocked>
|
||||
</z-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import configs from './.lowcode/configs';
|
||||
|
||||
export default {
|
||||
name: 'page-env',
|
||||
provide: { configs },
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
5
vue/src/pages/system/index.js
Normal file
5
vue/src/pages/system/index.js
Normal file
@@ -0,0 +1,5 @@
|
||||
export default {
|
||||
'system/components': () => import( /* webpackChunkName: "pages/system/components" */ "./components/components.vue"),
|
||||
'system/env': () => import( /* webpackChunkName: "pages/system/env" */ "./env/env.vue"),
|
||||
'system/site': () => import( /* webpackChunkName: "pages/system/site" */ "./site/site.vue")
|
||||
};
|
||||
88
vue/src/pages/system/site/.lowcode/configs.jsx
Normal file
88
vue/src/pages/system/site/.lowcode/configs.jsx
Normal file
@@ -0,0 +1,88 @@
|
||||
export default {
|
||||
title: "站点管理",
|
||||
entitys: [
|
||||
{ name: "id", label: "编号" },
|
||||
{ name: "name", type: "input", label: "名称" },
|
||||
{ name: "nick", label: "昵称" },
|
||||
{ name: "ukey", label: "密钥" },
|
||||
{ name: "createUid", type: "input", label: "创建人" },
|
||||
{
|
||||
name: "status",
|
||||
type: "switch",
|
||||
label: "状态",
|
||||
url: "/app/updateStatus.do",
|
||||
},
|
||||
{
|
||||
name: "config",
|
||||
type: "map",
|
||||
default: {},
|
||||
fields: [
|
||||
{ name: "api", label: "接口地址", type: "input" },
|
||||
{ name: "version", label: "资源版本", type: "input" },
|
||||
],
|
||||
},
|
||||
],
|
||||
columns: ["id", "createUid", "nick", "unionid", "dingId", "ukey"],
|
||||
condtion: ["id", "createUid", "nick", "unionid", "dingId", "ukey"],
|
||||
slots: {
|
||||
header() {
|
||||
return (
|
||||
<>
|
||||
<el-button>Default</el-button>
|
||||
<el-button type="success">Success</el-button>
|
||||
<el-button type="info">测试</el-button>
|
||||
<el-button type="warning">这里是按钮</el-button>
|
||||
<el-button type="danger">Danger</el-button>
|
||||
<z-action
|
||||
fields={[
|
||||
"id",
|
||||
"createUid",
|
||||
"nick",
|
||||
"unionid",
|
||||
"dingId",
|
||||
"ukey",
|
||||
]}
|
||||
url="/do/put/member"
|
||||
label="添加"
|
||||
title="hello"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
},
|
||||
action$({ row }) {
|
||||
return (
|
||||
<>
|
||||
<z-action
|
||||
link
|
||||
mode="drawer"
|
||||
title={row.nick + "侧滑菜单"}
|
||||
label="侧滑"
|
||||
/>
|
||||
<z-action
|
||||
link
|
||||
fields={[
|
||||
"id",
|
||||
"createUid",
|
||||
"nick",
|
||||
"unionid",
|
||||
"dingId",
|
||||
"ukey",
|
||||
]}
|
||||
data={row}
|
||||
url="/do/patch/member"
|
||||
title={"编辑" + row.nick}
|
||||
label="编辑"
|
||||
/>
|
||||
<z-action
|
||||
link
|
||||
mode="confirm"
|
||||
title="确定删除吗?"
|
||||
data={row}
|
||||
url="/do/delete/member"
|
||||
label="删除"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
1
vue/src/pages/system/site/.lowcode/data
Normal file
1
vue/src/pages/system/site/.lowcode/data
Normal file
@@ -0,0 +1 @@
|
||||
{"table":"site","blocks":[],"counter":6786,"basic":{"title":"站点管理","selectable":0,"showIndex":0,"compact":0,"size":"","url":"/do/select/site","actions":[]},"columns":[],"tabs":{"code":null,"defaultVal":null,"list":[],"keyword":null},"condition":[],"conditionLimit":null,"actions":[],"_id":6786}
|
||||
16
vue/src/pages/system/site/site.vue
Normal file
16
vue/src/pages/system/site/site.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<z-table name="6625cf7cb7d97458478b851d" url="/do/select/site" mocked>
|
||||
</z-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import configs from './.lowcode/configs';
|
||||
|
||||
export default {
|
||||
name: 'page-site',
|
||||
provide: { configs },
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
156
vue/webpack.config.js
Normal file
156
vue/webpack.config.js
Normal file
@@ -0,0 +1,156 @@
|
||||
const TerserPlugin = require("terser-webpack-plugin"),
|
||||
{ VueLoaderPlugin } = require("vue-loader"),
|
||||
path = require("path"),
|
||||
fs = require("fs-extra");
|
||||
// const ZenAppPlugin = require("@zen/app-plugin");
|
||||
const MiddleWare = require("@zen/app-plugin/middleware");
|
||||
|
||||
function optimization(mode) {
|
||||
if (mode === "production") {
|
||||
return {
|
||||
splitChunks: false,
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
ecma: undefined,
|
||||
parse: {},
|
||||
compress: {},
|
||||
mangle: true, // Note `mangle.properties` is `false` by default.
|
||||
module: false,
|
||||
// Deprecated
|
||||
output: null,
|
||||
format: null,
|
||||
toplevel: false,
|
||||
nameCache: null,
|
||||
ie8: false,
|
||||
keep_classnames: undefined,
|
||||
keep_fnames: false,
|
||||
safari10: false,
|
||||
},
|
||||
}),
|
||||
],
|
||||
};
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
var webpackConfig = {
|
||||
entry: {},
|
||||
output: {
|
||||
filename: "[name].js",
|
||||
},
|
||||
watchOptions: {
|
||||
// , "**/*.json"
|
||||
ignored: ["node_modules", "dist", "debug"],
|
||||
poll: 300,
|
||||
},
|
||||
externals: {
|
||||
vue: "Vue",
|
||||
"router-view": "VueRouter",
|
||||
"element-plus": "ElementPlus",
|
||||
},
|
||||
plugins: [new VueLoaderPlugin()],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@util": path.resolve(__dirname, "src/util"),
|
||||
"@store": path.resolve(
|
||||
__dirname,
|
||||
"src/design/engine/store/index.js"
|
||||
),
|
||||
},
|
||||
extensions: [".js", ".vue", ".jsx", ".json"],
|
||||
},
|
||||
module: {
|
||||
noParse: /Vue|jquery/,
|
||||
rules: [
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
exclude: /(node_modules|bower_components)/,
|
||||
use: {
|
||||
loader: "babel-loader",
|
||||
options: {
|
||||
cacheDirectory: true,
|
||||
presets: [
|
||||
[
|
||||
"@vue/app",
|
||||
{
|
||||
modules: "commonjs",
|
||||
loose: true,
|
||||
useBuiltIns: "entry",
|
||||
},
|
||||
],
|
||||
],
|
||||
plugins: ["@babel/plugin-syntax-jsx"],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.vue$/,
|
||||
loader: "vue-loader",
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ["style-loader", "css-loader"],
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: [
|
||||
"style-loader",
|
||||
"css-loader", // translates CSS into CommonJS
|
||||
{
|
||||
loader: "sass-loader",
|
||||
options: {
|
||||
implementation: require("sass"),
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
let basename,
|
||||
file,
|
||||
i,
|
||||
len,
|
||||
sourceList,
|
||||
vuePath = path.resolve(__dirname);
|
||||
|
||||
sourceList = fs.readdirSync(path.resolve(vuePath, "src"));
|
||||
for (i = 0, len = sourceList.length; i < len; i++) {
|
||||
file = sourceList[i];
|
||||
if (file.indexOf(".js") === -1) {
|
||||
continue;
|
||||
}
|
||||
basename = path.basename(file);
|
||||
basename = basename.substr(0, basename.length - 3);
|
||||
webpackConfig.entry[basename] = path.resolve(vuePath, "src", file);
|
||||
}
|
||||
module.exports = (env, argv) => {
|
||||
let mode = argv.mode;
|
||||
webpackConfig.mode = mode;
|
||||
webpackConfig.optimization = optimization(mode);
|
||||
if (mode === "development") {
|
||||
webpackConfig.cache = { type: "memory" };
|
||||
webpackConfig.devServer = {
|
||||
open: true,
|
||||
hot: false,
|
||||
client: false,
|
||||
host: "127.0.0.1",
|
||||
allowedHosts: "all",
|
||||
onAfterSetupMiddleware: MiddleWare,
|
||||
static: {
|
||||
directory: path.join(vuePath, "public"),
|
||||
},
|
||||
headers: {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Access-Control-Allow-Headers": "*",
|
||||
},
|
||||
};
|
||||
// webpackConfig.plugins.push(new ZenAppPlugin());
|
||||
} else {
|
||||
webpackConfig.output.clean = true;
|
||||
webpackConfig.output.path = path.join(vuePath, "dist");
|
||||
}
|
||||
return webpackConfig;
|
||||
};
|
||||
Reference in New Issue
Block a user