GitBucket
4.6.0
Toggle navigation
Sign in
Files
Branches
1
Tags
Issues
Pull Requests
Labels
Milestones
Wiki
08335
/
hivui-platform-template
hivui平台项目模板
Browse code
add
master
1 parent
234100e
commit
bd235fc061544d203910283f342a0111d073d470
caibinghong
authored
on 20 Jul 2021
Showing
5 changed files
build/bin/create.sh
build/bin/preview.sh
build/bin/start.sh
build/bin/stop.sh
project/demo/App.vue
Ignore Space
Show notes
View
build/bin/create.sh
0 → 100644
#!/bin/bash ## eg: ## cd /mobileproject/$1/XcxProject hivui create $1 if [ $# != 3 ] ; then echo "创建项目的参数不正确,请输入(用户ID,项目名,预览端口)" exit fi basePath='/opt/eap5/desktop' tagPath=$basePath'/preview' tmpPath=$basePath'/project-template' workName=$1 projectName=$2 port=$3 ## 参数 工号$1 项目名$2 端口$3 ## 工号=工作空间 ## 1、判断工作空间 没有就创建 if [ ! -d "${tagPath}/${workName}" ];then mkdir "${tagPath}/${workName}" fi ## 2、判断项目名 if [ -d "${tagPath}/${workName}/${projectName}" ];then ## 项目名存在,退出 echo "项目名存在" exit fi ## 3、下载模板 ,如果很多用户同时下载到同一目录 git clone http://192.168.4.105:8080/gitbucket/git/08335/hivui-platform-template.git "${tagPath}/${workName}/${projectName}/deploy" ## 复制 node_modules cp -a ${tmpPath}/node_modules ${tagPath}/${workName}/${projectName}/deploy/node_modules cd ${tagPath}/${workName}/${projectName}/deploy/ ## 重命名 mv project ${projectName} rm -rf oldPackage build/oldWebpack ## sed '2d' package.json | sed '1a "name": "'$projectName'",' > package.json sed -i 's#\("name": "\).*#\1'"$projectName"'",#g' package.json ## 返回预览目录 cd ${tagPath}/${workName}/${projectName}/deploy ### 启动 用yarn 可以把 --host --port 带入 script dev yarn run dev --host --port $port
Show notes
View
build/bin/preview.sh
100644 → 0
#!/bin/bash ## cd /mobileproject/$1/XcxProject && npm run dev:h5 --port $2 hivui create $1 ## 删除文件 ## rimraf ./$1/node_modules ## 复制 node_modules cp -a ./project-template/node_modules ./$1/node_modules cd ./$1/ ### 用yarn 可以把 --host --port 带入 script dev yarn run dev --host --port $2
Ignore Space
Show notes
View
build/bin/start.sh
0 → 100644
#!/bin/bash
Ignore Space
Show notes
View
build/bin/stop.sh
0 → 100644
Ignore Space
Show notes
View
project/demo/App.vue
<template> <div> login <el-button type="primary" icon="el-icon-search">搜索</el-button> <button @click="click">--[button]--</button> <Test /> <el-button @click="click" size="mini">button1</el-button> <HiPagination :page-count="5" /> <!-- <hi-table style="height:250px" emptyText="我是空数据!" :isBigData="isBigData" :isEdit="isEdit" hasSelection hasRowNumber :showSummary="true" :model="tableData" :columns="columns" :rules="rules" :tree-props="treeProps" :row-key="rowKey" :span-method="arraySpanMethod"></hi-table> --> </div> </template> <script> import Test from "./test" // import BizEntity_jR02Xd from "/project/zhuomianduanyanshi/biaozhundanju/dataset/gongyingshang/bizstore/1.0.0/_extFile/desktop/BizEntity_jR02Xd.js" import { // HiTable, HiPagination } from "hi-ui" export default { components: { Test, // HiTable, HiPagination }, data() { return { isBigData: true, isEdit: true, num: 0, inputNumber: { precision: 2, format: "¥0.00", controlsPosition: "right", }, tableData: [], rules: { createTime: [{ required: true, message: "请选择日期", trigger: "blur", }, ], FMoney: [{ min: 1, trigger: "blur", }, ], FName: [{ required: true, message: "请输入活动名称", trigger: "blur", }, { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur", }, ], }, treeProps: { children: "children", hasChildren: "hasChildren" }, rowKey: "id", // columns: [{ // label: "自定义列", // width: 100, // slot: [{ // element: "el-button", // label: "调单", // props: { // size: "mini", // round: true // }, // handles: { // click: this.handleClick // } // }, // { // element: "el-tag", // label: "默认标签", // props: {}, // handles: { // click: this.handleClick // } // }, // ], // }, // { // name: "FName", // label: "姓名1", // element: "el-input", // width: 100, // formatFn: function(value) { // return "格式化:" + (value || ""); // }, // required: true, // }, // { // name: "createTime", // label: "申请时间", // element: "el-date-picker", // required: true, // width: 100, // props: { // type: "datetime", // format: "yyyy-MM-dd HH:mm:ss", // valueFormat: "yyyy-MM-dd", // }, // }, // { // label: "基本信息", // align: "center", // children: [{ // name: "FAge", // label: "年龄2", // element: "hi-number", // sortable: true, // summary: "avg", // formType: "dbInt", // props: { // step: 2, // format: "0岁", // }, // }, // { // name: "FSex", // label: "性别3", // element: "el-select", // props: { // children: [{ // element: "el-option", // props: { // label: "男", // value: "0" // }, // }, // { // element: "el-option", // props: { // label: "女", // value: "1" // }, // }, // ], // }, // }, // ], // }, // { // name: "FMoney", // label: "钱", // element: "hi-number", // formType: "dbDouble", // props: { // precision: 2, // format: "¥0.00", // "controls-position": "right", // }, // summary: "sum", // }, // { // width: 200, // name: "FBiaoXian", // label: "表现", // element: "el-rate", // props: { // showText: true, // }, // }, // { // width: 200, // name: "FUse", // label: "启用", // element: "el-checkbox", // props: {}, // }, // { // width: 200, // name: "FDept", // label: "部门", // element: "hi-data-select", // props: { // lookup: { // storeCfg: { // modelFile: "purchase/order/dataset/OrderEntity.xml", // //数据集配置 部门 // id: "dept", // //主键 // primary: ["id"], // //操作权限 // operations: [ // "oinsert", // "odelete", // "oquery", // "omodify", // ], // fields: { // FID: { // name: "FID", //字段ID // label: "部门ID", //字段描述 // dbtype: "dbInt", //数据类型 // required: true, // readonly: true, // length: 50, // rules: [], // }, // FNUMBER: { // name: "FNUMBER", //字段ID // label: "部门描述", //字段描述 // dbtype: "dbText", //数据类型 // }, // FUSERID: { // name: "FUSERID", //字段ID // label: "部门名称", //字段描述 // dbtype: "dbString", //数据类型 // }, // }, // }, // active: true, // multiSelect: false, // returnFields: { // FDept: "FNUMBER", // }, // columns: [{ // name: "FID", // label: "FID", // width: 200, // }, // { // name: "FNUMBER", // label: "编号", // width: 400, // }, // { // name: "FUSERID", // label: "FUSERID", // }, // ], // queryOption: { // fields: [{ // name: "FID", // label: "FID", // element: "el-input", // }, // { // name: "FNUMBER", // element: "el-input", // label: "编号", // }, // { // name: "FUSERID", // element: "el-input", // label: "FUSERID", // value: "admin", // }, // ], // }, // }, // }, // }, // ], } }, mounted() { console.log('this.$dsContainer----: ' , this.$dsContainer); }, methods: { click() { alert(1) }, arraySpanMethod({ row, column, rowIndex, columnIndex }) { if (columnIndex === 3) { if (rowIndex % 2 === 0) { return { rowspan: 2, colspan: 1, }; } else { return { rowspan: 0, colspan: 0, }; } } }, } } </script> <style lang="less"> html,body{ display: block; height: 100% } button { background: #efefee; padding: 5px 10px; font-size: 12px; border: 1px #eee solid; border-radius: 5px; // transform: rotate(45deg); } </style>
<template> <div> login <el-button type="primary" icon="el-icon-search">搜索</el-button> <button @click="click">--[button]--</button> <Test /> <el-button @click="click" size="mini">button1</el-button> <HiPagination :page-count="5" /> <!-- <hi-table style="height:250px" emptyText="我是空数据!" :isBigData="isBigData" :isEdit="isEdit" hasSelection hasRowNumber :showSummary="true" :model="tableData" :columns="columns" :rules="rules" :tree-props="treeProps" :row-key="rowKey" :span-method="arraySpanMethod"></hi-table> --> </div> </template> <script> import Test from "./test" import BizEntity_jR02Xd from "/project/zhuomianduanyanshi/biaozhundanju/dataset/gongyingshang/bizstore/1.0.0/_extFile/desktop/BizEntity_jR02Xd.js" import { // HiTable, HiPagination } from "hi-ui" export default { components: { Test, // HiTable, HiPagination }, data() { return { isBigData: true, isEdit: true, num: 0, inputNumber: { precision: 2, format: "¥0.00", controlsPosition: "right", }, tableData: [], rules: { createTime: [{ required: true, message: "请选择日期", trigger: "blur", }, ], FMoney: [{ min: 1, trigger: "blur", }, ], FName: [{ required: true, message: "请输入活动名称", trigger: "blur", }, { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur", }, ], }, treeProps: { children: "children", hasChildren: "hasChildren" }, rowKey: "id", // columns: [{ // label: "自定义列", // width: 100, // slot: [{ // element: "el-button", // label: "调单", // props: { // size: "mini", // round: true // }, // handles: { // click: this.handleClick // } // }, // { // element: "el-tag", // label: "默认标签", // props: {}, // handles: { // click: this.handleClick // } // }, // ], // }, // { // name: "FName", // label: "姓名1", // element: "el-input", // width: 100, // formatFn: function(value) { // return "格式化:" + (value || ""); // }, // required: true, // }, // { // name: "createTime", // label: "申请时间", // element: "el-date-picker", // required: true, // width: 100, // props: { // type: "datetime", // format: "yyyy-MM-dd HH:mm:ss", // valueFormat: "yyyy-MM-dd", // }, // }, // { // label: "基本信息", // align: "center", // children: [{ // name: "FAge", // label: "年龄2", // element: "hi-number", // sortable: true, // summary: "avg", // formType: "dbInt", // props: { // step: 2, // format: "0岁", // }, // }, // { // name: "FSex", // label: "性别3", // element: "el-select", // props: { // children: [{ // element: "el-option", // props: { // label: "男", // value: "0" // }, // }, // { // element: "el-option", // props: { // label: "女", // value: "1" // }, // }, // ], // }, // }, // ], // }, // { // name: "FMoney", // label: "钱", // element: "hi-number", // formType: "dbDouble", // props: { // precision: 2, // format: "¥0.00", // "controls-position": "right", // }, // summary: "sum", // }, // { // width: 200, // name: "FBiaoXian", // label: "表现", // element: "el-rate", // props: { // showText: true, // }, // }, // { // width: 200, // name: "FUse", // label: "启用", // element: "el-checkbox", // props: {}, // }, // { // width: 200, // name: "FDept", // label: "部门", // element: "hi-data-select", // props: { // lookup: { // storeCfg: { // modelFile: "purchase/order/dataset/OrderEntity.xml", // //数据集配置 部门 // id: "dept", // //主键 // primary: ["id"], // //操作权限 // operations: [ // "oinsert", // "odelete", // "oquery", // "omodify", // ], // fields: { // FID: { // name: "FID", //字段ID // label: "部门ID", //字段描述 // dbtype: "dbInt", //数据类型 // required: true, // readonly: true, // length: 50, // rules: [], // }, // FNUMBER: { // name: "FNUMBER", //字段ID // label: "部门描述", //字段描述 // dbtype: "dbText", //数据类型 // }, // FUSERID: { // name: "FUSERID", //字段ID // label: "部门名称", //字段描述 // dbtype: "dbString", //数据类型 // }, // }, // }, // active: true, // multiSelect: false, // returnFields: { // FDept: "FNUMBER", // }, // columns: [{ // name: "FID", // label: "FID", // width: 200, // }, // { // name: "FNUMBER", // label: "编号", // width: 400, // }, // { // name: "FUSERID", // label: "FUSERID", // }, // ], // queryOption: { // fields: [{ // name: "FID", // label: "FID", // element: "el-input", // }, // { // name: "FNUMBER", // element: "el-input", // label: "编号", // }, // { // name: "FUSERID", // element: "el-input", // label: "FUSERID", // value: "admin", // }, // ], // }, // }, // }, // }, // ], } }, mounted() { console.log('this.$dsContainer----: ' , this.$dsContainer); }, methods: { click() { alert(1) }, arraySpanMethod({ row, column, rowIndex, columnIndex }) { if (columnIndex === 3) { if (rowIndex % 2 === 0) { return { rowspan: 2, colspan: 1, }; } else { return { rowspan: 0, colspan: 0, }; } } }, } } </script> <style lang="less"> html,body{ display: block; height: 100% } button { background: #efefee; padding: 5px 10px; font-size: 12px; border: 1px #eee solid; border-radius: 5px; // transform: rotate(45deg); } </style>
Show line notes below