| | |
| | | VITE_APP_PORT = 4096 |
| | | |
| | | # API åºç¡è·¯å¾ï¼å¼åç¯å¢ä¸ç请æ±åç¼ |
| | | VITE_APP_BASE_API = '/mes' |
| | | VITE_APP_BASE_API = 'http://114.132.189.42:7002/mes' |
| | | |
| | | # API æå¡å¨ç URL |
| | | VITE_APP_API_URL = 'http://114.132.189.42:7002' |
| | | VITE_APP_API_URL = 'http://114.132.189.42:7002/mes' |
| | |
| | | * @returns è¿å token |
| | | */ |
| | | login(data: LoginFormData): Promise<LoginResult> { |
| | | console.log("data", data); |
| | | return request<LoginResult>({ |
| | | url: "/login", |
| | | method: "POST", |
| | | data: data, |
| | | header: { |
| | | "Content-Type": "application/x-www-form-urlencoded", |
| | | }, |
| | | }); |
| | | }, |
| | | |
| | |
| | | /** ç»å½ååº */ |
| | | export interface LoginResult { |
| | | /** 访é®token */ |
| | | token: string; |
| | | accessToken: string; |
| | | /** token ç±»å */ |
| | | tokenType?: string; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | import { BaseResult } from "@/models/base"; |
| | | |
| | | const ManageApi = { |
| | | getProductList(params: any) { |
| | | return request<BaseResult<any>>({ |
| | | url: "/app/intoProduction", |
| | | method: "GET", |
| | | data: params, |
| | | }); |
| | | }, |
| | | |
| | | // æ¥è¯¢æä¸ç»çº¿æ¥å·¥ |
| | | getReportList(params: any) { |
| | | return request<BaseResult<any>>({ |
| | | url: "/app/getWireOutput", |
| | | method: "GET", |
| | | data: params, |
| | | }); |
| | | }, |
| | | |
| | | // æ¥è¯¢èªæ£ä¿¡æ¯ |
| | | getSelfInspection(params: any) { |
| | | return request<BaseResult<any>>({ |
| | | url: "/app/getSelfInspection", |
| | | method: "GET", |
| | | data: params, |
| | | }); |
| | | }, |
| | | |
| | | // æ¥è¯¢é¢ç¨ä¿¡æ¯ |
| | | getStrandedWireDish(params: any) { |
| | | return request<BaseResult<any>>({ |
| | | url: "/app/getStrandedWireDish", |
| | | method: "GET", |
| | | data: params, |
| | | }); |
| | | }, |
| | | }; |
| | | |
| | | export default ManageApi; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | import { BaseResult } from "@/models/base"; |
| | | |
| | | const TwistApi = { |
| | | // è·åæä¸è¯¦æ
|
| | | getTwistDetailById(params: any) { |
| | | return request<BaseResult<any>>({ |
| | | url: "/app/getById1", |
| | | method: "GET", |
| | | data: params, |
| | | }); |
| | | }, |
| | | |
| | | // æ°å¢æä¸æ¥å·¥ |
| | | addWireOutput(data: any) { |
| | | return request<BaseResult<any>>({ |
| | | url: "/app/addWireOutput", |
| | | method: "POST", |
| | | data: data, |
| | | }); |
| | | }, |
| | | }; |
| | | |
| | | export default TwistApi; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | import { BaseResult } from "@/models/base"; |
| | | |
| | | const WireApi = { |
| | | // è·åæä¸è¯¦æ
|
| | | getWireDetailById(params: any) { |
| | | return request<BaseResult<any>>({ |
| | | url: "/app/getById", |
| | | method: "GET", |
| | | data: params, |
| | | }); |
| | | }, |
| | | |
| | | // æ°å¢æä¸æ¥å·¥ |
| | | addWireOutput(data: any) { |
| | | return request<BaseResult<any>>({ |
| | | url: "/app/addWireOutput", |
| | | method: "POST", |
| | | data: data, |
| | | }); |
| | | }, |
| | | }; |
| | | |
| | | export default WireApi; |
| | |
| | | */ |
| | | getUserInfo(): Promise<UserInfo> { |
| | | return request<UserInfo>({ |
| | | url: `${USER_BASE_URL}/me`, |
| | | url: `/getUserInfo`, |
| | | method: "GET", |
| | | }); |
| | | }, |
| | |
| | | export interface UserInfo { |
| | | /** ç¨æ·ID */ |
| | | userId?: number; |
| | | roleName?: string; |
| | | userName?: string; |
| | | |
| | | /** ç¨æ·å */ |
| | | username?: string; |
| | | |
| | | /** æµç§° */ |
| | | nickName?: string; |
| | | nickname?: string; |
| | | |
| | | /** 头åURL */ |
| | |
| | | |
| | | /** æé */ |
| | | perms?: string[]; |
| | | user?: any; |
| | | role?: any; |
| | | } |
| | | |
| | | /** |
| | |
| | | <wd-card class="card_bg"> |
| | | <template #title> |
| | | <view class="flex justify-between w-full"> |
| | | <text class="font-medium text-[#252525]">设å¤ç¼å·: 1234567891</text> |
| | | <text class="font-medium text-[#252525]">设å¤ç¼å·: {{ data.deviceModel }}</text> |
| | | <wd-tag color="#0D867F" bg-color="#E7F4EC"> |
| | | <text class="text-xs">JL/B20-400-35</text> |
| | | <text class="text-xs">{{ data.model }}</text> |
| | | </wd-tag> |
| | | </view> |
| | | </template> |
| | |
| | | </view> |
| | | <text class="text-[#646874] mx-2"> |
| | | æ»éæ±æ°é: |
| | | <text class="text-[#252525]">274m</text> |
| | | <text class="text-[#252525]">{{ data.totalAmount }}m</text> |
| | | </text> |
| | | </view> |
| | | </wd-col> |
| | |
| | | </view> |
| | | <text class="text-[#646874] mx-2"> |
| | | å·²ç产æ°é: |
| | | <text class="text-[#252525]">202m</text> |
| | | <text class="text-[#252525]">{{ data.amount }}m</text> |
| | | </text> |
| | | </view> |
| | | </wd-col> |
| | |
| | | </view> |
| | | <text class="text-[#646874] mx-2"> |
| | | å¾
æäº§æ°é: |
| | | <text class="text-[#252525]">72m</text> |
| | | <text class="text-[#252525]">{{ data.unAmount }}m</text> |
| | | </text> |
| | | </view> |
| | | </wd-col> |
| | |
| | | </wd-card> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | defineProps({ |
| | | data: { |
| | | type: Object, |
| | | default: () => {}, |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .card_bg { |
| | | margin-top: 12px; |
| | | box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.05); |
| | | padding-bottom: 10px; |
| | | } |
| | |
| | | <template #title> |
| | | <view> |
| | | <text class="font-medium"> |
| | | å¨ç¼ç |
| | | <text class="text-[#0D867F] text-xs">·ç产æä½å·¥</text> |
| | | {{ user.nickName }} |
| | | <text class="text-[#0D867F] text-xs">·{{ user.roleName }}</text> |
| | | </text> |
| | | </view> |
| | | <view> |
| | | <text class="font-medium text-[#3D3D3D] text-sm">å·¥å·: sc1989201</text> |
| | | <text class="font-medium text-[#3D3D3D] text-sm">å·¥å·: {{ user.userName }}</text> |
| | | </view> |
| | | </template> |
| | | <view class="mt-2"> |
| | |
| | | </view> |
| | | </wd-cell> |
| | | </template> |
| | | <script setup lang="ts"></script> |
| | | <script setup lang="ts"> |
| | | import { useUserStore } from "@/store/modules/user"; |
| | | import { nextTick } from "vue"; |
| | | const userStore = useUserStore(); |
| | | const userInfo: any = computed(() => userStore.userInfo); |
| | | const user = reactive({ |
| | | nickName: "", |
| | | userName: "", |
| | | roleName: "", |
| | | }); |
| | | |
| | | onLoad(() => { |
| | | nextTick(); |
| | | user.nickName = userInfo.value.user?.nickName; |
| | | user.userName = userInfo.value.user?.userName; |
| | | user.roleName = userInfo.value.user?.roles[0].roleName; |
| | | }); |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .calling_card { |
| | | background: #fff; |
| | |
| | | |
| | | <!-- æ»å¨åæ¢é项å¡swiper-itemï¼æ¤ç»ä»¶æ¯æeasycomè§èï¼å¯ä»¥å¨é¡¹ç®ä¸ç´æ¥å¼ç¨ --> |
| | | <template> |
| | | <view class="zp-swiper-item-container"> |
| | | <z-paging ref="paging" :fixed="false" |
| | | :auto="false" :useVirtualList="useVirtualList" :useInnerList="useInnerList" :cellKeyName="cellKeyName" :innerListStyle="innerListStyle" |
| | | :preloadPage="preloadPage" :cellHeightMode="cellHeightMode" :virtualScrollFps="virtualScrollFps" :virtualListCol="virtualListCol" |
| | | @query="_queryList" @listChange="_updateList"> |
| | | <slot /> |
| | | <template #header> |
| | | <slot name="header"/> |
| | | </template> |
| | | <template #cell="{item,index}"> |
| | | <slot name="cell" :item="item" :index="index"/> |
| | | </template> |
| | | <template #footer> |
| | | <slot name="footer"/> |
| | | </template> |
| | | </z-paging> |
| | | </view> |
| | | <view class="zp-swiper-item-container"> |
| | | <z-paging |
| | | ref="paging" |
| | | :fixed="false" |
| | | :auto="false" |
| | | :useVirtualList="useVirtualList" |
| | | :useInnerList="useInnerList" |
| | | :cellKeyName="cellKeyName" |
| | | :innerListStyle="innerListStyle" |
| | | :preloadPage="preloadPage" |
| | | :cellHeightMode="cellHeightMode" |
| | | :virtualScrollFps="virtualScrollFps" |
| | | :virtualListCol="virtualListCol" |
| | | @query="_queryList" |
| | | @listChange="_updateList" |
| | | > |
| | | <slot /> |
| | | <template #header> |
| | | <slot name="header" /> |
| | | </template> |
| | | <template #cell="{ item, index }"> |
| | | <slot name="cell" :item="item" :index="index" /> |
| | | </template> |
| | | <template #footer> |
| | | <slot name="footer" /> |
| | | </template> |
| | | </z-paging> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import zPaging from '../z-paging/z-paging' |
| | | /** |
| | | * z-paging-swiper-item ç»ä»¶ |
| | | * @description swiper+listæç®åæ³ä¸ä½¿ç¨å°ï¼å®é
ä¸å°±æ¯å¯¹æ®éçswiper+listä¸swiper-itemçå
è£
å°è£
ï¼ç¨ä»¥ç®ååæ³ï¼ä½ä¸ªæ§åé
ç½®å±éè¾å¤ |
| | | * @tutorial https://z-paging.zxlee.cn/api/sub-components/main.html#z-paging-swiper-itemé
ç½® |
| | | * @notice 以ä¸ä¸º z-paging-swiper-item çé
置项 |
| | | * @property {Number} tabIndex å½åç»ä»¶ç indexï¼ä¹å°±æ¯å½åç»ä»¶æ¯ swiper ä¸ç第å 个ï¼é»è®¤ä¸º 0 |
| | | * @property {Number} currentIndex å½å swiper 忢å°ç¬¬å 个 indexï¼é»è®¤ä¸º 0 |
| | | * @property {Boolean} useVirtualList æ¯å¦ä½¿ç¨èæå表ï¼é»è®¤ä¸º false |
| | | * @property {Boolean} useInnerList æ¯å¦å¨ z-paging å
é¨å¾ªç¯æ¸²æå表ï¼å
ç½®å表ï¼ï¼é»è®¤ä¸º falseãè¥ useVirtualList 为 trueï¼åæ¤é¡¹æä¸º true |
| | | * @property {String} cellKeyName å
ç½®å表 cell ç key åç§°ï¼ä»
nvue ææï¼å¨ nvue ä¸å¼å¯ useInnerList æ¶å¿
须填æ¤é¡¹ï¼é»è®¤ä¸º '' |
| | | * @property {Object} innerListStyle innerList æ ·å¼ï¼é»è®¤ä¸º {} |
| | | * @property {Number|String} preloadPage é¢å è½½çå表å¯è§èå´ï¼å表é«åº¦ï¼é¡µæ°ï¼é»è®¤ä¸º 12ãæ¤æ°å¼è¶å¤§ï¼åèæå表ä¸å è½½ç dom è¶å¤ï¼å
åæ¶èè¶å¤§ï¼ä¼ç»´æå¨ä¸ä¸ªç¨³å®å¼ï¼ï¼ä½å¢å é¢å è½½é¡µé¢æ°éå¯ç¼è§£å¿«éæ»å¨çæç½å±é®é¢ |
| | | * @property {String} cellHeightMode èæå表 cell é«åº¦æ¨¡å¼ï¼é»è®¤ä¸º 'fixed'ï¼ä¹å°±æ¯æ¯ä¸ª cell é«åº¦å®å
¨ç¸åï¼å°ä»¥ç¬¬ä¸ä¸ª cell é«åº¦ä¸ºåè¿è¡è®¡ç®ãå¯éå¼ãdynamicãï¼å³ä»£è¡¨é«åº¦æ¯å¨æéåºå®çï¼ãdynamicãæ§è½ä½äºãfixedã |
| | | * @property {Number|String} virtualListCol èæåè¡¨åæ°ï¼é»è®¤ä¸º 1ã常ç¨äºæ¯è¡æå¤åçæ
åµï¼ä¾å¦æ¯è¡æ 2 åæ°æ®ï¼éè¦å°æ¤å¼è®¾ç½®ä¸º 2 |
| | | * @property {Number|String} virtualScrollFps èæå表 scroll åæ ·å¸§çï¼é»è®¤ä¸º 60ï¼è¿é«å¯è½åºç°å¡é¡¿çé®é¢ |
| | | * @example <z-paging-swiper-item ref="swiperItem" :tabIndex="index" :currentIndex="current" @query="queryList" @updateList="updateList"></z-paging-swiper-item> |
| | | */ |
| | | export default { |
| | | name: "z-paging-swiper-item", |
| | | components: { zPaging }, |
| | | data() { |
| | | return { |
| | | firstLoaded: false |
| | | } |
| | | }, |
| | | props: { |
| | | // å½åç»ä»¶çindexï¼ä¹å°±æ¯å½åç»ä»¶æ¯swiperä¸ç第å 个 |
| | | tabIndex: { |
| | | type: Number, |
| | | default: function() { |
| | | return 0 |
| | | } |
| | | }, |
| | | // å½åswiper忢å°ç¬¬å 个index |
| | | currentIndex: { |
| | | type: Number, |
| | | default: function() { |
| | | return 0 |
| | | } |
| | | }, |
| | | // æ¯å¦ä½¿ç¨èæå表ï¼é»è®¤ä¸ºå¦ |
| | | useVirtualList: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | // æ¯å¦å¨z-pagingå
é¨å¾ªç¯æ¸²æå表(å
ç½®å表)ï¼é»è®¤ä¸ºå¦ãè¥use-virtual-list为trueï¼åæ¤é¡¹æä¸ºtrue |
| | | useInnerList: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | // å
ç½®å表cellçkeyåç§°ï¼ä»
nvueææï¼å¨nvueä¸å¼å¯use-inner-listæ¶å¿
须填æ¤é¡¹ |
| | | cellKeyName: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | // innerListæ ·å¼ |
| | | innerListStyle: { |
| | | type: Object, |
| | | default: function() { |
| | | return {}; |
| | | } |
| | | }, |
| | | // é¢å è½½çå表å¯è§èå´(å表é«åº¦)页æ°ï¼é»è®¤ä¸º12ï¼å³é¢å è½½å½å页åä¸ä¸å12页çcellãæ¤æ°å¼è¶å¤§ï¼åèæå表ä¸å è½½çdomè¶å¤ï¼å
åæ¶èè¶å¤§(ä¼ç»´æå¨ä¸ä¸ªç¨³å®å¼)ï¼ä½å¢å é¢å è½½é¡µé¢æ°éå¯ç¼è§£å¿«éæ»å¨çæç½å±é®é¢ |
| | | preloadPage: { |
| | | type: [Number, String], |
| | | default: 12 |
| | | }, |
| | | // èæå表cellé«åº¦æ¨¡å¼ï¼é»è®¤ä¸ºfixedï¼ä¹å°±æ¯æ¯ä¸ªcellé«åº¦å®å
¨ç¸åï¼å°ä»¥ç¬¬ä¸ä¸ªcellé«åº¦ä¸ºåè¿è¡è®¡ç®ãå¯éå¼ãdynamicãï¼å³ä»£è¡¨é«åº¦æ¯å¨æéåºå®çï¼ãdynamicãæ§è½ä½äºãfixedãã |
| | | cellHeightMode: { |
| | | type: String, |
| | | default: 'fixed' |
| | | }, |
| | | // èæåè¡¨åæ°ï¼é»è®¤ä¸º1ã常ç¨äºæ¯è¡æå¤åçæ
åµï¼ä¾å¦æ¯è¡æ2åæ°æ®ï¼éè¦å°æ¤å¼è®¾ç½®ä¸º2 |
| | | virtualListCol: { |
| | | type: [Number, String], |
| | | default: 1 |
| | | }, |
| | | // èæå表scrollåæ ·å¸§çï¼é»è®¤ä¸º60ï¼è¿é«å¯è½åºç°å¡é¡¿çé®é¢ |
| | | virtualScrollFps: { |
| | | type: [Number, String], |
| | | default: 60 |
| | | }, |
| | | }, |
| | | watch: { |
| | | currentIndex: { |
| | | handler(newVal, oldVal) { |
| | | if (newVal === this.tabIndex) { |
| | | // æå è½½ï¼å½æ»å¨å°å½åçitemæ¶ï¼æå»å è½½ |
| | | if (!this.firstLoaded) { |
| | | this.$nextTick(()=>{ |
| | | let delay = 5; |
| | | // #ifdef MP-TOUTIAO |
| | | delay = 100; |
| | | // #endif |
| | | setTimeout(() => { |
| | | this.$refs.paging.reload().catch(() => {}); |
| | | }, delay); |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | methods: { |
| | | reload(data) { |
| | | return this.$refs.paging.reload(data); |
| | | }, |
| | | complete(data) { |
| | | this.firstLoaded = true; |
| | | return this.$refs.paging.complete(data); |
| | | }, |
| | | _queryList(pageNo, pageSize, from) { |
| | | this.$emit('query', pageNo, pageSize, from); |
| | | }, |
| | | _updateList(list) { |
| | | this.$emit('updateList', list); |
| | | } |
| | | } |
| | | } |
| | | import zPaging from "../z-paging/z-paging"; |
| | | /** |
| | | * z-paging-swiper-item ç»ä»¶ |
| | | * @description swiper+listæç®åæ³ä¸ä½¿ç¨å°ï¼å®é
ä¸å°±æ¯å¯¹æ®éçswiper+listä¸swiper-itemçå
è£
å°è£
ï¼ç¨ä»¥ç®ååæ³ï¼ä½ä¸ªæ§åé
ç½®å±éè¾å¤ |
| | | * @tutorial https://z-paging.zxlee.cn/api/sub-components/main.html#z-paging-swiper-itemé
ç½® |
| | | * @notice 以ä¸ä¸º z-paging-swiper-item çé
置项 |
| | | * @property {Number} tabIndex å½åç»ä»¶ç indexï¼ä¹å°±æ¯å½åç»ä»¶æ¯ swiper ä¸ç第å 个ï¼é»è®¤ä¸º 0 |
| | | * @property {Number} currentIndex å½å swiper 忢å°ç¬¬å 个 indexï¼é»è®¤ä¸º 0 |
| | | * @property {Boolean} useVirtualList æ¯å¦ä½¿ç¨èæå表ï¼é»è®¤ä¸º false |
| | | * @property {Boolean} useInnerList æ¯å¦å¨ z-paging å
é¨å¾ªç¯æ¸²æå表ï¼å
ç½®å表ï¼ï¼é»è®¤ä¸º falseãè¥ useVirtualList 为 trueï¼åæ¤é¡¹æä¸º true |
| | | * @property {String} cellKeyName å
ç½®å表 cell ç key åç§°ï¼ä»
nvue ææï¼å¨ nvue ä¸å¼å¯ useInnerList æ¶å¿
须填æ¤é¡¹ï¼é»è®¤ä¸º '' |
| | | * @property {Object} innerListStyle innerList æ ·å¼ï¼é»è®¤ä¸º {} |
| | | * @property {Number|String} preloadPage é¢å è½½çå表å¯è§èå´ï¼å表é«åº¦ï¼é¡µæ°ï¼é»è®¤ä¸º 12ãæ¤æ°å¼è¶å¤§ï¼åèæå表ä¸å è½½ç dom è¶å¤ï¼å
åæ¶èè¶å¤§ï¼ä¼ç»´æå¨ä¸ä¸ªç¨³å®å¼ï¼ï¼ä½å¢å é¢å è½½é¡µé¢æ°éå¯ç¼è§£å¿«éæ»å¨çæç½å±é®é¢ |
| | | * @property {String} cellHeightMode èæå表 cell é«åº¦æ¨¡å¼ï¼é»è®¤ä¸º 'fixed'ï¼ä¹å°±æ¯æ¯ä¸ª cell é«åº¦å®å
¨ç¸åï¼å°ä»¥ç¬¬ä¸ä¸ª cell é«åº¦ä¸ºåè¿è¡è®¡ç®ãå¯éå¼ãdynamicãï¼å³ä»£è¡¨é«åº¦æ¯å¨æéåºå®çï¼ãdynamicãæ§è½ä½äºãfixedã |
| | | * @property {Number|String} virtualListCol èæåè¡¨åæ°ï¼é»è®¤ä¸º 1ã常ç¨äºæ¯è¡æå¤åçæ
åµï¼ä¾å¦æ¯è¡æ 2 åæ°æ®ï¼éè¦å°æ¤å¼è®¾ç½®ä¸º 2 |
| | | * @property {Number|String} virtualScrollFps èæå表 scroll åæ ·å¸§çï¼é»è®¤ä¸º 60ï¼è¿é«å¯è½åºç°å¡é¡¿çé®é¢ |
| | | * @example <z-paging-swiper-item ref="swiperItem" :tabIndex="index" :currentIndex="current" @query="queryList" @updateList="updateList"></z-paging-swiper-item> |
| | | */ |
| | | export default { |
| | | name: "z-paging-swiper-item", |
| | | components: { zPaging }, |
| | | props: { |
| | | // å½åç»ä»¶çindexï¼ä¹å°±æ¯å½åç»ä»¶æ¯swiperä¸ç第å 个 |
| | | tabIndex: { |
| | | type: Number, |
| | | default: function () { |
| | | return 0; |
| | | }, |
| | | }, |
| | | // å½åswiper忢å°ç¬¬å 个index |
| | | currentIndex: { |
| | | type: Number, |
| | | default: function () { |
| | | return 0; |
| | | }, |
| | | }, |
| | | // æ¯å¦ä½¿ç¨èæå表ï¼é»è®¤ä¸ºå¦ |
| | | useVirtualList: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | // æ¯å¦å¨z-pagingå
é¨å¾ªç¯æ¸²æå表(å
ç½®å表)ï¼é»è®¤ä¸ºå¦ãè¥use-virtual-list为trueï¼åæ¤é¡¹æä¸ºtrue |
| | | useInnerList: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | // å
ç½®å表cellçkeyåç§°ï¼ä»
nvueææï¼å¨nvueä¸å¼å¯use-inner-listæ¶å¿
须填æ¤é¡¹ |
| | | cellKeyName: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | // innerListæ ·å¼ |
| | | innerListStyle: { |
| | | type: Object, |
| | | default: function () { |
| | | return {}; |
| | | }, |
| | | }, |
| | | // é¢å è½½çå表å¯è§èå´(å表é«åº¦)页æ°ï¼é»è®¤ä¸º12ï¼å³é¢å è½½å½å页åä¸ä¸å12页çcellãæ¤æ°å¼è¶å¤§ï¼åèæå表ä¸å è½½çdomè¶å¤ï¼å
åæ¶èè¶å¤§(ä¼ç»´æå¨ä¸ä¸ªç¨³å®å¼)ï¼ä½å¢å é¢å è½½é¡µé¢æ°éå¯ç¼è§£å¿«éæ»å¨çæç½å±é®é¢ |
| | | preloadPage: { |
| | | type: [Number, String], |
| | | default: 12, |
| | | }, |
| | | // èæå表cellé«åº¦æ¨¡å¼ï¼é»è®¤ä¸ºfixedï¼ä¹å°±æ¯æ¯ä¸ªcellé«åº¦å®å
¨ç¸åï¼å°ä»¥ç¬¬ä¸ä¸ªcellé«åº¦ä¸ºåè¿è¡è®¡ç®ãå¯éå¼ãdynamicãï¼å³ä»£è¡¨é«åº¦æ¯å¨æéåºå®çï¼ãdynamicãæ§è½ä½äºãfixedãã |
| | | cellHeightMode: { |
| | | type: String, |
| | | default: "fixed", |
| | | }, |
| | | // èæåè¡¨åæ°ï¼é»è®¤ä¸º1ã常ç¨äºæ¯è¡æå¤åçæ
åµï¼ä¾å¦æ¯è¡æ2åæ°æ®ï¼éè¦å°æ¤å¼è®¾ç½®ä¸º2 |
| | | virtualListCol: { |
| | | type: [Number, String], |
| | | default: 1, |
| | | }, |
| | | // èæå表scrollåæ ·å¸§çï¼é»è®¤ä¸º60ï¼è¿é«å¯è½åºç°å¡é¡¿çé®é¢ |
| | | virtualScrollFps: { |
| | | type: [Number, String], |
| | | default: 60, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | firstLoaded: false, |
| | | }; |
| | | }, |
| | | watch: { |
| | | currentIndex: { |
| | | handler(newVal, oldVal) { |
| | | if (newVal === this.tabIndex) { |
| | | // æå è½½ï¼å½æ»å¨å°å½åçitemæ¶ï¼æå»å è½½ |
| | | if (!this.firstLoaded) { |
| | | this.$nextTick(() => { |
| | | let delay = 5; |
| | | // #ifdef MP-TOUTIAO |
| | | delay = 100; |
| | | // #endif |
| | | setTimeout(() => { |
| | | this.$refs.paging.reload().catch(() => {}); |
| | | }, delay); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | methods: { |
| | | reload(data) { |
| | | return this.$refs.paging.reload(data); |
| | | }, |
| | | complete(data) { |
| | | this.firstLoaded = true; |
| | | return this.$refs.paging.complete(data); |
| | | }, |
| | | _queryList(pageNo, pageSize, from) { |
| | | this.$emit("query", pageNo, pageSize, from); |
| | | }, |
| | | _updateList(list) { |
| | | this.$emit("updateList", list); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .zp-swiper-item-container { |
| | | /* #ifndef APP-NVUE */ |
| | | height: 100%; |
| | | /* #endif */ |
| | | /* #ifdef APP-NVUE */ |
| | | flex: 1; |
| | | /* #endif */ |
| | | } |
| | | .zp-swiper-item-container { |
| | | /* #ifndef APP-NVUE */ |
| | | height: 100%; |
| | | /* #endif */ |
| | | /* #ifdef APP-NVUE */ |
| | | flex: 1; |
| | | /* #endif */ |
| | | } |
| | | </style> |
| | |
| | | /** |
| | | * æå |
| | | */ |
| | | SUCCESS = "00000", |
| | | SUCCESS = 200, |
| | | /** |
| | | * é误 |
| | | */ |
| | |
| | | import "@/styles/global.scss"; |
| | | |
| | | import { setupStore } from "@/store"; |
| | | |
| | | export function createApp() { |
| | | const app = createSSRApp(App); |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export interface BaseResult<T> { |
| | | code: number; // ååºç |
| | | msg: string; // ååºä¿¡æ¯ |
| | | data?: T | any; // ååºåæ° |
| | | } |
| | | |
| | | export interface PageResult<T = any> { |
| | | total: number; // æ»æ° |
| | | records: Array<T>; // æ¥è¯¢æ°æ®å表 |
| | | size: number; // æ¯é¡µæ¾ç¤ºæ¡æ°ï¼é»è®¤ 10 |
| | | current: number; // å½å页 |
| | | pages: boolean; // æ¯å¦åå¨ä¸ä¸é¡µ |
| | | } |
| | |
| | | }; |
| | | |
| | | onReady(() => { |
| | | loadVisitStatsData(); |
| | | loadVisitTrendData(); |
| | | // loadVisitStatsData(); |
| | | // loadVisitTrendData(); |
| | | }); |
| | | </script> |
| | | |
| | |
| | | |
| | | // ç»å½è¡¨åæ°æ® |
| | | const loginFormData = ref<LoginFormData>({ |
| | | username: "admin", |
| | | password: "123456", |
| | | // username: "31601016", |
| | | username: "32308027", |
| | | password: "cxjt1234", |
| | | }); |
| | | |
| | | // è·åéå®ååæ° |
| | |
| | | .then(() => userStore.getInfo()) |
| | | .then(() => { |
| | | toast.success("ç»å½æå"); |
| | | |
| | | // æ£æ¥ç¨æ·ä¿¡æ¯æ¯å¦å®æ´ |
| | | if (!userStore.isUserInfoComplete()) { |
| | | // ä¿¡æ¯ä¸å®æ´ï¼è·³è½¬å°å®åä¿¡æ¯é¡µé¢ |
| | |
| | | <view class="flex justify-between w-full h-[20px]"> |
| | | <view class="text-[#646874] pl-1">{{ item.label }}</view> |
| | | <view class="font-medium pr-1" :style="{ color: item.color ?? color }"> |
| | | {{ item.value }} |
| | | {{ value[item.prop] }} |
| | | </view> |
| | | </view> |
| | | </wd-col> |
| | |
| | | return []; |
| | | }, |
| | | }, |
| | | value: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | }, |
| | | }, |
| | | color: { |
| | | type: String, |
| | | default: "#333333", |
| | |
| | | <template> |
| | | <view> |
| | | <ProductCard /> |
| | | <ProductCard :data="cardData" /> |
| | | <view class="mx-3"> |
| | | <wd-grid class="rounded-lg" clickable> |
| | | <wd-grid-item |
| | | icon="computer" |
| | | link-type="navigateTo" |
| | | url="/pages/production/twist/report/index" |
| | | :url="`/pages/production/twist/report/index?id=${paramsId}`" |
| | | text="æ¥å·¥" |
| | | /> |
| | | <!-- <wd-grid-item |
| | |
| | | <wd-grid-item |
| | | icon="wallet" |
| | | link-type="navigateTo" |
| | | url="/pages/production/twist/receive/index" |
| | | :url="`/pages/production/twist/receive/index?id=${paramsId}`" |
| | | text="ææé¢ç¨" |
| | | /> |
| | | </wd-grid> |
| | |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import { onLoad } from "@dcloudio/uni-app"; |
| | | import ProductCard from "@/components/product_card/index.vue"; |
| | | import TwistApi from "@/api/product/twist"; |
| | | |
| | | const paramsId = ref(); |
| | | const cardData = reactive({ |
| | | deviceModel: undefined, |
| | | model: undefined, |
| | | totalAmount: undefined, |
| | | amount: undefined, |
| | | unAmount: undefined, |
| | | }); |
| | | |
| | | const getDetailData = async (id: string) => { |
| | | const { data } = await TwistApi.getTwistDetailById({ |
| | | id: id, |
| | | }); |
| | | cardData.deviceModel = data.deviceModel; |
| | | cardData.model = data.model; |
| | | cardData.totalAmount = data.totalLength; |
| | | cardData.amount = data.length; |
| | | cardData.unAmount = data.unLength; |
| | | }; |
| | | |
| | | onLoad((options: any) => { |
| | | paramsId.value = options.id; |
| | | getDetailData(options.id); |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | |
| | | <template> |
| | | <view> |
| | | <ProductCard /> |
| | | <view class="pt-2"> |
| | | <ProductCard :data="cardData" /> |
| | | <view class="mx-3"> |
| | | <wd-grid class="rounded-lg" clickable> |
| | | <wd-grid-item |
| | | icon="computer" |
| | | link-type="navigateTo" |
| | | url="/pages/production/wire/report/wire" |
| | | :url="`/pages/production/wire/report/wire?id=${paramsId}`" |
| | | text="æ¥å·¥" |
| | | /> |
| | | <!-- <wd-grid-item |
| | |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import { onLoad } from "@dcloudio/uni-app"; |
| | | import ProductCard from "@/components/product_card/index.vue"; |
| | | import WireApi from "@/api/product/wire"; |
| | | |
| | | const paramsId = ref(); |
| | | const cardData = reactive({ |
| | | deviceModel: undefined, |
| | | model: undefined, |
| | | totalAmount: undefined, |
| | | amount: undefined, |
| | | unAmount: undefined, |
| | | }); |
| | | |
| | | const getDetailData = async (id: string) => { |
| | | const { data } = await WireApi.getWireDetailById({ |
| | | id: id, |
| | | }); |
| | | cardData.deviceModel = data.deviceModel; |
| | | cardData.model = data.model; |
| | | cardData.totalAmount = data.totalAmount; |
| | | cardData.amount = data.amount; |
| | | cardData.unAmount = data.unAmount; |
| | | }; |
| | | |
| | | onLoad((options: any) => { |
| | | paramsId.value = options.id; |
| | | getDetailData(options.id); |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | |
| | | </view> |
| | | </wd-col> |
| | | </wd-row> |
| | | <wd-tabs v-model="tab" :lineWidth="110"> |
| | | <block v-for="(item, index) in productList" :key="index" class="tab_bg"> |
| | | <wd-tab :title="item.label"> |
| | | <view class="card_box"> |
| | | <Statistics class="statistics_box" /> |
| | | <ProductCard v-for="(item, index) in 10" @click="toDetail(index)" /> |
| | | <wd-loadmore custom-class="loadmore" state="loading" /> |
| | | </view> |
| | | </wd-tab> |
| | | </block> |
| | | <wd-tabs v-model="tab" auto-line-width> |
| | | <wd-tab :title="`å¾
ç产(${total.wait})`" class="tab_bg"> |
| | | <ProductList :api="ManageApi.getProductList" state="å¾
宿" @ok="changeWait" /> |
| | | </wd-tab> |
| | | <wd-tab :title="`å·²ç产(${total.already})`" class="tab_bg"> |
| | | <ProductList :api="ManageApi.getProductList" state="已宿" @ok="changeAlready" /> |
| | | </wd-tab> |
| | | </wd-tabs> |
| | | </view> |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import ProductCard from "@/components/product_card/index.vue"; |
| | | import Statistics from "./components/Statistics.vue"; |
| | | import ManageApi from "@/api/product/manage"; |
| | | import { onMounted, ref } from "vue"; |
| | | import ProductList from "./list/index.vue"; |
| | | |
| | | const tab = ref<number>(0); |
| | | const total = reactive({ |
| | | wait: 0, |
| | | already: 0, |
| | | }); |
| | | |
| | | const productList = ref<any[]>([ |
| | | { |
| | | label: "å¾
ç产(10)", |
| | | }, |
| | | { |
| | | label: "å·²ç产(20)", |
| | | }, |
| | | ]); |
| | | |
| | | const toDetail = (type: number) => { |
| | | if (Math.floor(type) % 2 === 0) { |
| | | uni.navigateTo({ |
| | | url: "/pages/production/detail/wireDetail", |
| | | }); |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: "/pages/production/detail/twistDetail", |
| | | }); |
| | | } |
| | | const changeWait = (num: number) => { |
| | | total.wait = num; |
| | | }; |
| | | |
| | | const changeAlready = (num: number) => { |
| | | total.already = num; |
| | | }; |
| | | |
| | | onMounted(() => {}); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | border-bottom: 1px #dddddd solid; |
| | | } |
| | | .tab_bg { |
| | | background: linear-gradient(0, #ffffff 29%, #f3f9f8 100%); |
| | | background: #f3f9f8; |
| | | } |
| | | |
| | | .icon_box { |
| | |
| | | background: #e7f4ec99; |
| | | border-radius: 50%; |
| | | } |
| | | .card_box { |
| | | height: calc(100vh - 160px); |
| | | overflow: scroll; |
| | | } |
| | | |
| | | .statistics_box { |
| | | margin: 15px; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="card_box"> |
| | | <z-paging |
| | | ref="pagingRef" |
| | | v-model="list" |
| | | :fixed="false" |
| | | :auto-show-back-to-top="true" |
| | | @query="getList" |
| | | > |
| | | <template #top> |
| | | <Statistics class="statistics_box" /> |
| | | </template> |
| | | <ProductCard |
| | | v-for="(item, index) in list" |
| | | :key="index" |
| | | :data="item" |
| | | @click="toDetail(item.id, item.type)" |
| | | /> |
| | | </z-paging> |
| | | </view> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import Statistics from "../components/Statistics.vue"; |
| | | import ProductCard from "@/components/product_card/index.vue"; |
| | | import { useUserStore } from "@/store/modules/user"; |
| | | import zPaging from "@/components/z-paging/z-paging.vue"; |
| | | |
| | | const pagingRef = ref(); |
| | | const props = defineProps({ |
| | | api: { |
| | | type: Function, |
| | | default: () => {}, |
| | | }, |
| | | state: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | }); |
| | | |
| | | const emits = defineEmits(["ok"]); |
| | | const list = ref<any[]>([]); |
| | | |
| | | const toDetail = (id: number, type: string) => { |
| | | if (type == "æä¸") { |
| | | uni.navigateTo({ |
| | | url: `/pages/production/detail/wireDetail?id=${id}`, |
| | | }); |
| | | } else if (type == "ç»çº¿") { |
| | | uni.navigateTo({ |
| | | url: `/pages/production/detail/twistDetail?id=${id}`, |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | const getList = async (pageNo: number, pageSize: number) => { |
| | | const userStore = useUserStore(); |
| | | const userInfo: any = computed(() => userStore.userInfo); |
| | | const { code, data } = await props.api({ |
| | | userName: userInfo.value.user?.userName, |
| | | state: props.state, |
| | | current: pageNo, |
| | | size: pageSize, |
| | | }); |
| | | if (code == 200) { |
| | | if (data.total == 0) { |
| | | pagingRef.value.complete(true); |
| | | } else { |
| | | pagingRef.value.complete(data.records); |
| | | } |
| | | emits("ok", data.total); |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .card_box { |
| | | height: calc(100vh - 140px); |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="page"> |
| | | <CardTitle title="åä¸é¢ç¨" :hideAction="false"> |
| | | <template #action> |
| | | <wd-button type="icon" icon="scan" color="#0D867F" @click="openScan"></wd-button> |
| | | <view class="list_box"> |
| | | <z-paging |
| | | ref="pagingRef" |
| | | v-model="cardList" |
| | | :fixed="false" |
| | | :auto-show-back-to-top="true" |
| | | @query="getList" |
| | | > |
| | | <template #top> |
| | | <CardTitle title="åä¸é¢ç¨" :hideAction="false"> |
| | | <template #action> |
| | | <wd-button type="icon" icon="scan" color="#0D867F" @click="openScan"></wd-button> |
| | | </template> |
| | | </CardTitle> |
| | | </template> |
| | | </CardTitle> |
| | | <view class="list_box"> |
| | | <MonofilCard v-for="(item, index) in cardList" :key="index" /> |
| | | </view> |
| | | <Scan ref="scanRef" /> |
| | | </z-paging> |
| | | </view> |
| | | <Scan ref="scanRef" /> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | |
| | | import MonofilCard from "../components/MonofilCard.vue"; |
| | | import { onLoad, onUnload, onShow, onHide } from "@dcloudio/uni-app"; |
| | | import Scan from "@/components/scan/index.vue"; |
| | | import ManageApi from "@/api/product/manage"; |
| | | import zPaging from "@/components/z-paging/z-paging.vue"; |
| | | // import { useZebraScan } from "@/hooks/useZebraScan"; |
| | | |
| | | // const { init, start, stop, triggerScan } = useZebraScan(); |
| | | |
| | | const paramsId = ref(); |
| | | const pagingRef = ref(); |
| | | const scanRef = ref(); |
| | | const cardList = ref<any[]>([]); |
| | | |
| | |
| | | }; |
| | | |
| | | const openScan = () => { |
| | | // uni.scanCode({ |
| | | // onlyFromCamera: true, |
| | | // success: (res) => { |
| | | // console.log("æ¡ç ç±»åï¼" + res.scanType); |
| | | // console.log("æ¡ç å
容ï¼" + res.result); |
| | | // cardList.value.push(res.result); |
| | | // }, |
| | | // }); |
| | | // triggerScan(); |
| | | scanRef.value.triggerScan(); |
| | | }; |
| | | |
| | | onLoad(() => { |
| | | const getList = async () => { |
| | | const { code, data } = await ManageApi.getStrandedWireDish({ |
| | | wireId: paramsId.value, |
| | | type: "åä¸", |
| | | }); |
| | | if (code == 200) { |
| | | pagingRef.value.complete(data); |
| | | } |
| | | }; |
| | | |
| | | onLoad((options: any) => { |
| | | // å¼å¯å¹¿æçå¬äºä»¶ |
| | | uni.$on("scan", getScanCode); |
| | | // init(getScanCode); |
| | | paramsId.value = options.id; |
| | | }); |
| | | onUnload(() => { |
| | | // å¼å¯å¹¿æçå¬äºä»¶ |
| | | uni.$off("scan", getScanCode); |
| | | // stop(); |
| | | }); |
| | | |
| | | onShow(() => { |
| | | // start(); |
| | | }); |
| | | onShow(() => {}); |
| | | |
| | | onHide(() => { |
| | | // stop(); |
| | | }); |
| | | onHide(() => {}); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .page { |
| | | .list_box { |
| | | height: calc(100vh - 100px); |
| | | background: #f3f9f8; |
| | | .list_box { |
| | | height: calc(100% - 100px); |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | :deep(.wd-button__content) { |
| | | color: #0d867f; |
| | |
| | | <template> |
| | | <view class="page pt-2"> |
| | | <z-paging ref="paging" refresher-only class="list"> |
| | | <z-paging ref="pagingRef" v-model="twistReportList" class="list" @query="getTwistReportList"> |
| | | <template #top> |
| | | <CardTitle title="æ¥å·¥ä¿¡æ¯" :hideAction="true" :full="false" @action="addReport" /> |
| | | </template> |
| | | <wd-card v-for="(item, index) in 6" type="rectangle" custom-class="round"> |
| | | <wd-card v-for="(item, index) in twistReportList" type="rectangle" custom-class="round"> |
| | | <template #title> |
| | | <view class="flex justify-between"> |
| | | <view> |
| | |
| | | <view class="text-[#A8A8A8]" @click="toEdit">ç¼è¾</view> |
| | | </view> |
| | | </template> |
| | | <ProductionCard :data="cardAttr" /> |
| | | <ProductionCard :data="cardAttr" :value="item" /> |
| | | <template #footer> |
| | | <wd-button size="small" plain @click="toCheck">èªæ£</wd-button> |
| | | </template> |
| | | </wd-card> |
| | | <wd-loadmore custom-class="loadmore" state="loading" /> |
| | | </z-paging> |
| | | |
| | | <wd-popup v-model="dialog.visible" position="bottom" custom-class="yl-popup"> |
| | |
| | | import TwistForm from "./form.vue"; |
| | | import { useToast } from "wot-design-uni"; |
| | | import ProductionCard from "../../components/ProductionCard.vue"; |
| | | import { onLoad } from "@dcloudio/uni-app"; |
| | | import ManageApi from "@/api/product/manage"; |
| | | |
| | | const pagingRef = ref(); |
| | | const paramsId = ref(); |
| | | const toast = useToast(); |
| | | const dialog = reactive({ |
| | | visible: false, |
| | |
| | | |
| | | const cardAttr = ref<any[]>([ |
| | | { |
| | | label: "ååå·", |
| | | value: "ht2921246", |
| | | label: "é¢ç¨æå·", |
| | | prop: "poleNumber", |
| | | }, |
| | | { |
| | | label: "ç¶æ", |
| | | value: "-----", |
| | | label: "æé(kg)", |
| | | prop: "poleWeight", |
| | | }, |
| | | { |
| | | label: "客æ·åç§°", |
| | | value: "å¤å¿è±ª", |
| | | }, |
| | | { |
| | | label: "æºå°", |
| | | value: "-----", |
| | | label: "åä¸çå·", |
| | | prop: "monofilamentNumber", |
| | | }, |
| | | { |
| | | label: "è§æ ¼åå·", |
| | | value: "2921246", |
| | | }, |
| | | { |
| | | label: "å·²ç产æ°é", |
| | | value: "0", |
| | | prop: "model", |
| | | }, |
| | | { |
| | | label: "çé¿(m)", |
| | | value: "292", |
| | | prop: "ontLength", |
| | | }, |
| | | { |
| | | label: "è®¡åæ°é", |
| | | value: "100", |
| | | label: "ç论éé(kg)", |
| | | prop: "theoryWeight", |
| | | }, |
| | | { |
| | | label: "è´¨é追溯å·", |
| | | value: "JX-1838", |
| | | label: "å®é
éé(kg)", |
| | | prop: "actuallyWeight", |
| | | }, |
| | | ]); |
| | | |
| | | const twistReportList = ref<any[]>([]); |
| | | |
| | | const toEdit = () => { |
| | | uni.navigateTo({ |
| | |
| | | url: "/pages/production/twist/selfInspect/index", |
| | | }); |
| | | }; |
| | | |
| | | // è·åæä¸æ¥å·¥å表 |
| | | const getTwistReportList = async () => { |
| | | const { data } = await ManageApi.getReportList({ |
| | | wireId: paramsId.value, |
| | | type: "ç»çº¿", |
| | | }); |
| | | pagingRef.value.complete(data); |
| | | }; |
| | | |
| | | onLoad((options: any) => { |
| | | paramsId.value = options.id; |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | <template> |
| | | <view class="page pt-2"> |
| | | <z-paging ref="paging" refresher-only class="list"> |
| | | <z-paging ref="pagingRef" v-model="wireReportList" class="list" @query="getWireReportList"> |
| | | <template #top> |
| | | <CardTitle title="æ¥å·¥ä¿¡æ¯" :hideAction="true" :full="false" @action="addReport" /> |
| | | </template> |
| | | <wd-card v-for="(item, index) in 6" type="rectangle" custom-class="round"> |
| | | <wd-card |
| | | v-for="(item, index) in wireReportList" |
| | | :key="index" |
| | | type="rectangle" |
| | | custom-class="round" |
| | | > |
| | | <template #title> |
| | | <view class="flex justify-between"> |
| | | <view> |
| | | <wd-icon name="user" color="#0D867F"></wd-icon> |
| | | <text class="text-[#0D867F] ml-2 font-medium">ç产人</text> |
| | | <text class="text-[#333333] ml-2">æ¹å
ç</text> |
| | | <text class="text-[#333333] ml-2">{{ item.productUser }}</text> |
| | | </view> |
| | | <view class="text-[#A8A8A8]" @click="toEdit">ç¼è¾</view> |
| | | </view> |
| | | </template> |
| | | <ProductionCard :data="cardAttr" /> |
| | | <ProductionCard :data="cardAttr" :value="item" /> |
| | | <template #footer> |
| | | <wd-button size="small" plain @click="toCheck">èªæ£</wd-button> |
| | | <wd-button size="small" plain @click="toCheck(item.id)">èªæ£</wd-button> |
| | | </template> |
| | | </wd-card> |
| | | <wd-loadmore custom-class="loadmore" state="loading" /> |
| | | </z-paging> |
| | | |
| | | <wd-popup v-model="dialog.visible" position="bottom" custom-class="yl-popup"> |
| | |
| | | <wd-button type="text" @click="cancel">åæ¶</wd-button> |
| | | <wd-button type="text" @click="submit">ç¡®å®</wd-button> |
| | | </view> |
| | | <WireForm /> |
| | | <WireForm ref="wireFormRef" /> |
| | | </wd-popup> |
| | | <wd-toast /> |
| | | </view> |
| | |
| | | import { useToast } from "wot-design-uni"; |
| | | import ProductionCard from "../../components/ProductionCard.vue"; |
| | | import zPaging from "@/components/z-paging/z-paging.vue"; |
| | | import { onLoad } from "@dcloudio/uni-app"; |
| | | import ManageApi from "@/api/product/manage"; |
| | | import WireApi from "@/api/product/wire"; |
| | | |
| | | const pagingRef = ref(); |
| | | const wireFormRef = ref(); |
| | | const paramsId = ref(); |
| | | const toast = useToast(); |
| | | const dialog = reactive({ |
| | | visible: false, |
| | |
| | | |
| | | const cardAttr = ref<any[]>([ |
| | | { |
| | | label: "ååå·", |
| | | value: "ht2921246", |
| | | label: "é¢ç¨æå·", |
| | | prop: "poleNumber", |
| | | }, |
| | | { |
| | | label: "ç¶æ", |
| | | value: "-----", |
| | | label: "æé(kg)", |
| | | prop: "poleWeight", |
| | | }, |
| | | { |
| | | label: "客æ·åç§°", |
| | | value: "å¤å¿è±ª", |
| | | }, |
| | | { |
| | | label: "æºå°", |
| | | value: "-----", |
| | | label: "åä¸çå·", |
| | | prop: "monofilamentNumber", |
| | | }, |
| | | { |
| | | label: "è§æ ¼åå·", |
| | | value: "2921246", |
| | | }, |
| | | { |
| | | label: "å·²ç产æ°é", |
| | | value: "0", |
| | | prop: "model", |
| | | }, |
| | | { |
| | | label: "çé¿(m)", |
| | | value: "292", |
| | | prop: "ontLength", |
| | | }, |
| | | { |
| | | label: "è®¡åæ°é", |
| | | value: "100", |
| | | label: "ç论éé(kg)", |
| | | prop: "theoryWeight", |
| | | }, |
| | | { |
| | | label: "å®é
éé(kg)", |
| | | prop: "actuallyWeight", |
| | | }, |
| | | ]); |
| | | |
| | | const wireReportList = ref<any[]>([]); |
| | | |
| | | const toEdit = () => { |
| | | uni.navigateTo({ |
| | |
| | | dialog.visible = true; |
| | | }; |
| | | |
| | | const submit = () => { |
| | | const submit = async () => { |
| | | toast.show("æäº¤"); |
| | | dialog.visible = false; |
| | | await WireApi.addWireOutput({ |
| | | wireId: paramsId.value, |
| | | type: "æä¸", |
| | | ...wireFormRef.value.model, |
| | | }); |
| | | }; |
| | | |
| | | const cancel = () => { |
| | |
| | | dialog.visible = false; |
| | | }; |
| | | |
| | | const toCheck = () => { |
| | | const toCheck = (id: number) => { |
| | | uni.navigateTo({ |
| | | url: "/pages/production/wire/selfInspect/index", |
| | | url: `/pages/production/wire/selfInspect/index?id=${id}`, |
| | | }); |
| | | }; |
| | | |
| | | // è·åæä¸æ¥å·¥å表 |
| | | const getWireReportList = async () => { |
| | | const { data } = await ManageApi.getReportList({ |
| | | wireId: paramsId.value, |
| | | type: "æä¸", |
| | | }); |
| | | pagingRef.value.complete(data); |
| | | }; |
| | | |
| | | onLoad((options: any) => { |
| | | paramsId.value = options.id; |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | <wd-form ref="form" :model="model" class="relative form_box"> |
| | | <wd-cell-group :border="true"> |
| | | <wd-input |
| | | v-model="model.contractNo" |
| | | label="ååå·" |
| | | v-model="model.poleNumber" |
| | | label="é¢ç¨æå·" |
| | | label-width="100px" |
| | | prop="contractNo" |
| | | prop="poleNumber" |
| | | clearable |
| | | placeholder="请è¾å
¥ååå·" |
| | | placeholder="请è¾å
¥é¢ç¨æå·" |
| | | /> |
| | | <wd-input |
| | | v-model="model.clientName" |
| | | label="客æ·åç§°" |
| | | v-model="model.poleWeight" |
| | | label="æé" |
| | | label-width="100px" |
| | | prop="clientName" |
| | | prop="poleWeight" |
| | | clearable |
| | | placeholder="请è¾å
¥å®¢æ·åç§°" |
| | | placeholder="请è¾å
¥æé" |
| | | /> |
| | | <wd-input |
| | | v-model="model.workbench" |
| | | label="æºå°" |
| | | v-model="model.monofilamentNumber" |
| | | label="åä¸çå·" |
| | | label-width="100px" |
| | | prop="workbench" |
| | | prop="monofilamentNumber" |
| | | clearable |
| | | placeholder="请è¾å
¥æºå°" |
| | | /> |
| | | <wd-input |
| | | v-model="model.monofilNo" |
| | | label="åä½ç¼å·" |
| | | v-model="model.model" |
| | | label="è§æ ¼åå·" |
| | | label-width="100px" |
| | | prop="monofilNo" |
| | | prop="model" |
| | | clearable |
| | | placeholder="请è¾å
¥åä½ç¼å·" |
| | | placeholder="请è¾å
¥è§æ ¼åå·" |
| | | /> |
| | | <wd-input |
| | | v-model="model.specification" |
| | | label="è§æ ¼" |
| | | v-model="model.ontLength" |
| | | label="çé¿" |
| | | label-width="100px" |
| | | prop="specification" |
| | | prop="ontLength" |
| | | clearable |
| | | placeholder="请è¾å
¥è§æ ¼" |
| | | placeholder="请è¾å
¥çé¿" |
| | | /> |
| | | <wd-input |
| | | v-model="model.singleDisc" |
| | | label="åä¸çé¿" |
| | | v-model="model.theoryWeight" |
| | | label="ç论éé" |
| | | label-width="100px" |
| | | prop="singleDisc" |
| | | prop="theoryWeight" |
| | | clearable |
| | | placeholder="请è¾å
¥åä¸çé¿" |
| | | placeholder="请è¾å
¥ç论éé" |
| | | /> |
| | | <wd-input |
| | | v-model="model.actuallyWeight" |
| | | label="å®é
éé" |
| | | label-width="100px" |
| | | prop="actuallyWeight" |
| | | clearable |
| | | placeholder="请è¾å
¥å®é
éé" |
| | | /> |
| | | </wd-cell-group> |
| | | </wd-form> |
| | |
| | | import useFormData from "@/hooks/useFormData"; |
| | | |
| | | const { form: model } = useFormData({ |
| | | contractNo: undefined, // ååå· |
| | | clientName: undefined, // 客æ·åç§° |
| | | workbench: undefined, // æºå° |
| | | monofilNo: undefined, // åä½ç¼å· |
| | | specification: undefined, // è§æ ¼ |
| | | poleNumber: undefined, // é¢ç¨æå· |
| | | poleWeight: undefined, // 客æ·åç§° |
| | | monofilamentNumber: undefined, // åä¸çå· |
| | | model: undefined, // è§æ ¼åå· |
| | | ontLength: undefined, // çé¿ |
| | | singleDisc: undefined, // åä¸çé¿ |
| | | }); |
| | | |
| | | defineExpose({ |
| | | model, |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | const login = (data: LoginFormData) => { |
| | | return new Promise((resolve, reject) => { |
| | | AuthAPI.login(data) |
| | | .then((data) => { |
| | | setToken(data.accessToken); |
| | | resolve(data); |
| | | .then((data: any) => { |
| | | setToken(data.data.token); |
| | | resolve(data.data); |
| | | }) |
| | | .catch((error) => { |
| | | console.error("ç»å½å¤±è´¥", error); |
| | |
| | | const getInfo = () => { |
| | | return new Promise((resolve, reject) => { |
| | | UserAPI.getUserInfo() |
| | | .then((data) => { |
| | | setUserInfo(data); |
| | | userInfo.value = data; |
| | | resolve(data); |
| | | .then((data: any) => { |
| | | setUserInfo(data.data); |
| | | userInfo.value = data.data.user; |
| | | resolve(data.data); |
| | | }) |
| | | .catch((error) => { |
| | | console.error("è·åç¨æ·ä¿¡æ¯å¤±è´¥", error); |
| | |
| | | const isUserInfoComplete = (): boolean => { |
| | | if (!userInfo.value) return false; |
| | | |
| | | return !!(userInfo.value.nickname && userInfo.value.avatar); |
| | | // return !!(userInfo.value.nickName && userInfo.value.avatar); |
| | | return !!userInfo.value.nickName; |
| | | }; |
| | | |
| | | return { |
| | |
| | | * ååºæ°æ® |
| | | */ |
| | | interface ResponseData<T = any> { |
| | | code: string; |
| | | code: number | string; |
| | | data: T; |
| | | msg: string; |
| | | } |
| | |
| | | // #ifdef H5 |
| | | baseApi = import.meta.env.VITE_APP_BASE_API; |
| | | // #endif |
| | | |
| | | return new Promise((resolve, reject) => { |
| | | return new Promise((resolve: any, reject: any) => { |
| | | uni.request({ |
| | | ...options, |
| | | url: `${baseApi}${options.url}`, |
| | |
| | | |
| | | // ä¸å¡ç¶æç 00000 表示æå |
| | | if (resData.code === ResultCodeEnum.SUCCESS) { |
| | | resolve(resData.data); |
| | | resolve(resData); |
| | | } |
| | | // 令ç失ææè¿æå¤ç |
| | | else if (resData.code === ResultCodeEnum.TOKEN_INVALID) { |