|
|
|
@ -62,50 +62,91 @@
|
|
|
|
<view class="section">
|
|
|
|
<view class="section">
|
|
|
|
<view class="section-title">设置参数</view>
|
|
|
|
<view class="section-title">设置参数</view>
|
|
|
|
<view class="form">
|
|
|
|
<view class="form">
|
|
|
|
<uv-form labelAlign="left" labelWidth="auto" labelPosition="left" :model="formField" :rules="rules"
|
|
|
|
<uv-form
|
|
|
|
ref="form">
|
|
|
|
labelAlign="left"
|
|
|
|
|
|
|
|
labelWidth="auto"
|
|
|
|
|
|
|
|
labelPosition="left"
|
|
|
|
|
|
|
|
:model="formField"
|
|
|
|
|
|
|
|
:rules="rules"
|
|
|
|
|
|
|
|
ref="form"
|
|
|
|
|
|
|
|
>
|
|
|
|
<uv-form-item prop="phone" label="电梯类型">
|
|
|
|
<uv-form-item prop="phone" label="电梯类型">
|
|
|
|
<uv-input v-model="formField.phone" color="#000" border="none"
|
|
|
|
<uv-input
|
|
|
|
:placeholderStyle="{color:'#666778'}" placeholder="请输入">
|
|
|
|
v-model="formField.phone"
|
|
|
|
</uv-input>
|
|
|
|
color="#000"
|
|
|
|
|
|
|
|
border="none"
|
|
|
|
|
|
|
|
:placeholderStyle="{ color: '#666778' }"
|
|
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
|
|
></uv-input>
|
|
|
|
</uv-form-item>
|
|
|
|
</uv-form-item>
|
|
|
|
<uv-form-item prop="password" label="载重(kg)">
|
|
|
|
<uv-form-item prop="password" label="载重(kg)">
|
|
|
|
<uv-input v-model="formField.password" color="#000" border="none"
|
|
|
|
<uv-input
|
|
|
|
:placeholderStyle="{color:'#666778'}" placeholder="请输入">
|
|
|
|
v-model="formField.password"
|
|
|
|
</uv-input>
|
|
|
|
color="#000"
|
|
|
|
|
|
|
|
border="none"
|
|
|
|
|
|
|
|
:placeholderStyle="{ color: '#666778' }"
|
|
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
|
|
></uv-input>
|
|
|
|
</uv-form-item>
|
|
|
|
</uv-form-item>
|
|
|
|
<uv-form-item prop="password" label="井道宽度(mm)">
|
|
|
|
<uv-form-item prop="password" label="井道宽度(mm)">
|
|
|
|
<uv-input type="digit" v-model="formField.password" color="#000" border="none"
|
|
|
|
<uv-input
|
|
|
|
:placeholderStyle="{color:'#666778'}" placeholder="请输入">
|
|
|
|
type="digit"
|
|
|
|
</uv-input>
|
|
|
|
v-model="formField.password"
|
|
|
|
|
|
|
|
color="#000"
|
|
|
|
|
|
|
|
border="none"
|
|
|
|
|
|
|
|
:placeholderStyle="{ color: '#666778' }"
|
|
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
|
|
></uv-input>
|
|
|
|
</uv-form-item>
|
|
|
|
</uv-form-item>
|
|
|
|
<uv-form-item prop="password" label="井道深度(mm)">
|
|
|
|
<uv-form-item prop="password" label="井道深度(mm)">
|
|
|
|
<uv-input type="digit" v-model="formField.password" color="#000" border="none"
|
|
|
|
<uv-input
|
|
|
|
:placeholderStyle="{color:'#666778'}" placeholder="请输入">
|
|
|
|
type="digit"
|
|
|
|
</uv-input>
|
|
|
|
v-model="formField.password"
|
|
|
|
|
|
|
|
color="#000"
|
|
|
|
|
|
|
|
border="none"
|
|
|
|
|
|
|
|
:placeholderStyle="{ color: '#666778' }"
|
|
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
|
|
></uv-input>
|
|
|
|
</uv-form-item>
|
|
|
|
</uv-form-item>
|
|
|
|
<uv-form-item prop="password" label="顶层高度(mm)">
|
|
|
|
<uv-form-item prop="password" label="顶层高度(mm)">
|
|
|
|
<uv-input type="digit" v-model="formField.password" color="#000" border="none"
|
|
|
|
<uv-input
|
|
|
|
:placeholderStyle="{color:'#666778'}" placeholder="请输入">
|
|
|
|
type="digit"
|
|
|
|
</uv-input>
|
|
|
|
v-model="formField.password"
|
|
|
|
|
|
|
|
color="#000"
|
|
|
|
|
|
|
|
border="none"
|
|
|
|
|
|
|
|
:placeholderStyle="{ color: '#666778' }"
|
|
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
|
|
></uv-input>
|
|
|
|
</uv-form-item>
|
|
|
|
</uv-form-item>
|
|
|
|
<uv-form-item prop="password" label="底坑深度(mm)">
|
|
|
|
<uv-form-item prop="password" label="底坑深度(mm)">
|
|
|
|
<uv-input type="digit" v-model="formField.password" color="#000" border="none"
|
|
|
|
<uv-input
|
|
|
|
:placeholderStyle="{color:'#666778'}" placeholder="请输入">
|
|
|
|
type="digit"
|
|
|
|
</uv-input>
|
|
|
|
v-model="formField.password"
|
|
|
|
|
|
|
|
color="#000"
|
|
|
|
|
|
|
|
border="none"
|
|
|
|
|
|
|
|
:placeholderStyle="{ color: '#666778' }"
|
|
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
|
|
></uv-input>
|
|
|
|
</uv-form-item>
|
|
|
|
</uv-form-item>
|
|
|
|
<uv-form-item prop="password">
|
|
|
|
<uv-form-item prop="password">
|
|
|
|
<div style="margin-bottom: 4px;">备注说明</div>
|
|
|
|
<div style="margin-bottom: 4px">备注说明</div>
|
|
|
|
<uv-textarea v-model="formField.password" placeholder="请输入"></uv-textarea>
|
|
|
|
<uv-textarea
|
|
|
|
|
|
|
|
v-model="formField.password"
|
|
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
|
|
></uv-textarea>
|
|
|
|
</uv-form-item>
|
|
|
|
</uv-form-item>
|
|
|
|
</uv-form>
|
|
|
|
</uv-form>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 底部按钮 -->
|
|
|
|
<!-- 底部按钮 -->
|
|
|
|
<view class="bottom-actions">
|
|
|
|
<view class="bottom-actions">
|
|
|
|
<uv-button :loading="generating" @click="viewHistory" text="生成图纸" color="#3F70FF"></uv-button>
|
|
|
|
<uv-button
|
|
|
|
|
|
|
|
:loading="generating"
|
|
|
|
|
|
|
|
@click="viewHistory"
|
|
|
|
|
|
|
|
text="生成图纸"
|
|
|
|
|
|
|
|
color="#3F70FF"
|
|
|
|
|
|
|
|
></uv-button>
|
|
|
|
<uv-button @click="viewHistory" text="查看记录"></uv-button>
|
|
|
|
<uv-button @click="viewHistory" text="查看记录"></uv-button>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
@ -122,11 +163,12 @@ import {
|
|
|
|
} from "@dcloudio/uni-app";
|
|
|
|
} from "@dcloudio/uni-app";
|
|
|
|
import { useAuthStore, useUserStore } from "@/store";
|
|
|
|
import { useAuthStore, useUserStore } from "@/store";
|
|
|
|
import RPC from "@/utils/request";
|
|
|
|
import RPC from "@/utils/request";
|
|
|
|
|
|
|
|
import { usePermission } from "@/hooks/usePermission";
|
|
|
|
|
|
|
|
|
|
|
|
const authStore = useAuthStore();
|
|
|
|
const authStore = useAuthStore();
|
|
|
|
const userStore = useUserStore();
|
|
|
|
const userStore = useUserStore();
|
|
|
|
|
|
|
|
|
|
|
|
const generating = ref(false)
|
|
|
|
const generating = ref(false);
|
|
|
|
|
|
|
|
|
|
|
|
// 响应式数据
|
|
|
|
// 响应式数据
|
|
|
|
const selectedTemplate = ref("passenger");
|
|
|
|
const selectedTemplate = ref("passenger");
|
|
|
|
@ -136,12 +178,12 @@ const selectTemplate = (template) => {
|
|
|
|
selectedTemplate.value = template;
|
|
|
|
selectedTemplate.value = template;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const form = ref(null)
|
|
|
|
const form = ref(null);
|
|
|
|
const formField = ref({
|
|
|
|
const formField = ref({
|
|
|
|
phone: '',
|
|
|
|
phone: "",
|
|
|
|
password: '',
|
|
|
|
password: "",
|
|
|
|
})
|
|
|
|
});
|
|
|
|
const rules = ref({
|
|
|
|
const rules = ref({
|
|
|
|
// 'phone': {
|
|
|
|
// 'phone': {
|
|
|
|
// required: true,
|
|
|
|
// required: true,
|
|
|
|
// message: '请填写手机号',
|
|
|
|
// message: '请填写手机号',
|
|
|
|
@ -152,8 +194,7 @@ const form = ref(null)
|
|
|
|
// message: '请填写验证码',
|
|
|
|
// message: '请填写验证码',
|
|
|
|
// trigger: ['blur', 'change']
|
|
|
|
// trigger: ['blur', 'change']
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 生成图纸
|
|
|
|
// 生成图纸
|
|
|
|
const generateDrawing = async () => {
|
|
|
|
const generateDrawing = async () => {
|
|
|
|
@ -167,9 +208,7 @@ const generateDrawing = async () => {
|
|
|
|
|
|
|
|
|
|
|
|
generating.value = true;
|
|
|
|
generating.value = true;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const params = {
|
|
|
|
const params = {};
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 这里调用生成图纸的API
|
|
|
|
// 这里调用生成图纸的API
|
|
|
|
// const result = await RPC.post('/api/generate-drawing', params)
|
|
|
|
// const result = await RPC.post('/api/generate-drawing', params)
|
|
|
|
@ -200,7 +239,7 @@ const generateDrawing = async () => {
|
|
|
|
|
|
|
|
|
|
|
|
// 查看历史记录
|
|
|
|
// 查看历史记录
|
|
|
|
const viewHistory = () => {
|
|
|
|
const viewHistory = () => {
|
|
|
|
console.log(111)
|
|
|
|
console.log(111);
|
|
|
|
uni.navigateTo({
|
|
|
|
uni.navigateTo({
|
|
|
|
url: "/pagesA/generate-record/generate-record",
|
|
|
|
url: "/pagesA/generate-record/generate-record",
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -227,6 +266,16 @@ onShareTimeline((data) => {
|
|
|
|
onLoad(() => {
|
|
|
|
onLoad(() => {
|
|
|
|
console.log("index-onLoad");
|
|
|
|
console.log("index-onLoad");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
onShow(async () => {
|
|
|
|
|
|
|
|
console.log("test page onShow");
|
|
|
|
|
|
|
|
const hasPermission = await usePermission();
|
|
|
|
|
|
|
|
console.log(hasPermission ? "已登录" : "跳转登录");
|
|
|
|
|
|
|
|
// 以下开始写业务逻辑...
|
|
|
|
|
|
|
|
if(!hasPermission) {
|
|
|
|
|
|
|
|
authStore.signOut();
|
|
|
|
|
|
|
|
uni.$uv.route("/pages/login/login");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@ -235,6 +284,10 @@ onLoad(() => {
|
|
|
|
min-height: 100vh;
|
|
|
|
min-height: 100vh;
|
|
|
|
background-color: #f8f8f8;
|
|
|
|
background-color: #f8f8f8;
|
|
|
|
padding-bottom: 52px;
|
|
|
|
padding-bottom: 52px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* #ifdef H5 */
|
|
|
|
|
|
|
|
padding-bottom: 102px; /* H5环境下需要更多空间 (50px按钮 + 50px tabBar + 2px间距) */
|
|
|
|
|
|
|
|
/* #endif */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.header-section {
|
|
|
|
.header-section {
|
|
|
|
@ -253,15 +306,15 @@ onLoad(() => {
|
|
|
|
right: 0;
|
|
|
|
right: 0;
|
|
|
|
background: rgba(0, 0, 0, 0.5);
|
|
|
|
background: rgba(0, 0, 0, 0.5);
|
|
|
|
color: white;
|
|
|
|
color: white;
|
|
|
|
width:70%;
|
|
|
|
width: 70%;
|
|
|
|
transform: translate(0, -50%);
|
|
|
|
transform: translate(0, -50%);
|
|
|
|
padding:20px 10px;
|
|
|
|
padding: 20px 10px;
|
|
|
|
|
|
|
|
|
|
|
|
.header-title {
|
|
|
|
.header-title {
|
|
|
|
font-size: 16px;
|
|
|
|
font-size: 16px;
|
|
|
|
font-weight: bold;
|
|
|
|
font-weight: bold;
|
|
|
|
margin-bottom: 8px;
|
|
|
|
margin-bottom: 8px;
|
|
|
|
color: #BD9E85 ;
|
|
|
|
color: #bd9e85;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.header-subtitle {
|
|
|
|
.header-subtitle {
|
|
|
|
@ -330,13 +383,17 @@ onLoad(() => {
|
|
|
|
padding: 0 16px;
|
|
|
|
padding: 0 16px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
box-sizing: border-box;
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* #ifdef H5 */
|
|
|
|
|
|
|
|
bottom: 50px; /* H5环境下给tabBar留出空间 */
|
|
|
|
|
|
|
|
/* #endif */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
<style lang="scss">
|
|
|
|
.bottom-actions {
|
|
|
|
.bottom-actions {
|
|
|
|
.uv-button-wrapper {
|
|
|
|
.uv-button-wrapper {
|
|
|
|
width: 48%;
|
|
|
|
width: 48%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|