绘制地块

master
Tuzki 2 years ago
parent a834cd6808
commit c101d0b21b
  1. 53
      config.js
  2. 6
      pages/login.vue
  3. 25
      sunPages/addBlock/addBlock.vue
  4. 14
      sunPages/addNoteJobForm/addNoteJobForm.vue
  5. 6
      sunPages/blockDetail/blockDetail.vue
  6. 1
      sunPages/editBlock/editBlock.vue
  7. 4
      sunPages/traceability-code/inventory.vue
  8. 4
      sunPages/traceability-code/sales.vue

@ -1,28 +1,29 @@
// 应用全局配置
module.exports = {
//baseUrl: 'https://sy.hbcjy.com/prod-api',
// baseUrl: 'http://127.0.0.1:48080',
baseUrl: 'http://192.168.130.193:48080',
baseApi: '/admin-api',
// 应用信息
appInfo: {
// 应用名称
name: "农源追溯宝",
// 应用版本
version: "1.0.0",
// 应用logo
logo: "/static/logo.png",
// 官方网站
site_url: "https://iocoder.cn",
// 政策协议
agreements: [{
title: "隐私政策",
url: "https://iocoder.cn"
},
{
title: "用户服务协议",
url: "https://iocoder.cn"
}
]
}
}
baseUrl: 'https://sy.hbcjy.com/prod-api',
h5Url:'https://sy.hbcjy.com',
// baseUrl: 'http://127.0.0.1:48080',
// baseUrl: 'http://192.168.130.193:48080',
baseApi: '/admin-api',
// 应用信息
appInfo: {
// 应用名称
name: "农源追溯宝",
// 应用版本
version: "1.0.0",
// 应用logo
logo: "/static/logo.png",
// 官方网站
site_url: "https://iocoder.cn",
// 政策协议
agreements: [{
title: "隐私政策",
url: "https://iocoder.cn"
},
{
title: "用户服务协议",
url: "https://iocoder.cn"
}
]
}
}

@ -48,7 +48,7 @@
captchaEnabled: true, // TODO
globalConfig: getApp().globalData.config,
loginForm: {
username: "admin",
username: "cjyadmin",
password: "cjy@1501!",
captchaVerification: ""
}
@ -88,7 +88,7 @@
this.$store.dispatch('Login', this.loginForm).then(() => {
this.$modal.closeLoading()
this.loginSuccess()
this.$store.dispatch('getBaseList').then(res => {
this.$store.dispatch('getBaseList').then(res => {
// setTimeout(()=>{
this.$store.dispatch('changeBaseId', res[0].id)
// },1500)
@ -192,4 +192,4 @@
.login-code-img {
height: 45px;
}
</style>
</style>

@ -8,7 +8,7 @@
</view>
<view class="map-btn-group">
<button v-if="formData.positionStr && formData.positionStr != ''" @click="reset">清除地块</button>
<button v-else @click="drawMap">绘制地块</button>
<button v-else @click="drawMap(formData)">绘制地块</button>
</view>
</view>
<view class="v-form v-container">
@ -125,6 +125,12 @@
this.formData.positionStr = obj.positionStr;
this.initmapPolygon();
}
if (options.data) {
const obj = JSON.parse(decodeURIComponent(options.data));
this.formData = obj;
this.initmapPolygon();
console.log(this.formData);
}
self = this;
// self.getAuthorizeInfo();
// API
@ -263,18 +269,20 @@
console.log('err', err);
});
},
drawMap() {
drawMap(val) {
console.log(val)
const str = encodeURIComponent(JSON.stringify(val))
uni.redirectTo({
url: '/sunPages/drawMap/drawMap'
url: '/sunPages/drawMap/drawMap?str=' + str
});
},
reset() {
this.formData = {
blockName: undefined,
blockColor: undefined,
blockType: undefined,
blockArea: undefined,
positionStr: undefined,
blockName: null,
blockColor: null,
blockType: null,
blockArea: null,
positionStr: null,
baseId: this.$store.state.user.baseId
};
this.polygons = [];
@ -427,3 +435,4 @@
}
}
</style>

@ -38,16 +38,16 @@
<!-- <span style="color: #666;">{{parseTime(formData.jobTime,'{y}-{m}-{d}')||'请选择操作时间'}}</span> -->
</uni-datetime-picker>
</uni-forms-item>
<uni-forms-item label="作业方式" name="jobWay" required>
<uni-data-picker v-model="formData.jobWay" :localdata="operationWayList" class="m-data-pick" popupTitle=" "></uni-data-picker>
</uni-forms-item>
<view v-if="showSave" class="">
<uni-forms-item label="收获重量" name="production" customClass="custom-content" required>
<uni-easyinput type="digit" :styles="styles" v-model="formData.production" class="m-cj" placeholder="请输入收获重量" @blur="handlerInput($event)">
<template slot="right" class="m-kg" :class="formData.production == undefined || formData.production == '' ? 'no-mar' : ''">公斤</template>
</uni-easyinput>
</uni-forms-item>
<uni-forms-item label="作业方式" name="jobWay" required>
<uni-data-picker v-model="formData.jobWay" :localdata="operationWayList" class="m-data-pick" popupTitle=" "></uni-data-picker>
</uni-forms-item>
<uni-forms-item label="质检情况" name="qualityInspection" required>
<uni-data-picker v-model="formData.qualityInspection" :localdata="qualityInspectionList" class="m-data-pick" popupTitle=" "></uni-data-picker>
</uni-forms-item>
@ -374,7 +374,7 @@ export default {
},
handlerInput(event, index) {
this.$nextTick(() => {
if(event.target.value!=''){
if (event.target.value != '') {
const num = parseFloat(event.target.value).toFixed(2);
this.formData.production = num;
this.$forceUpdate();
@ -652,8 +652,8 @@ export default {
/deep/.v-form .search-input .is-input-border {
border: 1px solid #e5e5e5 !important;
position: relative;
.content-clear-icon{
.content-clear-icon {
}
}
.cnstom-input {

@ -299,11 +299,13 @@ export default {
}
},
getNoteList(row) {
console.log(row)
const obj = {
cropperId: row.id,
productName: row.productName,
batch: row.currentBatch,
blockName: row.blockName
blockName: row.blockName,
authenticationType:row.authenticationType
};
const data = JSON.stringify(obj);
uni.navigateTo({
@ -483,7 +485,7 @@ export default {
text-overflow: ellipsis;
text-align: center;
color: #666;
.weight{
color: #00af7f;
font-weight: bold;

@ -136,7 +136,7 @@
//
share(product) {
uni.setClipboardData({
data: config.baseUrl + '/H5/index.html?code=' + product.traceabilityCode,
data: config.h5Url + '/h5/?code=' + product.traceabilityCode,
success: function() {
uni.showToast({
title: `链接已复制`,
@ -151,4 +151,4 @@
</script>
<style>
</style>
</style>

@ -137,7 +137,7 @@
share(product) {
console.log(config.baseUrl+'/H5/index.html?code='+product.traceabilityCode)
uni.setClipboardData({
data: config.baseUrl+'/H5/index.html?code='+product.traceabilityCode,
data: config.h5Url + '/h5/?code='+product.traceabilityCode,
success: function() {
uni.showToast({
title: `链接已复制`,
@ -152,4 +152,4 @@
</script>
<style>
</style>
</style>

Loading…
Cancel
Save