From cf4cde6399c3c847ec80ef42bece70d7d39de0b1 Mon Sep 17 00:00:00 2001
From: Panzihang <819652404@qq.com>
Date: Thu, 13 Jul 2023 16:46:06 +0800
Subject: [PATCH] 713 pan
---
components/lm-combox/lm-combox.vue | 241 +++++
config/index.js | 6 +-
pages/index/index.vue | 12 +-
pages/shipWork/index.vue | 172 +++-
uni_modules/uni-data-checkbox/changelog.md | 45 +
.../uni-data-checkbox/uni-data-checkbox.vue | 821 ++++++++++++++++++
uni_modules/uni-data-checkbox/package.json | 84 ++
uni_modules/uni-data-checkbox/readme.md | 18 +
8 files changed, 1353 insertions(+), 46 deletions(-)
create mode 100644 components/lm-combox/lm-combox.vue
create mode 100644 uni_modules/uni-data-checkbox/changelog.md
create mode 100644 uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue
create mode 100644 uni_modules/uni-data-checkbox/package.json
create mode 100644 uni_modules/uni-data-checkbox/readme.md
diff --git a/components/lm-combox/lm-combox.vue b/components/lm-combox/lm-combox.vue
new file mode 100644
index 0000000..0f8509d
--- /dev/null
+++ b/components/lm-combox/lm-combox.vue
@@ -0,0 +1,241 @@
+
+
+
+ {{label}}
+
+
+
+
+
+
+
+
+
+ {{emptyTips}}
+
+
+ {{item}}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/config/index.js b/config/index.js
index d2c90c8..4c21d77 100644
--- a/config/index.js
+++ b/config/index.js
@@ -15,8 +15,8 @@ export default {
/**
* @description api请求基础路径
*/
- // local: "http://192.168.0.103:8891",
- local: "http://61.184.202.72:8891",
+ // local: "http://192.168.61.133/tos",
+ local: "http://192.168.61.133/tos",
imgSrc: "http://116.205.142.169/HtRtosResource/assets/",
mapkey: "FUFBZ-KBIWW-P63RR-RR4W3-BNV4H-T6BGX"
-}
+}
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 4c5909d..e4e5bd7 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -6,6 +6,8 @@
+
@@ -60,6 +62,8 @@
value1: '',
value2: '',
ltemList: [1, 1, 1, 1, 2, 1, 1, 1, 1],
+ projectsMap: {}, //项目集合map
+ projectId: '', //选中的项目id(通过子组件调用setId给父组件传值的方式获取)
}
},
onLoad() {
@@ -74,7 +78,11 @@
uni.navigateTo({
url: '/pages/index/instruct'
})
- }
+ },
+ setId(e) {
+ this.projectId = e; //将子组件通过setId传值给父组件的projectId
+ console.log("本次选中的项目id是" + e)
+ },
}
};
@@ -158,4 +166,4 @@
}
}
}
-
+
\ No newline at end of file
diff --git a/pages/shipWork/index.vue b/pages/shipWork/index.vue
index 725d44c..269f862 100644
--- a/pages/shipWork/index.vue
+++ b/pages/shipWork/index.vue
@@ -6,50 +6,55 @@
-
+
-
-
-
+
+
+
+ 搜索
- 海王星领袖
+ {{item.spmName}}
-
- 进口航次: 735546
+ 进口航次: {{item.inVvyName}}
- 贸易类型: 内贸
+ 进口贸易类型: {{item.inTradeTypeName}}
- 出口航次: 555546
+ 出口航次: {{item.outVvyName}}
- 贸易类型: 外贸
+ 出口贸易类型: {{item.outTradeTypeName}}
- 计划泊位: 一泊位
+ 计划泊位: {{item.planBerthageName}}
- 实际泊位: 一泊位
+ 实际泊位: {{item.actualBerthageName}}
-
+
+ {{item.uploadStatusDesc}}
+ {{item.uploadTime}}
+
+
@@ -88,22 +92,13 @@
export default {
data() {
return {
- value: 0,
- value1: '',
- range: [{
- value: 0,
- text: "一号港"
- },
- {
- value: 1,
- text: "二号港"
- },
- {
- value: 2,
- text: "不冻港"
- },
- ],
- ltemList: [1, 2, 1, 1, 2, 1, 1, 1, 1],
+ // 港口
+ pamValue: "",
+ pamList: [],
+ // 船名航次
+ shipValue: '',
+ shipList: [],
+ ltemList: [],
}
},
onLoad() {
@@ -111,12 +106,101 @@
},
components: {
SideBar,
- HeadInfo
+ HeadInfo,
+ },
+ mounted() {
+ this.getPam();
+ this.getShip();
},
methods: {
- change(e) {
- console.log("e:", e);
+ // 获取船的数据
+ initData() {
+ uni.request({
+ url: this.$local + '/api/shipOperate/select?pamId=' + this.pamValue + "&vvyId=" + this
+ .shipValue,
+ header: {
+ 'Content-Type': 'application/json' //自定义请求头信息
+ },
+ method: 'GET', //请求方式,必须为大写
+ success: (res) => {
+ console.log('接口返回------', res);
+ if (res.statusCode === 200) {
+ this.ltemList = res.data.data.records
+ }
+ }
+ })
},
+ // 获取港区下拉数据
+ getPam() {
+ uni.request({
+ url: this.$local + '/api/shipOperate/queryPortArea',
+ header: {
+ 'Content-Type': 'application/json' //自定义请求头信息
+ },
+ method: 'GET', //请求方式,必须为大写
+ success: (res) => {
+ console.log('接口返回------', res);
+ if (res.statusCode === 200) {
+ let arr = res.data.data;
+ arr.forEach((v, index) => {
+ this.pamList.push({
+ text: v.pamName,
+ value: v.pamId
+ })
+ })
+ }
+ }
+ })
+ },
+ // 获取船名航次下拉数据
+ getShip() {
+ uni.request({
+ url: this.$local + '/api/shipOperate/queryShipmentVoyageData?key=阳',
+ header: {
+ 'Content-Type': 'application/json' //自定义请求头信息
+ },
+ method: 'GET', //请求方式,必须为大写
+ success: (res) => {
+ console.log('接口返回------', res);
+ if (res.statusCode === 200) {
+ // this.shipList = res.data.data
+ let arr = res.data.data;
+ arr.forEach((v, index) => {
+ this.shipList.push({
+ text: v.spmName,
+ value: v.vvyId
+ })
+ })
+ }
+ }
+ })
+ },
+ // 港区下拉
+ pamChange(event) {},
+ // 船名航次下拉
+ shipChange(e) {},
+ // 点击搜索
+ search() {
+ this.initData()
+ },
+ // 点击下载
+ download(item) {
+ let ids = [item.outVvyName, item.inVvyName]
+ console.log(ids)
+ uni.request({
+ url: this.$local + '/api/shipOperate/download?vvyIds=' + ids,
+ header: {
+ 'Content-Type': 'application/json' //自定义请求头信息
+ },
+ method: 'GET', //请求方式,必须为大写
+ success: (res) => {
+ console.log('接口返回------', res);
+ if (res.statusCode === 200) {}
+ }
+ })
+ },
+ // 点击上传
+ upload() {},
toGo() {
uni.navigateTo({
url: `/pages/shipWork/documentList`
@@ -126,20 +210,23 @@
};
-
diff --git a/uni_modules/uni-data-checkbox/package.json b/uni_modules/uni-data-checkbox/package.json
new file mode 100644
index 0000000..113c350
--- /dev/null
+++ b/uni_modules/uni-data-checkbox/package.json
@@ -0,0 +1,84 @@
+{
+ "id": "uni-data-checkbox",
+ "displayName": "uni-data-checkbox 数据选择器",
+ "version": "1.0.3",
+ "description": "通过数据驱动的单选框和复选框",
+ "keywords": [
+ "uni-ui",
+ "checkbox",
+ "单选",
+ "多选",
+ "单选多选"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": "^3.1.1"
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+"dcloudext": {
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+ "type": "component-vue"
+ },
+ "uni_modules": {
+ "dependencies": ["uni-load-more","uni-scss"],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "y"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ }
+ }
+ }
+ }
+}
diff --git a/uni_modules/uni-data-checkbox/readme.md b/uni_modules/uni-data-checkbox/readme.md
new file mode 100644
index 0000000..6eb253d
--- /dev/null
+++ b/uni_modules/uni-data-checkbox/readme.md
@@ -0,0 +1,18 @@
+
+
+## DataCheckbox 数据驱动的单选复选框
+> **组件名:uni-data-checkbox**
+> 代码块: `uDataCheckbox`
+
+
+本组件是基于uni-app基础组件checkbox的封装。本组件要解决问题包括:
+
+1. 数据绑定型组件:给本组件绑定一个data,会自动渲染一组候选内容。再以往,开发者需要编写不少代码实现类似功能
+2. 自动的表单校验:组件绑定了data,且符合[uni-forms](https://ext.dcloud.net.cn/plugin?id=2773)组件的表单校验规范,搭配使用会自动实现表单校验
+3. 本组件合并了单选多选
+4. 本组件有若干风格选择,如普通的单选多选框、并列button风格、tag风格。开发者可以快速选择需要的风格。但作为一个封装组件,样式代码虽然不用自己写了,却会牺牲一定的样式自定义性
+
+在uniCloud开发中,`DB Schema`中配置了enum枚举等类型后,在web控制台的[自动生成表单](https://uniapp.dcloud.io/uniCloud/schema?id=autocode)功能中,会自动生成``uni-data-checkbox``组件并绑定好data
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-checkbox)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file