刘翔宇-旅管家 4 years ago
parent e1418cc4f8
commit c4c846d44a

16
.gitignore vendored

@ -0,0 +1,16 @@
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
tests/**/coverage/
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln

@ -1,3 +1,7 @@
<style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "uview-ui/index.scss";
</style>
<script> <script>
export default { export default {
onLaunch: function() { onLaunch: function() {

@ -19,3 +19,7 @@ export function createApp() {
} }
} }
// #endif // #endif
// main.js
import uView from "uview-ui";
Vue.use(uView);

@ -68,5 +68,17 @@
"uniStatistics" : { "uniStatistics" : {
"enable" : false "enable" : false
}, },
"vueVersion" : "2" "vueVersion" : "2",
"h5" : {
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "EUQBZ-MJALU-WZFVR-2HFNW-TIK2K-TNBJI"
}
}
},
"devServer" : {
"https" : false
}
}
} }

@ -0,0 +1,5 @@
{
"dependencies": {
"uview-ui": "^1.8.4"
}
}

@ -0,0 +1,22 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

@ -0,0 +1,106 @@
<template>
<view class="content">
<u-form :model="form" ref="uForm">
<u-form-item label="问题类型" label-position="top">
<u-input v-model="form.typeName" type="select" :border="true" @click="typeshow = true" />
<u-select v-model="typeshow" mode="single-column" :list="list" @confirm="confirmType"></u-select>
</u-form-item>
<u-form-item label="问题内容" label-position="top">
<u-input v-model="form.contentName" type="select" :border="true" @click="contentshow = true" />
<u-select v-model="contentshow" mode="single-column" :list="list" @confirm="confirmContent"></u-select>
</u-form-item>
<u-form-item label="位置" label-position="top">
<text>江苏省苏州市通园路66号</text>
<u-button shape="square" slot='right' size="mini" @click="showMap=true" type="info">重新获取</u-button>
</u-form-item>
<u-form-item label-position="top" label="描述" prop="intro">
<u-input v-model="form.intro" type='textarea' height='100' :border="true" />
</u-form-item>
<u-form-item label-position="top" label="附件上传" prop="intro">
<u-upload ref="uUpload" :action="action" upload-text="" :show-tips="false"></u-upload>
</u-form-item>
</u-form>
<u-button type="primary" @click="submit"></u-button>
<u-popup v-model="showMap" mode="center" closeable close-icon-color="#ffffff" border-radius="14">
<view>
<view class="popuptitle">选择位置</view>
<map :style="{width:width+'px',height:height+ 'px'}" :latitude="location.latitude"
:longitude="location.longitude">
</map>
<view>
<u-button type="success" shape="square">确认选择</u-button>
</view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
showMap: false,
typeshow: false,
contentshow: false,
action: "",
location: {},
list: [{
value: '1',
label: '江'
},
{
value: '2',
label: '湖'
}
],
form: {
type: "",
content: "",
typeName: "",
contentName: ""
},
width: 300,
height: 300
}
},
onReady() {
let that = this;
uni.getLocation({
success(res) {
that.location = res;
}
})
uni.getSystemInfo({
complete(res) {
that.width = res.screenWidth * .8
that.height = res.screenHeight * .6
}
})
},
methods: {
submit() {},
confirmType(e) {
this.form.type = e[0].value
this.form.typeName = e[0].label
},
confirmContent(e) {
this.form.content = e[0].value
this.form.contentName = e[0].label
},
}
}
</script>
<style>
.content {
padding: 20rpx;
}
.popuptitle {
background: #2979ff;
color: #fff;
padding: 20rpx 30rpx;
}
</style>

@ -1,15 +1,39 @@
{ {
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages "pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "uni-app" "navigationBarTitleText": "巡查养护",
"navigationStyle": "custom"
} }
} }
], ],
"subPackages": [{
"root": "packageA/pages",
"pages": [{
"path": "generalPatrol/generalPatrol",
"style": {
"navigationBarTitleText": "通用巡查",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "generalList/generalList",
"style": {
"navigationBarTitleText": "通用巡查",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}]
}],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app", "navigationBarTitleText": "巡查养护",
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
} }

@ -1,52 +1,73 @@
<template> <template>
<view class="content"> <view class="wrap">
<image class="logo" src="/static/logo.png"></image> <u-row gutter="16">
<view class="text-area"> <u-col span="3">
<text class="title">{{title}}</text> <view class="demo-layout bg-purple" @click="togeneral">
通用巡查
</view> </view>
</u-col>
<u-col span="4">
<view class="demo-layout bg-purple-light"></view>
</u-col>
<u-col span="5">
<view class="demo-layout bg-purple-dark"></view>
</u-col>
</u-row>
<u-row gutter="16" justify="space-between">
<u-col span="3">
<view class="demo-layout bg-purple"></view>
</u-col>
<u-col span="9">
<view class="demo-layout bg-purple-light"></view>
</u-col>
</u-row>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
title: 'Hello' title: ''
} }
}, },
onLoad() { onLoad() {
}, },
methods: { methods: {
togeneral() {
uni.navigateTo({
url: "/packageA/pages/generalPatrol/generalPatrol"
})
}
} }
} }
</script> </script>
<style> <style scoped lang="scss">
.content { .wrap {
display: flex; padding: 24rpx;
flex-direction: column; }
align-items: center;
justify-content: center; .u-row {
margin: 40rpx 0;
}
.demo-layout {
height: 80rpx;
border-radius: 8rpx;
line-height: 80rpx;
text-align: center;
} }
.logo { .bg-purple {
height: 200rpx; background: #d3dce6;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
} }
.text-area { .bg-purple-light {
display: flex; background: #e5e9f2;
justify-content: center;
} }
.title { .bg-purple-dark {
font-size: 36rpx; background: #99a9bf;
color: #8f8f94;
} }
</style> </style>

@ -5,6 +5,8 @@
* 使scss使 import 便App * 使scss使 import 便App
* *
*/ */
/* uni.scss */
@import 'uview-ui/theme.scss';
/** /**
* App使 * App使

Loading…
Cancel
Save