From ae3855638dba0c927236c1a1b1a85d5b048c40e2 Mon Sep 17 00:00:00 2001 From: Houjie <714924425@qq.com> Date: 星期五, 18 四月 2025 10:31:08 +0800 Subject: [PATCH] 提交 --- pages/common/helloWorld.vue | 304 +++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 247 insertions(+), 57 deletions(-) diff --git a/pages/common/helloWorld.vue b/pages/common/helloWorld.vue index 49e8136..fb5d979 100644 --- a/pages/common/helloWorld.vue +++ b/pages/common/helloWorld.vue @@ -1,72 +1,262 @@ <template> - <view> - <scroll-view :scroll-y="modalName==null" class="page" :class="modalName!=null?'show':''"> - <cu-custom bgColor="bg-black" :isBack="true"> - <block slot="content">helloWorld</block> - </cu-custom> - - <view class="padding flex flex-direction"> - <app-select label=" 绫� 鍨嬶細" v-model="type" placeholder="璇烽�夋嫨绫诲瀷" :dict="plan_type" space ></app-select> - </view> - - <view class="padding flex flex-direction"> - <my-date label="寮�濮嬫椂闂达細" v-model="beginTime" placeholder="璇烽�夋嫨寮�濮嬫椂闂�" required fields="minute"></my-date> - </view> - - - <view class="padding flex flex-direction"> - <uni-calendar :showMonth="true" :selected="selected" /> - </view> - - - <view class="padding flex flex-direction"> - <my-image-upload /> - </view> - - </scroll-view> - </view> + <view class="container"> + <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> + <block slot="backText">杩斿洖</block> + <!-- <cu-custom :bgColor="NavBarColor" backRouterName="index"> + <block slot="right"> + <view @tap="$debounce(BackPage)"> + <view class="cuIcon-back back">杩斿洖</view> + </view> + </block> --> + <block slot="content">璁惧璇︽儏</block> + </cu-custom> + <view class="container"> + + <uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext"> + <uni-group top="1"> + + <uni-forms-item name="num" label="璁惧鍥剧墖:"> + <image style="height: 100px; width: 300px;" + :src="formData.equipmentImagel?formData.equipmentImage:'/static/zhanwei.png'"></image> + </uni-forms-item> + <uni-forms-item required name="num" label="璁惧缂栧彿:"> + <uni-easyinput v-model="formData.equipmentCode" :disabled="true" /> + </uni-forms-item> + + <uni-forms-item name="remark" label="璁惧鍚嶇О:"> + <uni-easyinput v-model="formData.equipmentName" :disabled="true" /> + </uni-forms-item> + <uni-forms-item name="remark" label="璁惧鍨嬪彿:"> + <uni-easyinput v-model="formData.equipmentModel" :disabled="true" /> + </uni-forms-item> + <uni-forms-item name="outNum" label="璁惧瑙勬牸:"> + <uni-easyinput v-model="formData.equipmentSpecification" :disabled="true" /> + </uni-forms-item> + <view class="text-gray margin-bottom-lg">鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�� 鍩烘湰淇℃伅 鈥斺�斺�斺�斺�斺�斺�斺�斺�斺��</view> + <uni-forms-item name="taskCode" label="璁惧鍒嗙被:"> + <uni-easyinput :disabled="true" v-model="formData.equipmentCategory" /> + </uni-forms-item> + <uni-forms-item name="endLocation" label="鍑哄巶鏃ユ湡:"> + <uni-easyinput :disabled="true" v-model="formData.leaveFactoryDate" /> + + </uni-forms-item> + <uni-forms-item name="endLocation" label="楠屾敹鏃ユ湡:"> + <uni-easyinput :disabled="true" v-model="formData.acceptanceCheckDate" /> + + </uni-forms-item> + + <uni-forms-item name="endLocation" label="瀹夎浣嶇疆:"> + <uni-easyinput :disabled="true" v-model="formData.installationPosition" /> + </uni-forms-item> + <uni-forms-item name="endLocation" label="璧勪骇鐘舵��:"> + <uni-easyinput :disabled="true" v-model="formData.assetStatus" /> + </uni-forms-item> + <uni-forms-item name="endLocation" label="璁惧绠$悊鍛�:"> + <uni-easyinput :disabled="true" v-model="formData.equipmentManager" /> + </uni-forms-item> + + </uni-group> + </uni-forms> + </view> + </view> </template> <script> - const plan_type = [{text:'鏃ュ父璁板綍',value:'1'},{text:'鏈懆宸ヤ綔',value:'2'},{text:'涓嬪懆璁″垝',value:'3'}]; - import appSelect from '@/components/my-componets/appSelect.vue' - import myImageUpload from '@/components/my-componets/my-image-upload.vue' - import myDate from '@/components/my-componets/my-date.vue' - - + import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js"; export default { - name: 'helloWorld', - props:{ - cur:String, - }, - watch: { - cur: { - immediate: true, - handler:function(val,oldVal){ - console.log('cur',val,oldVal) - - }, - }, - }, - components:{ - appSelect,myImageUpload,myDate - }, + mixins: [MescrollMixin], // 浣跨敤mixin data() { return { - modalName: null, - item:{msg:'閫�鍑烘垚鍔�'}, - plan_type, - type:"1", - selected:[], - beginTime:'' + + formData: {}, + NavBarColor: this.NavBarColor, + url: { + stallList: "/eam/equipment/queryById" + }, + id: '', + upOption: { + page: { + num: 0, // 褰撳墠椤电爜,榛樿0,鍥炶皟涔嬪墠浼氬姞1,鍗砪allback(page)浼氫粠1寮�濮� + size: 10 // 姣忛〉鏁版嵁鐨勬暟閲� + }, + noMoreSize: 4, //濡傛灉鍒楄〃宸叉棤鏁版嵁,鍙缃垪琛ㄧ殑鎬绘暟閲忚澶т簬鍗婇〉鎵嶆樉绀烘棤鏇村鏁版嵁;閬垮厤鍒楄〃鏁版嵁杩囧皯(姣斿鍙湁涓�鏉℃暟鎹�),鏄剧ず鏃犳洿澶氭暟鎹細涓嶅ソ鐪�; 榛樿5 + empty: { + tip: '~ 鏆傛棤鏁版嵁 ~', // 鎻愮ず + }, + loading: '', + text: '鍏ㄩ儴', + isShowNoMore: false, + textNoMore: '鎴戞槸鏈夊簳绾跨殑 >_<' + }, + styles: { + color: '#2979FF', + borderColor: '#2979FF' + }, + msg1Count: 0, + msg2Count: 0, + msg1Title: "" } }, + computed: { + top() { + return this.CustomBar * 2 + 160 + }, + style() { + var StatusBar = this.StatusBar; + var CustomBar = this.CustomBar; + var CustomBar = this.CustomBar; + var style = `height:${CustomBar}px;padding-top:${StatusBar}px;`; + return style + }, + }, + + onLoad(options) { + console.log(options) + // 鍏堝皾璇曠敤姝e父鏂瑰紡鑾峰彇 + let equipmentId = options.equipmentId; + if (!equipmentId) { + // 鎵嬪姩瑙f瀽URL鍙傛暟 + const url = window.location.href; + console.log(url); + const index = url.indexOf('?'); + if (index > -1) { + const query = url.substring(index + 1); + const pairs = query.split('&'); + pairs.forEach(pair => { + const [key, value] = pair.split('='); + if (key === 'equipmentId') { + equipmentId = decodeURIComponent(value); + } + }); + } + } + }, + // if (equipmentId) { + // this.upCallback(); + // } else { + // console.log('鏃犳硶鑾峰彇璁惧ID'); + // } + // }, + // onLoad(options) { + + + // this.id = options.equipmentId || ''; + // if (!this.id) { + // uni.showModal({ + // title: '鎻愮ず', + // content: "閿欒涓嶅瓨鍦�", + // showCancel: false + // }); + // } else { + // this.upCallback(); + // } + // }, + created() { + // this.upCallback(); + }, methods: { - - } + BackPage() { + // 閲嶅啓杩斿洖鎸夐挳閫昏緫锛岃繑鍥炲埌棣栭〉 + uni.switchTab({ + url: '/pages/index/index' // 杩欓噷鏄椤电殑璺緞锛屾牴鎹疄闄呮儏鍐典慨鏀� + }); + + + }, + upCallback() { + console.log("id", this.id) + this.$http.get(this.url.stallList, { + params: { + pageNo: 999, + pageSize: 1, + order: 'asc', + column: 'createTime', + id: this.id + }, + + }).then(res => { + this.announcement1 = res.data.result + console.log("url", res) + //璁剧疆鍒楄〃鏁版嵁 + if (res.data.success) { + console.log("res", res.data.result.equipmentCode) + this.formData = this.announcement1 + } + }).catch(() => { + //鑱旂綉澶辫触, 缁撴潫鍔犺浇 + }) + }, + + + + /* 妫�绱� */ + getSera(res) { + this.msgList = []; + if (keyword == 0) { + this.$http.get(this.url.stallList, { + params: { + pageNo: 1, + pageSize: 999, + order: "desc", + column: "createTime", + equipmentCode: res + } + }).then(res => { + //鑱旂綉鎴愬姛鐨勫洖璋�,闅愯棌涓嬫媺鍒锋柊鍜屼笂鎷夊姞杞界殑鐘舵��; + + this.announcement1 = res.data.result.records + this.mescroll.endSuccess(this.announcement1.length); + console.log("url", res) + //璁剧疆鍒楄〃鏁版嵁 + if (res.data.success) { + console.log("res", res.data) + this.msg1Count = res.data.result.total + this.msg1Title = "閫氱煡(" + res.data.result.total + ")"; + for (let annItem of this.announcement1) { + this.msgList.push(annItem) + } + } + if (page.num == 1) { + this.msgList = []; //濡傛灉鏄涓�椤甸渶鎵嬪姩鍒剁┖鍒楄〃 + this.msgList = this.msgList.concat(this.announcement1); //杩藉姞鏂版暟鎹� + } + + }).catch(() => { + //鑱旂綉澶辫触, 缁撴潫鍔犺浇 + this.mescroll.endErr(); + }) + } + }, + + mescrollInit(mescroll) { + console.log('mescrollInit') + this.mescroll = mescroll; + }, + }, + } </script> <style> -</style> + .is-hover { + color: rgba(255, 255, 255, 0.6); + background-color: #55aaff; + border-color: #55aaff; + } + + + + .content { + margin-top: 5px; + } + + .content scroll-view { + scrollIndicator: "none" + } + + .popupView { + margin-top: 85px; + height: auto; + } +</style> \ No newline at end of file -- Gitblit v1.9.3