调整工程目录

This commit is contained in:
aixianling
2022-02-16 15:10:40 +08:00
parent 28be9ca0c5
commit f52b8f94e2
33 changed files with 58 additions and 53 deletions

View File

@@ -81,8 +81,21 @@ const start = () => {
}
json.pages.push(app)
}
}).then(() => {
return findApp('src/apps', file => {
}).then(() => findApp('src/apps', file => {
if (/.+\\App[^\\]+\\[^\\]+\.vue/g.test(file)) {
let app = {
name: file.replace(/.*\\([^\\]+).vue/g, '$1'),
path: file.replace(/^src\\(.*).vue/g, '$1').replace(/\\/g, '/')
}
let vue = fs.readFileSync(file).toString()
if (/appName/.test(vue)) {
let appName = vue.replace(/[\s\S]*(appName:.+),[\s\S]*/gm, '$1'),
title = appName.replace(/(appName:|["'])/g, '')
app.style = {navigationBarTitleText: title}
}
json.pages.push(app)
}
})).then(() => findApp('src/saas', file => {
if (/.+\\App[^\\]+\\[^\\]+\.vue/g.test(file)) {
let app = {
name: file.replace(/.*\\([^\\]+).vue/g, '$1'),
@@ -96,26 +109,23 @@ const start = () => {
}
json.pages.push(app)
}
}).then(() => {
return findApp('src/saas', file => {
if (/.+\\App[^\\]+\\[^\\]+\.vue/g.test(file)) {
let app = {
name: file.replace(/.*\\([^\\]+).vue/g, '$1'),
path: file.replace(/^src\\(.*).vue/g, '$1').replace(/\\/g, '/')
}
let vue = fs.readFileSync(file).toString()
if (/appName/.test(vue)) {
let appName = vue.replace(/[\s\S]*(appName:.+),[\s\S]*/gm, '$1'),
title = appName.replace(/(appName:|["'])/g, '')
app.style = {navigationBarTitleText: title}
}
json.pages.push(app)
})).then(() => findApp('src/project', file => {
if (/.+\\App[^\\]+\\[^\\]+\.vue/g.test(file)) {
let app = {
name: file.replace(/.*\\([^\\]+).vue/g, '$1'),
path: file.replace(/^src\\(.*).vue/g, '$1').replace(/\\/g, '/')
}
})
}).then(() => {
fsExtra.outputJson('src/pages.json', json, () => {
chalkTag.done('生成pages.json')
})
let vue = fs.readFileSync(file).toString()
if (/appName/.test(vue)) {
let appName = vue.replace(/[\s\S]*(appName:.+),[\s\S]*/gm, '$1'),
title = appName.replace(/(appName:|["'])/g, '')
app.style = {navigationBarTitleText: title}
}
json.pages.push(app)
}
})).then(() => {
fsExtra.outputJson('src/pages.json', json, () => {
chalkTag.done('生成pages.json')
})
})

View File

@@ -16,7 +16,7 @@
"src/saas"
],
"workspaces": [
"project/*"
"src/project/*"
],
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",

View File

@@ -11,7 +11,7 @@
</u-radio-group>
<input class="codeText" v-model="search" placeholder="搜索要查找的应用"/>
<div flex class="appsPane wrap">
<b v-for="app in appsList" :key="app.key" @tap="handleGotoApp(app)">{{ app.name }}</b>
<b v-for="app in appsList" :key="app.path" @tap="handleGotoApp(app)">{{ app.name }}</b>
</div>
</section>
</template>
@@ -28,8 +28,9 @@ export default {
computed: {
...mapState(['token', 'openUser', 'user']),
appsList() {
let {search} = this
return this.apps?.filter(e => !!search ? e.name.indexOf(search) > -1 : true) || []
let {search, currentLib} = this
return this.apps.filter(e => (currentLib == "apps" && e.path.indexOf("project")) || e.path.indexOf(currentLib) > -1)
.filter(e => !!search ? e.name.indexOf(search) > -1 : true) || []
},
currentApp() {
return this.apps.find(e => e.key == this.$route.query.app) || {}
@@ -51,15 +52,15 @@ export default {
...mapMutations(['logout']),
...mapActions(['agentSign']),
handleGotoApp(app) {
uni.navigateTo({url: `/${this.currentLib}${app.path}`})
console.log(app)
uni.navigateTo({url: `${app.path}`})
},
handleLogin() {
uni.navigateTo({url: "./login"})
},
getApps() {
this.apps = []
let applications = this.currentLib == "apps" ? require.context('../apps', true, /\.(\/.+)\/App[^\/]+\.vue$/) :
this.currentLib == "saas" ? require.context('../saas', true, /\.(\/.+)\/App[^\/]+\.vue$/) : null
let applications = require.context('../', true, /\.(\/.+)\/App[^\/]+\.vue$/)
applications.keys().map(path => {
if (applications(path).default) {
let {name: key, appName: name} = applications(path).default

View File

@@ -17,7 +17,9 @@
<u-row>
<span>紧急程度</span>
<span
:style="{color:$dict.getColor('documentEmergencyLevel',detail.emergencyLevel)}">{{ $dict.getLabel("documentEmergencyLevel", detail.emergencyLevel) }}</span>
:style="{color:$dict.getColor('documentEmergencyLevel',detail.emergencyLevel)}">{{
$dict.getLabel("documentEmergencyLevel", detail.emergencyLevel)
}}</span>
</u-row>
<u-gap height="8"></u-gap>
<u-row>
@@ -54,7 +56,7 @@
</div>
</div>
<div class="card">
<div class="label" style="96px;">{{ detail.readType == 0 ? "流转信息" : "传阅情况" }}
<div class="label">{{ detail.readType == 0 ? "流转信息" : "传阅情况" }}
<em>({{ $dict.getLabel("documentStatus", detail.status) }})</em></div>
<div class="progress">
<div class="item" v-for="(item,index) in detail.flowUsers" :key="index">
@@ -98,13 +100,10 @@
</template>
<script>
import AiBack from "../../../components/AiBack";
import AiSelectEnterprise from "../../../components/AiSelectEnterprise";
import {mapActions} from "vuex";
export default {
name: "detail",
components: {AiBack, AiSelectEnterprise},
data() {
return {
id: null,

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 802 B

After

Width:  |  Height:  |  Size: 802 B

View File

Before

Width:  |  Height:  |  Size: 622 B

After

Width:  |  Height:  |  Size: 622 B

View File

@@ -106,7 +106,7 @@ export default {
margin: -80px 32px 0 32px;
padding: 38px 30px 78px 28px;
background: #ffffff;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.02);
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02);
border-radius: 16px;
z-index: 999;
.hint {
@@ -131,7 +131,7 @@ export default {
}
.card {
display: flex;
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.08);
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.08);
border-radius: 16px;
padding: 48px 32px;
margin-bottom: 32px;

View File

@@ -111,7 +111,7 @@ export default {
height: 100%;
.card {
display: flex;
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.08);
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.08);
border-radius: 16px;
padding: 48px 32px;
margin-bottom: 32px;

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

@@ -25,7 +25,7 @@
<u-index-list :scrollTop="scrollTop" :index-list="indexList">
<div v-for="(letter, index) in indexList" :key="index">
<u-index-anchor :index="letter"/>
<div class="item" v-for="(item, index) in list.filter(e=>e.nameInitials==letter)">
<div class="item" v-for="(item, index) in list.filter(e=>e.nameInitials==letter)" :key="index">
<div class="title">{{item.label}}</div>
<div class="phone-list">
<div class="item-info">
@@ -155,7 +155,7 @@ export default {
width: 680px;
padding: 32px 48px;
box-sizing: border-box;
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.02);
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
p{
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
@@ -165,7 +165,6 @@ export default {
word-break: break-all;
margin-bottom: 8px;
width: 100%;
word-break: break-all;
}
.phone{
font-size: 26px;
@@ -189,7 +188,7 @@ export default {
height: 112px;
line-height: 112px;
background: #3975C6;
box-shadow: 0px 1px 0px 0px #EEEEEE;
box-shadow: 0 1px 0 0 #EEEEEE;
position: fixed;
bottom: 0;
left: 0;

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@@ -4,7 +4,7 @@
<u-index-list :scrollTop="scrollTop" :index-list="indexList">
<div v-for="(letter, index) in indexList" :key="index">
<u-index-anchor :index="letter"/>
<div class="item" v-for="(item, index) in list.filter(e=>e.nameInitials==letter)">
<div class="item" v-for="(item, index) in list.filter(e=>e.nameInitials==letter)" :key="index">
<div class="title">{{item.label}}</div>
<div class="phone-list">
<div class="item-info">
@@ -103,7 +103,7 @@ export default {
width: 680px;
padding: 32px 48px;
box-sizing: border-box;
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.02);
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
p{
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
@@ -113,7 +113,6 @@ export default {
word-break: break-all;
margin-bottom: 8px;
width: 100%;
word-break: break-all;
}
.phone{
font-size: 26px;
@@ -137,7 +136,7 @@ export default {
height: 112px;
line-height: 112px;
background: #3975C6;
box-shadow: 0px 1px 0px 0px #EEEEEE;
box-shadow: 0 1px 0 0 #EEEEEE;
position: fixed;
bottom: 0;
left: 0;

View File

@@ -153,7 +153,7 @@ export default {
height: 112px;
line-height: 112px;
background: #3975C6;
box-shadow: 0px 1px 0px 0px #EEEEEE;
box-shadow: 0 1px 0 0 #EEEEEE;
position: fixed;
bottom: 0;
left: 0;

View File

@@ -2,9 +2,6 @@
"name": "@dvcp-weapps/shandong10086",
"version": "1.0.0",
"description": "为山东移动定制的模块",
"files": [
"../../src/apps/AppHandSnapshot"
],
"dependencies": {
}
}