update
This commit is contained in:
parent
370a426291
commit
86d791ba04
@ -64,9 +64,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/pages_template/common/province.js";
|
||||
import citys from "@/pages_template/common/city.js";
|
||||
import areas from "@/pages_template/common/area.js";
|
||||
import provinces from "./province.js";
|
||||
import citys from "./city.js";
|
||||
import areas from "./area.js";
|
||||
/**
|
||||
* city-select 省市区级联选择器
|
||||
* @property {String Number} z-index 弹出时的z-index值(默认1075)
|
||||
@ -248,3 +248,4 @@
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@/components/u-city-select/province.js@/components/u-city-select/city.js@/components/u-city-select/area.js
|
||||
@ -1,12 +1,13 @@
|
||||
{
|
||||
"easycom": {
|
||||
"custom": {
|
||||
"u-city-select": "@/components/u-city-select/u-city-select.vue",
|
||||
"geek-(.*)": "@/components/geek-xd/components/geek-$1/geek-$1.vue",
|
||||
"gx-(.*)": "@/components/geek-xd/components/geek-$1/geek-$1.vue",
|
||||
"^u--(.*)": "uview-plus/components/u-$1/u-$1.vue",
|
||||
"^up-(.*)": "uview-plus/components/u-$1/u-$1.vue",
|
||||
"^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue",
|
||||
"qiun-(.*)": "@/components/qiun-data-charts/components/qiun-$1/qiun-$1.vue",
|
||||
"geek-(.*)": "@/components/geek-xd/components/geek-$1/geek-$1.vue",
|
||||
"gx-(.*)": "@/components/geek-xd/components/geek-$1/geek-$1.vue"
|
||||
"qiun-(.*)": "@/components/qiun-data-charts/components/qiun-$1/qiun-$1.vue"
|
||||
}
|
||||
},
|
||||
"pages": [
|
||||
@ -276,4 +277,4 @@
|
||||
"navigationBarTitleText": "RuoYi",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,75 +1,141 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<image class="logo" src="@/static/logo.png"></image>
|
||||
<view class="text-area">
|
||||
<text class="title">Hello RuoYi-Vue</text>
|
||||
</view>
|
||||
<view class="text-area">
|
||||
<up-text type="primary" text="uview-plus"></up-text>
|
||||
</view>
|
||||
<view class="charts-box">
|
||||
<qiun-data-charts type="column" :chartData="chartData" />
|
||||
</view>
|
||||
<view style="height: 200rpx;background-color: skyblue;"></view>
|
||||
<view>
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="form1" :labelWidth="120"
|
||||
:labelStyle="{ paddingLeft: '40rpx' }">
|
||||
<u-form-item label="姓名" prop="name" borderBottom required>
|
||||
<u--input v-model="form.name" border="none" placeholder="请输入姓名" />
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="性别" prop="sex" borderBottom @click="showSex = true">
|
||||
<u--input v-model="form.sex" disabled disabledColor="#ffffff" placeholder="请选择性别" border="none"
|
||||
suffixIcon="arrow-right" />
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="年龄" prop="age" borderBottom required>
|
||||
<u--input v-model="form.age" border="none" placeholder="请输入年龄" />
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="手机号" prop="phone" borderBottom required>
|
||||
<u--input v-model="form.phone" border="none" placeholder="请输入手机号" />
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="服务单位" prop="service" borderBottom required>
|
||||
<u--input v-model="form.service" disabled disabledColor="#ffffff" placeholder="请选择性别" border="none"
|
||||
suffixIcon="arrow-right" />
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="从业年数" prop="years" borderBottom required>
|
||||
<u--input v-model="form.years" border="none" placeholder="请输入从业年数" />
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="维修专长" prop="profession" borderBottom required>
|
||||
<view @click="showSex = true">
|
||||
<u--input disabled disabledColor="#ffffff" placeholder="添加" border="none" prefixIcon="plus-circle" />
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="服务地区" prop="region" borderBottom required>
|
||||
<view @click="show.region = true">
|
||||
<u--input disabled disabledColor="#ffffff" placeholder="添加" border="none" prefixIcon="plus-circle" />
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="居住地址" prop="address" borderBottom required>
|
||||
<u--input v-model="form.address" border="none" placeholder="请输入居住地址" />
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="身份证号" prop="id_number" borderBottom required>
|
||||
<u--input v-model="form.id_number" border="none" placeholder="请输入身份证号" />
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="支付宝账户" prop="alipay" borderBottom required>
|
||||
<u--input v-model="form.alipay" border="none" placeholder="请输入支付宝账户" />
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="身份证上传" prop="id_card" borderBottom required>
|
||||
<u--input v-model="form.id_card" disabled disabledColor="#ffffff" placeholder="请选择性别" border="none"
|
||||
suffixIcon="arrow-right" />
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="人脸识别" prop="face" borderBottom required>
|
||||
<u--input v-model="form.face" disabled disabledColor="#ffffff" placeholder="请选择性别" border="none"
|
||||
suffixIcon="arrow-right" />
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="技能证书上传" prop="skill" borderBottom>
|
||||
<u--input v-model="form.skill" disabled disabledColor="#ffffff" placeholder="请选择性别" border="none"
|
||||
suffixIcon="arrow-right" />
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<u-action-sheet :show="show.sex" :actions="options.sex" title="请选择性别" @close="show.sex = false" @select="sexSelect" />
|
||||
<u-action-sheet :show="show.unit" :actions="options.unit" title="请选择单位" @close="show.unit = false"
|
||||
@select="unitSelect" />
|
||||
<u-city-select v-model="show.region" @city-change="citySelect" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive } from 'vue';
|
||||
import { ref, onMounted } from 'vue';
|
||||
|
||||
const chartData = ref({});
|
||||
const form = reactive({
|
||||
name: '',
|
||||
sex: '',
|
||||
age: '',
|
||||
phone: '',
|
||||
service: '',
|
||||
years: '',
|
||||
profession: '',
|
||||
region: '',
|
||||
address: '',
|
||||
id_number: '',
|
||||
alipay: '',
|
||||
id_card: '',
|
||||
face: '',
|
||||
skill: ''
|
||||
})
|
||||
const rules = reactive({
|
||||
|
||||
onMounted(() => { getServerData() });
|
||||
|
||||
function getServerData() {
|
||||
// 模拟从服务器获取数据时的延时
|
||||
setTimeout(() => {
|
||||
let res = {
|
||||
categories: ['2016', '2017', '2018', '2019', '2020', '2021'],
|
||||
series: [
|
||||
{
|
||||
name: '目标值',
|
||||
data: [35, 36, 31, 33, 13, 34],
|
||||
},
|
||||
{
|
||||
name: '完成量',
|
||||
data: [18, 27, 21, 24, 6, 28],
|
||||
},
|
||||
],
|
||||
};
|
||||
chartData.value = JSON.parse(JSON.stringify(res));
|
||||
}, 500);
|
||||
})
|
||||
const show = reactive({
|
||||
sex: false,
|
||||
unit: false,
|
||||
region: false
|
||||
})
|
||||
const options = reactive({
|
||||
sex: [{ name: '男' }, { name: '女' }],
|
||||
unit: [
|
||||
{ name: "济南产晏太阳能有限公司" },
|
||||
{ name: "济南一休太阳能有限公司" },
|
||||
{ name: "济南荣源太阳能有限公司" },
|
||||
{ name: "济南力瑞新能能源科技有限公司" },
|
||||
{ name: "济南东狮设备安装有限公司" }
|
||||
],
|
||||
profession: [
|
||||
{ name: "普通太阳能" },
|
||||
{ name: "壁挂太阳能" },
|
||||
{ name: "分体式" },
|
||||
{ name: "工程" },
|
||||
{ name: "空气能" },
|
||||
{ name: "电热水器" },
|
||||
]
|
||||
})
|
||||
function sexSelect(e) {
|
||||
form.sex = e.name
|
||||
}
|
||||
function unitSelect(e) {
|
||||
form.unit = e.name
|
||||
}
|
||||
function citySelect(e) {
|
||||
form.region = e.province.label + '-' + e.city.label + '-' + e.area.label;
|
||||
// e.province.value + '-' + e.city.value + '-' + e.area.value;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 200rpx;
|
||||
width: 200rpx;
|
||||
margin-top: 200rpx;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.text-area {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
color: #8f8f94;
|
||||
}
|
||||
|
||||
.charts-box {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
<style scoped lang="scss">
|
||||
:deep(.u-form-item__body__left__content__required) {
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import citySelect from './u-city-select.vue';
|
||||
import citySelect from '@/components/u-city-select/u-city-select.vue';
|
||||
export default {
|
||||
components: {
|
||||
citySelect
|
||||
@ -36,13 +36,14 @@ export default {
|
||||
methods: {
|
||||
cityChange(e) {
|
||||
this.input = e.province.label + '-' + e.city.label + '-' + e.area.label;
|
||||
this.input += e.province.value + '-' + e.city.value + '-' + e.area.value;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.btn-wrap {
|
||||
margin: 100rpx 30rpx;
|
||||
}
|
||||
.btn-wrap {
|
||||
margin: 100rpx 30rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user