| | |
| | | const routes = [ |
| | | { |
| | | path: "/pages/login/login", |
| | | name: 'login', |
| | | meta: { |
| | | title: 'ç»å½', |
| | | }, |
| | | const routes = [{ |
| | | path: "/pages/login/login", |
| | | name: 'login', |
| | | meta: { |
| | | title: 'ç»å½', |
| | | }, |
| | | }, |
| | | { |
| | | path: "/pages/login/loginOauth2", |
| | |
| | | }, |
| | | }, |
| | | { |
| | | //注æï¼pathå¿
é¡»è·pages.jsonä¸çå°å对åºï¼æåé¢å«å¿äºå '/'å¦ |
| | | path: '/pages/index/index', |
| | | name: 'index', |
| | | meta: { |
| | | title: '主页', |
| | | }, |
| | | }, |
| | | { |
| | | //注æï¼pathå¿
é¡»è·pages.jsonä¸çå°å对åºï¼æåé¢å«å¿äºå '/'å¦ |
| | | path: '/pages/home/home', |
| | | aliasPath:'/', //对äºh5ç«¯ä½ å¿
é¡»å¨é¦é¡µå ä¸aliasPath并设置为/ |
| | | name: 'home', |
| | | meta: { |
| | | title: 'é¦é¡µ', |
| | | }, |
| | | //注æï¼pathå¿
é¡»è·pages.jsonä¸çå°å对åºï¼æåé¢å«å¿äºå '/'å¦ |
| | | path: '/pages/index/index', |
| | | name: 'index', |
| | | meta: { |
| | | title: '主页', |
| | | }, |
| | | }, |
| | | { |
| | | //注æï¼pathå¿
é¡»è·pages.jsonä¸çå°å对åºï¼æåé¢å«å¿äºå '/'å¦ |
| | | path: '/pages/device/device', |
| | | //aliasPath:'/', //对äºh5ç«¯ä½ å¿
é¡»å¨é¦é¡µå ä¸aliasPath并设置为/ |
| | | name: 'device', |
| | | meta: { |
| | | title: '设å¤', |
| | | }, |
| | | }, |
| | | |
| | | |
| | | { |
| | | //注æï¼pathå¿
é¡»è·pages.jsonä¸çå°å对åºï¼æåé¢å«å¿äºå '/'å¦ |
| | | path: '/pages/spare/spare', |
| | | //aliasPath:'/', //对äºh5ç«¯ä½ å¿
é¡»å¨é¦é¡µå ä¸aliasPath并设置为/ |
| | | name: 'spare', |
| | | meta: { |
| | | title: 'å¤ä»¶', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/user/people', |
| | | name: 'people', |
| | | meta: { |
| | | title: '个人ä¸å¿', |
| | | }, |
| | | //注æï¼pathå¿
é¡»è·pages.jsonä¸çå°å对åºï¼æåé¢å«å¿äºå '/'å¦ |
| | | path: '/pages/home/home', |
| | | aliasPath: '/', //对äºh5ç«¯ä½ å¿
é¡»å¨é¦é¡µå ä¸aliasPath并设置为/ |
| | | name: 'home', |
| | | meta: { |
| | | title: 'é¦é¡µ', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/user/userdetail', |
| | | name: 'userdetail', |
| | | meta: { |
| | | title: '个人详æ
', |
| | | }, |
| | | //注æï¼pathå¿
é¡»è·pages.jsonä¸çå°å对åºï¼æåé¢å«å¿äºå '/'å¦ |
| | | path: '/pages/device/device', |
| | | //aliasPath:'/', //对äºh5ç«¯ä½ å¿
é¡»å¨é¦é¡µå ä¸aliasPath并设置为/ |
| | | name: 'device', |
| | | meta: { |
| | | title: '设å¤', |
| | | }, |
| | | }, |
| | | |
| | | |
| | | { |
| | | //注æï¼pathå¿
é¡»è·pages.jsonä¸çå°å对åºï¼æåé¢å«å¿äºå '/'å¦ |
| | | path: '/pages/spare/spare', |
| | | //aliasPath:'/', //对äºh5ç«¯ä½ å¿
é¡»å¨é¦é¡µå ä¸aliasPath并设置为/ |
| | | name: 'spare', |
| | | meta: { |
| | | title: 'å¤ä»¶', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/user/useredit', |
| | | name: 'useredit', |
| | | meta: { |
| | | title: '个人ç¼è¾', |
| | | }, |
| | | path: '/pages/user/people', |
| | | name: 'people', |
| | | meta: { |
| | | title: '个人ä¸å¿', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/user/userexit', |
| | | name: 'userexit', |
| | | meta: { |
| | | title: 'éåº', |
| | | }, |
| | | path: '/pages/user/userdetail', |
| | | name: 'userdetail', |
| | | meta: { |
| | | title: '个人详æ
', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/user/location', |
| | | name: 'location', |
| | | meta: { |
| | | title: 'å®ä½', |
| | | }, |
| | | path: '/pages/user/useredit', |
| | | name: 'useredit', |
| | | meta: { |
| | | title: '个人ç¼è¾', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/common/exit', |
| | | name: 'exit', |
| | | meta: { |
| | | title: 'éåº', |
| | | }, |
| | | path: '/pages/user/userexit', |
| | | name: 'userexit', |
| | | meta: { |
| | | title: 'éåº', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/common/success', |
| | | name: 'success', |
| | | meta: { |
| | | title: 'success', |
| | | }, |
| | | },{ |
| | | path: '/pages/addressbook/address-book', |
| | | name: 'addressBook', |
| | | meta: { |
| | | title: 'addressBook', |
| | | }, |
| | | path: '/pages/user/location', |
| | | name: 'location', |
| | | meta: { |
| | | title: 'å®ä½', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/addressbook/level-address-book', |
| | | name: 'levelAddressBook', |
| | | meta: { |
| | | title: 'levelAddressBook', |
| | | }, |
| | | path: '/pages/common/exit', |
| | | name: 'exit', |
| | | meta: { |
| | | title: 'éåº', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/addressbook/member', |
| | | name: 'member', |
| | | meta: { |
| | | title: 'member', |
| | | }, |
| | | path: '/pages/common/success', |
| | | name: 'success', |
| | | meta: { |
| | | title: 'success', |
| | | }, |
| | | }, { |
| | | path: '/pages/addressbook/address-book', |
| | | name: 'addressBook', |
| | | meta: { |
| | | title: 'addressBook', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/addressbook/address-detail', |
| | | name: 'addressDetail', |
| | | meta: { |
| | | title: 'addressDetail', |
| | | }, |
| | | path: '/pages/addressbook/level-address-book', |
| | | name: 'levelAddressBook', |
| | | meta: { |
| | | title: 'levelAddressBook', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/annotation/annotationList', |
| | | name: 'annotationList', |
| | | meta: { |
| | | title: 'éç¥å
Œ', |
| | | }, |
| | | path: '/pages/addressbook/member', |
| | | name: 'member', |
| | | meta: { |
| | | title: 'member', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/device/deviceDeils/deviceDeils', |
| | | name: 'deviceDeils', |
| | | meta: { |
| | | title: '设å¤è¯¦æ
', |
| | | }, |
| | | path: '/pages/addressbook/address-detail', |
| | | name: 'addressDetail', |
| | | meta: { |
| | | title: 'addressDetail', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/device/deviceWebDeils/deviceWebDeils', |
| | | name: 'deviceWebDeils', |
| | | meta: { |
| | | title: '设å¤è¯¦æ
', |
| | | }, |
| | | }, |
| | | |
| | | |
| | | { |
| | | path: '/pages/TaskManager/TaskManagerList', |
| | | name: 'TaskManagerList', |
| | | meta: { |
| | | title: 'å·²å', |
| | | }, |
| | | path: '/pages/annotation/annotationList', |
| | | name: 'annotationList', |
| | | meta: { |
| | | title: 'éç¥å
Œ', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/ToDoList/ToDoList', |
| | | name: 'ToDoList', |
| | | meta: { |
| | | title: 'å¾
å', |
| | | }, |
| | | }, |
| | | |
| | | { |
| | | path: '/pages/annotation/annotationDetail', |
| | | name: 'annotationDetail', |
| | | meta: { |
| | | title: 'éç¥è¯¦æ
', |
| | | }, |
| | | path: '/pages/device/deviceDeils/deviceDeils', |
| | | name: 'deviceDeils', |
| | | meta: { |
| | | title: '设å¤è¯¦æ
', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/common/helloWorld', |
| | | name: 'helloWorld', |
| | | meta: { |
| | | title: 'helloWorld', |
| | | }, |
| | | path: '/pages/device/deviceWebDeils/deviceWebDeils', |
| | | name: 'deviceWebDeils', |
| | | meta: { |
| | | title: '设å¤è¯¦æ
', |
| | | }, |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | path: '/pages/TaskManager/TaskManagerList', |
| | | name: 'TaskManagerList', |
| | | meta: { |
| | | title: 'å·²å', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/ToDoList/ToDoList', |
| | | name: 'ToDoList', |
| | | meta: { |
| | | title: 'å¾
å', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/TaskManager/TaskManagerDeils/TaskManagerDeils', |
| | | name: 'TaskManagerDeils', |
| | | meta: { |
| | | title: 'å·²å详æ
', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/ToDoList/ToDoListDeils/ToDoListDeils', |
| | | name: 'ToDoListDeils', |
| | | meta: { |
| | | title: 'å¾
å详æ
', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/annotation/annotationDetail', |
| | | name: 'annotationDetail', |
| | | meta: { |
| | | title: 'éç¥è¯¦æ
', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/common/helloWorld', |
| | | name: 'helloWorld', |
| | | meta: { |
| | | title: 'helloWorld', |
| | | }, |
| | | }, |
| | | |
| | | |
| | | ] |
| | | export default routes |
| | |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/TaskManager/TaskManagerDeils/TaskManagerDeils", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/ToDoList/ToDoListDeils/ToDoListDeils", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | } |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <block slot="backText">è¿å</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"> |
| | | <view class="text-gray margin-bottom-lg">ââââââââââ åºæ¬ä¿¡æ¯ ââââââââââ</view> |
| | | <uni-forms-item name="num" label="å·¥åå·:"> |
| | | <uni-easyinput v-model="formData.equipmentCode" :disabled="true" /> |
| | | </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> |
| | | <uni-forms-item name="outNum" label="ä¿å
»å¨æ:"> |
| | | <uni-easyinput v-model="formData.equipmentSpecification" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="outNum" label="夿³¨:"> |
| | | <uni-easyinput v-model="formData.equipmentSpecification" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="outNum" label="ä¿å
»å¾ç:"> |
| | | <view class="grid col-4 grid-square flex-sub"> |
| | | <view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" |
| | | :data-url="imgList[index]"> |
| | | <image :src="imgList[index]" mode="aspectFill"></image> |
| | | <view class="cu-tag bg-red radius" @tap.stop="DelImg" :data-index="index"> |
| | | <text class='cuIcon-close'></text> |
| | | </view> |
| | | </view> |
| | | <view class="solids" @tap="ChooseImage" v-if="imgList.length<1"> |
| | | <text class='cuIcon-cameraadd'></text> |
| | | </view> |
| | | </view> |
| | | |
| | | </uni-forms-item> |
| | | <view class="text-gray margin-bottom-lg">ââââââââââ çç»é¿ç¡®è®¤ ââââââââââ</view> |
| | | <uni-forms-item name="outNum" required label="确认类å:"> |
| | | <uni-data-select :localdata="formData.msListCategory" popup-title="è¯·éæ©" @change="changeType" |
| | | :clear="false"> |
| | | </uni-data-select> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="outNum" required label="确认æè§:"> |
| | | <uni-easyinput type="textarea" v-model="formData.ttitle" placeholder="请è¾å
¥å
容"></uni-easyinput> |
| | | </uni-forms-item> |
| | | |
| | | </uni-group> |
| | | </uni-forms> |
| | | <view class="text-gray margin-bottom-lg">ââââââââââ ä¿å
»é¡¹ä¿¡æ¯ ââââââââââ</view> |
| | | <uni-card margin="10px" spacing="1px" v-for="(item,index) in partTakeAdviceDetailList" :key="index"> |
| | | |
| | | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">è¡å·:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right">{{index+1}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">ä¿å
»é¡¹:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-bold radius text-right"> |
| | | {{item.title}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">åä¿å
»é¡¹:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right" |
| | | v-if="item.small!=null && item.small.length>10"> |
| | | {{(item.small).toString().substr(0,10)+'...'}} |
| | | </view> |
| | | |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right" v-else> |
| | | {{item.small}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">ä¿å
»è¦æ±:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right" |
| | | v-if="item.yaoqiu!=null && item.yaoqiu.length>10"> |
| | | {{(item.yaoqiu).toString().substr(0,10)+'...'}} |
| | | </view> |
| | | |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right" v-else> |
| | | {{item.yaoqiu}} |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">ä¿å
ȍȾ:</view> |
| | | <view class="flex-sub bg-white padding-xs text-right margin-xs radius"> |
| | | <uni-data-select :localdata="item.restle" :clear="true" /> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">å¼å¸¸æè¿°:</view> |
| | | <view class="flex-sub bg-white padding-xs text-right margin-xs radius"> |
| | | <uni-easyinput v-model="item.desc" :disabled="true" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">æ¯å¦æ¥ä¿®:</view> |
| | | <view class="flex-sub bg-white padding-xs text-right margin-xs radius"> |
| | | <uni-data-select :localdata="item.type" /> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | </uni-card> |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js"; |
| | | export default { |
| | | mixins: [MescrollMixin], // 使ç¨mixin |
| | | data() { |
| | | return { |
| | | scrollLeft: 0, |
| | | searchValue: '', |
| | | imgList: [], |
| | | uploadUrl: "/sys/common/upload", |
| | | formData: {}, |
| | | partTakeAdviceDetailList: [{ |
| | | title: "æºåºç©ºæ°è¿æ»¤", |
| | | small: "å¤å£³å管路", |
| | | yaoqiu: "è¿æ»¤ç½,è¿æ»¤æ£å®å¥½ï¼æ æ²¹", |
| | | restle: [{ |
| | | text: "æ£å¸¸", |
| | | value: 0 |
| | | }, |
| | | { |
| | | text: "å¼å¸¸", |
| | | value: 1 |
| | | } |
| | | ] |
| | | |
| | | }], |
| | | NavBarColor: this.NavBarColor, |
| | | url: { |
| | | stallList: "/eam/equipment/queryById" |
| | | }, |
| | | id: '', |
| | | upOption: { |
| | | page: { |
| | | num: 0, // å½å页ç ,é»è®¤0,åè°ä¹åä¼å 1,å³callback(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 style = `height:${CustomBar}px;padding-top:${StatusBar}px;`; |
| | | return style |
| | | }, |
| | | }, |
| | | |
| | | |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | onLoad: function(option) { |
| | | const annItem = JSON.parse(decodeURIComponent(option.item)); |
| | | this.id = annItem.id |
| | | }, |
| | | created() { |
| | | this.upCallback() |
| | | }, |
| | | methods: { |
| | | ChooseImage() { |
| | | var that = this; |
| | | uni.chooseImage({ |
| | | count: 4, //é»è®¤9 |
| | | sizeType: ['original', 'compressed'], //å¯ä»¥æå®æ¯åå¾è¿æ¯å缩å¾ï¼é»è®¤äºè
齿 |
| | | sourceType: ['album'], //ä»ç¸åéæ© |
| | | success: (res) => { |
| | | that.$http.upload(that.uploadUrl, { |
| | | filePath: res.tempFilePaths[0], |
| | | name: 'file' |
| | | }) |
| | | .then(res => { |
| | | that.myFormData.avatar = res.data.message; |
| | | }) |
| | | .catch(err => { |
| | | that.$tip.error(err.data.message) |
| | | }); |
| | | this.imgList = res.tempFilePaths |
| | | } |
| | | }); |
| | | }, |
| | | ViewImage(e) { |
| | | uni.previewImage({ |
| | | urls: this.imgList, |
| | | current: e.currentTarget.dataset.url |
| | | }); |
| | | }, |
| | | DelImg(e) { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'ç¡®å®è¦å é¤è¿æ®µåå¿åï¼', |
| | | cancelText: 'åçç', |
| | | confirmText: 'åè§', |
| | | success: res => { |
| | | if (res.confirm) { |
| | | this.imgList.splice(e.currentTarget.dataset.index, 1) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | upCallback() { |
| | | 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> |
| | | .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> |
| | |
| | | </view> |
| | | |
| | | <view class="container"> |
| | | |
| | | |
| | | <mescroll-uni ref="mescrollRef" @init="mescrollInit" :top="top" @down="downCallback" @up="upCallback"> |
| | | <!-- å表信æ¯å¼å§ --> |
| | | <view class="content"> |
| | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">æµç¨åç§°:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-bold radius text-right"> |
| | | {{item.partName}} |
| | | {{item.procDefName}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">æµç¨æè¿°:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.taskType}} |
| | | {{item.description}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">æµç¨å起人:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-blue radius text-right"> |
| | | {{item.priority}} |
| | | {{item.startUserName}} |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">ä»»å¡åç§°:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.taskDesc}} |
| | | {{item.taskName}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | |
| | | data() { |
| | | return { |
| | | type: 'top', |
| | | scrollLeft:0, |
| | | scrollLeft: 0, |
| | | formData: { |
| | | num: '', |
| | | partNumNameModel: '' |
| | |
| | | colorIndex: 0, |
| | | activeColor: '#5277A6', |
| | | url: { |
| | | |
| | | stallList: "/assign/flow/finishedList" |
| | | stallList: "assign/flow/finishedList" |
| | | }, |
| | | |
| | | upOption: { |
| | |
| | | color: '#2979FF', |
| | | borderColor: '#2979FF' |
| | | }, |
| | | msgList: [{ |
| | | partName: "设å¤A", |
| | | taskType: "ç»´æ¤", |
| | | taskDesc: "å®ææ£æ¥", |
| | | priority: "é«", |
| | | dueaDate: "2023-10-10", |
| | | ssignee: "å¼ ä¸", |
| | | status: 1 |
| | | }], //åè¡¨æ°æ® |
| | | msgList: [], //åè¡¨æ°æ® |
| | | announcement1: [], |
| | | msg1Count: 0, |
| | | msg2Count: 0, |
| | |
| | | |
| | | created() {}, |
| | | methods: { |
| | | |
| | | |
| | | /** |
| | | * @param {Object} item |
| | | * 详æ
é¡µé¢ |
| | | */ |
| | | // onClickProductionTask(item) { |
| | | // let keyword = this.TabCur |
| | | // uni.navigateTo({ |
| | | // url: '/pages/mes/om/workSheetOpToolingBorrowDeils/workSheetOpToolingBorrowDeils?keyword=' + keyword |
| | | // }) |
| | | onClickProductionTask(item) { |
| | | uni.navigateTo({ |
| | | url: '/pages/TaskManager/TaskManagerDeils/TaskManagerDeils?item=' + |
| | | encodeURIComponent(JSON.stringify(item)) |
| | | |
| | | // }, |
| | | |
| | | }) |
| | | |
| | | }, |
| | | |
| | | search() { |
| | | this.$refs.popup.open(); |
| | | }, |
| | | |
| | | |
| | | // upCallback(page) { |
| | | // let keyword = this.TabCur |
| | | // if (keyword == 0) { |
| | | |
| | | // this.$http.get(this.url.stallList, { |
| | | // params: { |
| | | // pageNo: page.num, |
| | | // pageSize: page.size, |
| | | // order: 'asc', |
| | | // column: 'createTime', |
| | | // status: 1 |
| | | // }, |
| | | upCallback(page) { |
| | | this.$http.get(this.url.stallList, { |
| | | params: { |
| | | pageNo: page.num, |
| | | pageSize: page.size |
| | | }, |
| | | |
| | | // }).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); //è¿½å æ°æ°æ® |
| | | // } |
| | | }).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(); |
| | | // }) |
| | | // } else if (keyword == 1) { |
| | | |
| | | // this.$http.get(this.url.stallList, { |
| | | // params: { |
| | | // pageNo: page.num, |
| | | // pageSize: page.size, |
| | | // order: 'desc', |
| | | // status: 3, |
| | | // column: 'createTime' |
| | | // }, |
| | | |
| | | // }).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.msg2Count = 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(); |
| | | // }) |
| | | |
| | | // } |
| | | |
| | | |
| | | // }, |
| | | }).catch(() => { |
| | | //èç½å¤±è´¥, ç»æå è½½ |
| | | this.mescroll.endErr(); |
| | | }) |
| | | }, |
| | | |
| | | |
| | | resetTask() { |
| | |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | .is-hover { |
| | | color: rgba(255, 255, 255, 0.6); |
| | | background-color: #55aaff; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | .content { |
| | | margin-top: 5px; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <block slot="backText">è¿å</block> |
| | | <block slot="content">å¾
å</block> |
| | | </cu-custom> |
| | | |
| | | <view style="width: 100%;"> |
| | | <uni-popup ref="popup" background-color="#fff" :type="type"> |
| | | <view class="popupView"> |
| | | <!-- åºç¡è¡¨åæ ¡éª --> |
| | | <uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext"> |
| | | <uni-group title="" top="0"> |
| | | <uni-forms-item name="numbers" label="颿ç³è¯·åå·:"> |
| | | <uni-easyinput type="text" v-model="formData.num" placeholder="请è¾å
¥é¢æç³è¯·åå·æ£ç´¢" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="name" label="é¢æäº§å:"> |
| | | <uni-easyinput v-model="formData.partNumNameModel" placeholder="请è¾å
¥é¢æäº§å" /> |
| | | </uni-forms-item> |
| | | </uni-group> |
| | | </uni-forms> |
| | | <view class="flex"> |
| | | |
| | | <view |
| | | class="cuIcon-search flex-sub bg-blue padding-sm margin-xs margin-left-lg margin-right-lg text-sm text-center" |
| | | @click="getSera">æ¥è¯¢ |
| | | </view> |
| | | <view |
| | | class="cuIcon-refresh flex-sub bg-white solids padding-sm margin-xs radius text-sm text-center margin-left-lg margin-right-lg" |
| | | @click="resetTask">éç½®</view> |
| | | </view> |
| | | |
| | | </view> |
| | | </uni-popup> |
| | | </view> |
| | | |
| | | <view class="container"> |
| | | |
| | | <mescroll-uni ref="mescrollRef" @init="mescrollInit" :top="top" @down="downCallback" @up="upCallback"> |
| | | <!-- å表信æ¯å¼å§ --> |
| | | <view class="content"> |
| | | <uni-card margin="10px" spacing="1px" v-for="(item,index) in msgList" :key="index" |
| | | @click="onClickProductionTask(item)"> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">æµç¨åç§°:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-bold radius text-right"> |
| | | {{item.flowName}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">æµç¨æè¿°:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.title}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">ä¹åå¤ç人:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-blue radius text-right"> |
| | | {{item.preNodeAssignee_dictText}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">å驱èç¹:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-blue radius text-right"> |
| | | {{item.preNode}} |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">å½åèç¹:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.name}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | |
| | | </mescroll-uni> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js"; |
| | | export default { |
| | | mixins: [MescrollMixin], // 使ç¨mixin |
| | | data() { |
| | | return { |
| | | type: 'top', |
| | | scrollLeft:0, |
| | | formData: { |
| | | num: '', |
| | | partNumNameModel: '' |
| | | }, |
| | | NavBarColor: this.NavBarColor, |
| | | activeColor: '#5277A6', |
| | | url: { |
| | | |
| | | stallList: "/assign/flow/toTaskBySelf" |
| | | }, |
| | | |
| | | upOption: { |
| | | page: { |
| | | num: 0, // å½å页ç ,é»è®¤0,åè°ä¹åä¼å 1,å³callback(page)ä¼ä»1å¼å§ |
| | | size: 10 // æ¯é¡µæ°æ®çæ°é |
| | | }, |
| | | noMoreSize: 4, //妿åè¡¨å·²æ æ°æ®,å¯è®¾ç½®åè¡¨çæ»æ°éè¦å¤§äºåé¡µææ¾ç¤ºæ æ´å¤æ°æ®;é¿å
åè¡¨æ°æ®è¿å°(æ¯å¦åªæä¸æ¡æ°æ®),æ¾ç¤ºæ æ´å¤æ°æ®ä¼ä¸å¥½ç; é»è®¤5 |
| | | empty: { |
| | | tip: '~ ææ æ°æ® ~', // æç¤º |
| | | }, |
| | | loading: '', |
| | | text: 'å
¨é¨', |
| | | isShowNoMore: false, |
| | | textNoMore: 'ææ¯æåºçº¿ç >_<' |
| | | }, |
| | | styles: { |
| | | color: '#2979FF', |
| | | borderColor: '#2979FF' |
| | | }, |
| | | msgList: [], //åè¡¨æ°æ® |
| | | announcement1: [], |
| | | msg1Count: 0, |
| | | msg2Count: 0, |
| | | msg1Title: "" |
| | | } |
| | | }, |
| | | computed: { |
| | | top() { |
| | | return this.CustomBar * 2 + 130 |
| | | }, |
| | | style() { |
| | | var StatusBar = this.StatusBar; |
| | | var CustomBar = this.CustomBar; |
| | | var style = `height:${CustomBar}px;padding-top:${StatusBar}px;`; |
| | | return style |
| | | }, |
| | | }, |
| | | |
| | | |
| | | onShow() { |
| | | if (this.mescroll) { |
| | | this.mescroll.resetUpScroll() |
| | | } |
| | | }, |
| | | |
| | | created() {}, |
| | | methods: { |
| | | |
| | | /** |
| | | * @param {Object} item |
| | | * 详æ
é¡µé¢ |
| | | */ |
| | | onClickProductionTask(item) { |
| | | |
| | | uni.navigateTo({ |
| | | url: '/pages/ToDoList/ToDoListDeils/ToDoListDeils?item=' + |
| | | encodeURIComponent(JSON.stringify(item)) |
| | | |
| | | }) |
| | | |
| | | }, |
| | | |
| | | search() { |
| | | this.$refs.popup.open(); |
| | | }, |
| | | |
| | | |
| | | upCallback(page) { |
| | | this.$http.get(this.url.stallList, { |
| | | params: { |
| | | pageNo: page.num, |
| | | pageSize: page.size, |
| | | order: 'asc', |
| | | column: 'createTime' |
| | | }, |
| | | |
| | | }).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(); |
| | | }) |
| | | |
| | | }, |
| | | |
| | | |
| | | resetTask() { |
| | | this.formData.num = '' |
| | | this.formData.partNumNameModel = '' |
| | | this.$refs.popup.close(); |
| | | this.mescroll.resetUpScroll() |
| | | |
| | | }, |
| | | /* æ£ç´¢ */ |
| | | getSera() { |
| | | this.$refs.popup.close(); |
| | | let keyword = this.TabCur |
| | | this.msgList = []; |
| | | |
| | | if (keyword == 0) { |
| | | this.$http.get(this.url.stallList, { |
| | | params: { |
| | | pageNo: 1, |
| | | pageSize: 999, |
| | | order: "desc", |
| | | column: "createTime", |
| | | num: '*' + this.formData.num + '*', |
| | | partNumNameModel: '*' + this.formData.partNumNameModel + '*', |
| | | status: 'published' |
| | | } |
| | | }).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(); |
| | | }) |
| | | |
| | | } else if (keyword == 1) { |
| | | this.$http.get(this.url.stallList, { |
| | | params: { |
| | | pageNo: 1, |
| | | pageSize: 999, |
| | | order: "desc", |
| | | column: "createTime", |
| | | status: 'training', |
| | | num: '*' + this.formData.num + '*', |
| | | partNumNameModel: '*' + this.formData.partNumNameModel + '*' |
| | | |
| | | } |
| | | }).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.msg2Title = "éç¥(" + 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(); |
| | | }) |
| | | |
| | | } else if (keyword == 2) { |
| | | this.$http.get(this.url.stallList, { |
| | | params: { |
| | | pageNo: 1, |
| | | pageSize: 999, |
| | | order: "desc", |
| | | column: "createTime", |
| | | status: 'completed', |
| | | num: '*' + this.formData.num + '*', |
| | | partNumNameModel: '*' + this.formData.partNumNameModel + '*' |
| | | |
| | | } |
| | | }).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.msg3Count = 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> |
| | | |
| | | .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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <block slot="backText">è¿å</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"> |
| | | <view class="text-gray margin-bottom-lg">ââââââââââ åºæ¬ä¿¡æ¯ ââââââââââ</view> |
| | | <uni-forms-item name="num" label="å·¥åå·:"> |
| | | <uni-easyinput v-model="formData.equipmentCode" :disabled="true" /> |
| | | </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> |
| | | <uni-forms-item name="outNum" label="ä¿å
»å¨æ:"> |
| | | <uni-easyinput v-model="formData.equipmentSpecification" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="outNum" label="夿³¨:"> |
| | | <uni-easyinput v-model="formData.equipmentSpecification" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="outNum" label="ä¿å
»å¾ç:"> |
| | | <view class="grid col-4 grid-square flex-sub"> |
| | | <view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" |
| | | :data-url="imgList[index]"> |
| | | <image :src="imgList[index]" mode="aspectFill"></image> |
| | | <view class="cu-tag bg-red radius" @tap.stop="DelImg" :data-index="index"> |
| | | <text class='cuIcon-close'></text> |
| | | </view> |
| | | </view> |
| | | <view class="solids" @tap="ChooseImage" v-if="imgList.length<1"> |
| | | <text class='cuIcon-cameraadd'></text> |
| | | </view> |
| | | </view> |
| | | |
| | | </uni-forms-item> |
| | | <view class="text-gray margin-bottom-lg">ââââââââââ çç»é¿ç¡®è®¤ ââââââââââ</view> |
| | | <uni-forms-item name="outNum" required label="确认类å:"> |
| | | <uni-data-select :localdata="formData.msListCategory" popup-title="è¯·éæ©" @change="changeType" |
| | | :clear="false"> |
| | | </uni-data-select> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="outNum" required label="确认æè§:"> |
| | | <uni-easyinput type="textarea" v-model="formData.ttitle" placeholder="请è¾å
¥å
容"></uni-easyinput> |
| | | </uni-forms-item> |
| | | |
| | | </uni-group> |
| | | </uni-forms> |
| | | <view class="text-gray margin-bottom-lg">ââââââââââ ä¿å
»é¡¹ä¿¡æ¯ ââââââââââ</view> |
| | | <uni-card margin="10px" spacing="1px" v-for="(item,index) in partTakeAdviceDetailList" :key="index"> |
| | | |
| | | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">è¡å·:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right">{{index+1}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">ä¿å
»é¡¹:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-bold radius text-right"> |
| | | {{item.title}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">åä¿å
»é¡¹:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right" |
| | | v-if="item.small!=null && item.small.length>10"> |
| | | {{(item.small).toString().substr(0,10)+'...'}} |
| | | </view> |
| | | |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right" v-else> |
| | | {{item.small}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">ä¿å
»è¦æ±:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right" |
| | | v-if="item.yaoqiu!=null && item.yaoqiu.length>10"> |
| | | {{(item.yaoqiu).toString().substr(0,10)+'...'}} |
| | | </view> |
| | | |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right" v-else> |
| | | {{item.yaoqiu}} |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">ä¿å
ȍȾ:</view> |
| | | <view class="flex-sub bg-white padding-xs text-right margin-xs radius"> |
| | | <uni-data-select :localdata="item.restle" :clear="true" /> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">å¼å¸¸æè¿°:</view> |
| | | <view class="flex-sub bg-white padding-xs text-right margin-xs radius"> |
| | | <uni-easyinput v-model="item.desc" :disabled="true" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">æ¯å¦æ¥ä¿®:</view> |
| | | <view class="flex-sub bg-white padding-xs text-right margin-xs radius"> |
| | | <uni-data-select :localdata="item.type" /> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | </uni-card> |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js"; |
| | | export default { |
| | | mixins: [MescrollMixin], // 使ç¨mixin |
| | | data() { |
| | | return { |
| | | scrollLeft: 0, |
| | | searchValue: '', |
| | | imgList: [], |
| | | uploadUrl: "/sys/common/upload", |
| | | formData: {}, |
| | | partTakeAdviceDetailList: [{ |
| | | title: "æºåºç©ºæ°è¿æ»¤", |
| | | small: "å¤å£³å管路", |
| | | yaoqiu: "è¿æ»¤ç½,è¿æ»¤æ£å®å¥½ï¼æ æ²¹", |
| | | restle: [{ |
| | | text: "æ£å¸¸", |
| | | value: 0 |
| | | }, |
| | | { |
| | | text: "å¼å¸¸", |
| | | value: 1 |
| | | } |
| | | ] |
| | | |
| | | }], |
| | | NavBarColor: this.NavBarColor, |
| | | url: { |
| | | stallList: "/eam/equipment/queryById" |
| | | }, |
| | | id: '', |
| | | upOption: { |
| | | page: { |
| | | num: 0, // å½å页ç ,é»è®¤0,åè°ä¹åä¼å 1,å³callback(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 style = `height:${CustomBar}px;padding-top:${StatusBar}px;`; |
| | | return style |
| | | }, |
| | | }, |
| | | |
| | | |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | onLoad: function(option) { |
| | | const annItem = JSON.parse(decodeURIComponent(option.item)); |
| | | this.id = annItem.id |
| | | }, |
| | | created() { |
| | | this.upCallback() |
| | | }, |
| | | methods: { |
| | | ChooseImage() { |
| | | var that = this; |
| | | uni.chooseImage({ |
| | | count: 4, //é»è®¤9 |
| | | sizeType: ['original', 'compressed'], //å¯ä»¥æå®æ¯åå¾è¿æ¯å缩å¾ï¼é»è®¤äºè
齿 |
| | | sourceType: ['album'], //ä»ç¸åéæ© |
| | | success: (res) => { |
| | | that.$http.upload(that.uploadUrl, { |
| | | filePath: res.tempFilePaths[0], |
| | | name: 'file' |
| | | }) |
| | | .then(res => { |
| | | that.myFormData.avatar = res.data.message; |
| | | }) |
| | | .catch(err => { |
| | | that.$tip.error(err.data.message) |
| | | }); |
| | | this.imgList = res.tempFilePaths |
| | | } |
| | | }); |
| | | }, |
| | | ViewImage(e) { |
| | | uni.previewImage({ |
| | | urls: this.imgList, |
| | | current: e.currentTarget.dataset.url |
| | | }); |
| | | }, |
| | | DelImg(e) { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'ç¡®å®è¦å é¤è¿æ®µåå¿åï¼', |
| | | cancelText: 'åçç', |
| | | confirmText: 'åè§', |
| | | success: res => { |
| | | if (res.confirm) { |
| | | this.imgList.splice(e.currentTarget.dataset.index, 1) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | upCallback() { |
| | | 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> |
| | | .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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <block slot="backText">è¿å</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> |
| | | import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js"; |
| | | export default { |
| | | mixins: [MescrollMixin], // 使ç¨mixin |
| | | data() { |
| | | return { |
| | | scrollLeft: 0, |
| | | searchValue: '', |
| | | formData: {}, |
| | | NavBarColor: this.NavBarColor, |
| | | url: { |
| | | stallList: "/eam/equipment/queryById" |
| | | }, |
| | | id: '', |
| | | upOption: { |
| | | page: { |
| | | num: 0, // å½å页ç ,é»è®¤0,åè°ä¹åä¼å 1,å³callback(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 style = `height:${CustomBar}px;padding-top:${StatusBar}px;`; |
| | | return style |
| | | }, |
| | | }, |
| | | |
| | | |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | onLoad: function(option) { |
| | | const annItem = JSON.parse(decodeURIComponent(option.item)); |
| | | this.id = annItem.id |
| | | }, |
| | | created() { |
| | | this.upCallback() |
| | | }, |
| | | methods: { |
| | | upCallback() { |
| | | 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> |
| | | .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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <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 class="flex"> |
| | | <button class="flex-sub cu-btn bg-blue margin-sm padding-sm lg" hover-class="is-hover" |
| | | @click="getSera()">ç¹æ£</button> |
| | | <button class="flex-sub cu-btn bg-blue margin-sm padding-sm lg" hover-class="is-hover" |
| | | @click="resetTask">ä¿å
»</button> |
| | | <button class="flex-sub cu-btn bg-blue margin-sm padding-sm lg" hover-class="is-hover" |
| | | @click="resetTask">ç»´ä¿®</button> |
| | | <button class="flex-sub cu-btn bg-blue margin-sm padding-sm lg" hover-class="is-hover" |
| | | @click="resetTask">å¨å
»</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | stringify |
| | | } from "querystring"; |
| | | import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js"; |
| | | export default { |
| | | mixins: [MescrollMixin], // 使ç¨mixin |
| | | data() { |
| | | return { |
| | | |
| | | formData: {}, |
| | | NavBarColor: this.NavBarColor, |
| | | url: { |
| | | stallList: "/eam/equipment/queryById" |
| | | }, |
| | | id: '', |
| | | upOption: { |
| | | page: { |
| | | num: 0, // å½å页ç ,é»è®¤0,åè°ä¹åä¼å 1,å³callback(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) { |
| | | const decodedEquipmentId = decodeURIComponent(options.equipmentId); |
| | | this.id = decodedEquipmentId; |
| | | // const data = options.query; |
| | | // this.id = JSON.parse(data).equipmentId; |
| | | // console.log(data) |
| | | // this.id = options.equipmentId; |
| | | // console.log(options) |
| | | console.log(this.id) |
| | | if (!this.id) { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: "é误ä¸åå¨", |
| | | showCancel: false |
| | | }); |
| | | } else { |
| | | this.upCallback(); |
| | | } |
| | | |
| | | }, |
| | | onShow() { |
| | | // ä»è·¯ç±åæ°ä¸è·åequipmentId |
| | | const equipmentIdFromRoute = this.$router.query.equipmentId; |
| | | if (equipmentIdFromRoute) { |
| | | // 妿åå¨ï¼æ´æ°this.id |
| | | this.id = equipmentIdFromRoute; |
| | | // éæ°è·å设å¤è¯¦æ
æ°æ® |
| | | this.upCallback(); |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬$routeåå |
| | | $route(to, from) { |
| | | // æ´æ°equipmentIdåæ° |
| | | this.id = to.query.equipmentId; |
| | | console.log('æ´æ°åçequipmentId:', this.equipmentId); |
| | | } |
| | | }, |
| | | created() {}, |
| | | methods: { |
| | | getSera() { |
| | | console.log('getSera æ¹æ³è¢«è°ç¨'); |
| | | uni.navigateTo({ |
| | | url: '/pages/TaskManager/TaskManagerList' |
| | | }); |
| | | }, |
| | | 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(() => { |
| | | //èç½å¤±è´¥, ç»æå è½½ |
| | | }) |
| | | }, |
| | | |
| | | mescrollInit(mescroll) { |
| | | console.log('mescrollInit') |
| | | this.mescroll = mescroll; |
| | | }, |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | ## 1.3.0ï¼2022-06-28ï¼ |
| | | 1. [ä¿®æ¹] - ä¹åä½¿ç¨ canvas å¨é¡µé¢ä¸å±ç¤ºç»é¢ï¼æ¹ä¸º video æ ç¾å¨é¡µé¢å±ç¤ºè§é¢æµç»é¢ã |
| | | 2. [å¢å¼º] - ç°å¨åªè·åæ«ææ¡ä¸çç»é¢è¿è¡äºç»´ç è¯å«ï¼è¿æ ·å¯ææçèçèµæºä¸æé«è¯å«æçã |
| | | 3. [å¢å¼º] - æåè°ç¨æå头çå辨çã |
| | | 4. [å¢å¼º] - æåè¯å«å¤§äºç»´ç çè½åï¼ä¹åå¨ä½ç«¯æºä¸è¯å«å¤§äºç»´ç 容æè¯å«ä¸å°ã |
| | | 5. [æ°å¢] - æ°å¢é误äºä»¶è¿åï¼è¿åå
鍿¥éãé误说æè¯·æ¥çææ¡£ã |
| | | ## 1.2.1ï¼2022-06-01ï¼ |
| | | |
| | | æ°å¢éªå
ç¯å¼å
³(åªæå¨è°·æå
æ ¸æµè§å¨ä¸æ¾ç¤ºï¼æ¨è微信å
ç½®æµè§å¨) |
| | | |
| | | æ°å¢httpsç¯å¢æ£æµ(æ»æäººä¸çä»ç»ï¼ç´æ¥ä½¿ç¨å¯¼è´æ æ³æ£å¸¸è°ç¨æå头ã) |
| | | |
| | | æ´æ°ææ¡£ |
| | | ## 1.2.0ï¼2022-06-01ï¼ |
| | | æ°å¢éªå
ç¯å¼å
³(åªæå¨è°·æå
æ ¸æµè§å¨ä¸æ¾ç¤ºï¼æ¨è微信å
ç½®æµè§å¨) |
| | | |
| | | æ°å¢httpsç¯å¢æ£æµ(æ»æäººä¸çä»ç»ï¼ç´æ¥ä½¿ç¨å¯¼è´æ æ³æ£å¸¸è°ç¨æå头ã) |
| | | ## 1.1.0ï¼2022-01-25ï¼ |
| | | 1.æ¯æå
¨å± - |
| | | 2.æ¯æåç½®æå头 - |
| | | 3.æ¯æé«æ¸
è°ç¨æå头 - |
| | | ## 1.0.4ï¼2021-12-24ï¼ |
| | | æ´æ°æä»¶è¯´æ |
| | | ## 1.0.3ï¼2021-12-21ï¼ |
| | | 叿大家å¤å»æå°ç¨åºä¸éä¸äºï¼å°±å½æ¯æä½è
äºã谢谢大家ï¼åºä¸æå°ç¨åºäºç»´ç ã |
| | | ## 1.0.2ï¼2021-12-21ï¼ |
| | | æ´æ°ææ¡£ |
| | | ## 1.0.1ï¼2021-12-21ï¼ |
| | | æ£å¼ä¸çº¿æä»¶ |
| | | ## 1.0.0ï¼2021-12-21ï¼ |
| | | 1.0.0 |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="canvasBox"> |
| | | <template v-if="isUse"> |
| | | <view class="box"> |
| | | <view class="line"></view> |
| | | <view class="angle"></view> |
| | | </view> |
| | | <view class="box2" v-if="isUseTorch"> |
| | | <view class="track" @click="openTrack"> |
| | | <svg |
| | | t="1653920715959" |
| | | class="icon" |
| | | viewBox="0 0 1024 1024" |
| | | version="1.1" |
| | | xmlns="http://www.w3.org/2000/svg" |
| | | p-id="1351" |
| | | width="32" |
| | | height="32" |
| | | > |
| | | <path |
| | | d="M651.353043 550.479503H378.752795L240.862609 364.315031c-3.688944-4.897391-5.660621-10.876025-5.660621-17.045466v-60.040745c0-15.773416 12.847702-28.621118 28.621118-28.621118h502.459627c15.773416 0 28.621118 12.847702 28.621118 28.621118v59.977143c0 6.105839-1.971677 12.084472-5.660621 17.045466l-137.890187 186.228074zM378.752795 598.308571v398.024348c0 15.328199 12.402484 27.667081 27.667081 27.667081h217.266087c15.328199 0 27.667081-12.402484 27.66708-27.667081V598.308571H378.752795z m136.300124 176.942112c-14.564969 0-26.331429-11.76646-26.331428-26.331428v-81.283975c0-14.564969 11.76646-26.331429 26.331428-26.331429 14.564969 0 26.331429 11.76646 26.331429 26.331429v81.283975c0 14.564969-11.76646 26.331429-26.331429 26.331428zM512 222.608696c-17.554286 0-31.801242-14.246957-31.801242-31.801243V31.801242c0-17.554286 14.246957-31.801242 31.801242-31.801242s31.801242 14.246957 31.801242 31.801242v159.006211c0 17.554286-14.246957 31.801242-31.801242 31.801243zM280.932174 205.881242c-9.47677 0-18.889938-4.197764-25.122981-12.275279L158.242981 67.991056a31.864845 31.864845 0 0 1 5.597019-44.648944 31.864845 31.864845 0 0 1 44.648944 5.597018l97.502609 125.551305a31.864845 31.864845 0 0 1-5.597019 44.648944c-5.787826 4.579379-12.656894 6.741863-19.46236 6.741863zM723.987081 205.881242c-6.805466 0-13.674534-2.162484-19.462361-6.678261a31.794882 31.794882 0 0 1-5.597018-44.648944l97.566211-125.551304a31.794882 31.794882 0 0 1 44.648944-5.597019 31.794882 31.794882 0 0 1 5.597019 44.648944l-97.566211 125.551305c-6.360248 8.077516-15.709814 12.27528-25.186584 12.275279z" |
| | | fill="#ffffff" |
| | | p-id="1352" |
| | | ></path> |
| | | </svg> |
| | | {{ trackStatus ? 'å
³ééªå
ç¯' : 'æå¼éªå
ç¯' }} |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="mask1 mask" :style="'height:' + maskHeight + 'px;'"></view> |
| | | <view |
| | | class="mask2 mask" |
| | | :style="'width:' + maskWidth + 'px;top:' + maskHeight + 'px;height:' + canvasHeight + 'px'" |
| | | ></view> |
| | | <view class="mask3 mask" :style="'height:' + maskHeight + 'px;'"></view> |
| | | <view |
| | | class="mask4 mask" |
| | | :style="'width:' + maskWidth + 'px;top:' + maskHeight + 'px;height:' + canvasHeight + 'px'" |
| | | ></view> |
| | | </template> |
| | | <template v-else> |
| | | <slot name="error"> |
| | | <view class="error"> |
| | | <view class="on1">ç¸æºæé被æç»ï¼è¯·å°è¯å¦ä¸æä½ï¼</view> |
| | | <view>· å·æ°é¡µé¢åéè¯ï¼</view> |
| | | <view>· å¨ç³»ç»ä¸æ£æµå½åAppææµè§å¨çç¸æºæéæ¯å¦è¢«ç¦ç¨ï¼</view> |
| | | <view>· 妿ä¾ç¶ä¸è½ä½éªï¼å»ºè®®å¨å¾®ä¿¡ä¸æå¼é¾æ¥ï¼</view> |
| | | </view> |
| | | </slot> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import jsQR from './jsQR.js' |
| | | |
| | | export default { |
| | | props: { |
| | | continue: { |
| | | type: Boolean, |
| | | default: false // false çå¬ä¸æ¬¡ true æç»çå¬ |
| | | }, |
| | | exact: { |
| | | type: String, |
| | | default: 'environment' // environment åæå头 user åæå头 |
| | | }, |
| | | size: { |
| | | type: String, |
| | | default: 'whole' // whole å
¨å± balf åå± |
| | | }, |
| | | definition: { |
| | | type: Boolean, |
| | | default: false // fasle æ£å¸¸ true 髿¸
|
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | windowWidth: 0, |
| | | windowHeight: 0, |
| | | video: null, |
| | | canvas2d: null, |
| | | canvas2d2: null, |
| | | canvasWidth: 200, |
| | | canvasHeight: 200, |
| | | maskWidth: 0, |
| | | maskHeight: 0, |
| | | inter: 0, |
| | | |
| | | track: null, |
| | | isUseTorch: false, |
| | | trackStatus: false, |
| | | |
| | | isParse: false, |
| | | isUse: true |
| | | } |
| | | }, |
| | | mounted() { |
| | | if (origin.indexOf('https') === -1) throw 'è¯·å¨ https ç¯å¢ä¸ä½¿ç¨æå头ç»ä»¶ã' |
| | | |
| | | this.windowWidth = document.documentElement.clientWidth || document.body.clientWidth |
| | | this.windowHeight = document.documentElement.clientHeight || document.body.clientHeight |
| | | this.windowHeight = this.size === 'whole' ? this.windowHeight : this.windowHeight / 2 |
| | | this.isParse = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.createMsk() |
| | | this.openScan() |
| | | }) |
| | | }, |
| | | destroyed() { |
| | | this.closeCamera() |
| | | }, |
| | | methods: { |
| | | openScan() { |
| | | const width = this.transtion(this.windowHeight) |
| | | const height = this.transtion(this.windowWidth) |
| | | const videoParam = { |
| | | audio: false, |
| | | video: { |
| | | facingMode: { exact: this.exact }, |
| | | width, |
| | | height |
| | | } |
| | | } |
| | | navigator.mediaDevices |
| | | .getUserMedia(videoParam) |
| | | .then(stream => { |
| | | this.video = document.createElement('video') |
| | | this.video.width = this.windowWidth |
| | | this.video.height = this.windowHeight |
| | | |
| | | const canvas = document.createElement('canvas') |
| | | canvas.id = 'canvas' |
| | | canvas.width = this.transtion(this.canvasWidth) |
| | | canvas.height = this.transtion(this.canvasHeight) |
| | | canvas.style = 'display:none;' |
| | | //canvas.style = 'position: fixed;top: 0;z-index: 999;left:0' |
| | | this.canvas2d = canvas.getContext('2d') |
| | | |
| | | // 设置å½åå®½é« æ»¡å± |
| | | const canvasBox = document.querySelector('.canvasBox') |
| | | canvasBox.append(this.video) |
| | | canvasBox.append(canvas) |
| | | canvasBox.style = `width:${this.windowWidth}px;height:${this.windowHeight}px;` |
| | | |
| | | // å建第äºä¸ªcanvas |
| | | const canvas2 = document.createElement('canvas') |
| | | canvas2.id = 'canvas2' |
| | | canvas2.width = this.canvasWidth |
| | | canvas2.height = this.canvasHeight |
| | | canvas2.style = 'position: absolute;top: 50%;left: 50%;z-index: 20;transform: translate(-50%, -50%);' |
| | | this.canvas2d2 = canvas2.getContext('2d') |
| | | canvasBox.append(canvas2) |
| | | |
| | | this.video.srcObject = stream |
| | | this.video.setAttribute('playsinline', true) |
| | | this.video.play() |
| | | this.tick() |
| | | |
| | | this.track = stream.getVideoTracks()[0] |
| | | setTimeout(() => { |
| | | this.isUseTorch = this.track.getCapabilities().torch || null |
| | | }, 500) |
| | | }) |
| | | .catch(err => { |
| | | this.isUse = false |
| | | this.$emit('error', err) |
| | | }) |
| | | }, |
| | | |
| | | closeCamera() { |
| | | this.isParse = false |
| | | if (this.video && this.video.srcObject) { |
| | | this.video.srcObject.getTracks().forEach(track => { |
| | | track.stop() |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | tick() { |
| | | if (!this.isParse) return |
| | | if (this.video.readyState === this.video.HAVE_ENOUGH_DATA) { |
| | | this.canvas2d.drawImage( |
| | | this.video, |
| | | this.transtion(this.maskWidth), |
| | | this.transtion(this.maskHeight), |
| | | this.transtion(200), |
| | | this.transtion(200), |
| | | 0, |
| | | 0, |
| | | this.transtion(this.canvasWidth), |
| | | this.transtion(this.canvasHeight) |
| | | ) |
| | | |
| | | const imageData = this.canvas2d.getImageData( |
| | | 0, |
| | | 0, |
| | | this.transtion(this.canvasWidth), |
| | | this.transtion(this.canvasHeight) |
| | | ) |
| | | |
| | | const code = jsQR(imageData.data, imageData.width, imageData.height, { |
| | | inversionAttempts: 'dontInvert' |
| | | }) |
| | | |
| | | this.canvas2d2.clearRect(0, 0, this.canvasWidth, this.canvasHeight) |
| | | if (code) { |
| | | this.drawLine(code.location.topLeftCorner, code.location.topRightCorner) |
| | | this.drawLine(code.location.topRightCorner, code.location.bottomRightCorner) |
| | | this.drawLine(code.location.bottomRightCorner, code.location.bottomLeftCorner) |
| | | this.drawLine(code.location.bottomLeftCorner, code.location.topLeftCorner) |
| | | if (code.data) { |
| | | this.getData(code.data) |
| | | } |
| | | } |
| | | } |
| | | requestAnimationFrame(this.tick) |
| | | }, |
| | | drawLine(begin, end, color = '#FF3B58') { |
| | | this.canvas2d2.beginPath() |
| | | this.canvas2d2.moveTo(this.nutranstion(begin.x), this.nutranstion(begin.y)) |
| | | this.canvas2d2.lineTo(this.nutranstion(end.x), this.nutranstion(end.y)) |
| | | this.canvas2d2.lineWidth = 4 |
| | | this.canvas2d2.strokeStyle = color |
| | | this.canvas2d2.stroke() |
| | | }, |
| | | |
| | | getData(data) { |
| | | this.$emit('success', data) |
| | | if (!this.continue) { |
| | | this.closeCamera() |
| | | } |
| | | }, |
| | | |
| | | openTrack() { |
| | | this.trackStatus = !this.trackStatus |
| | | this.track.applyConstraints({ |
| | | advanced: [{ torch: this.trackStatus }] |
| | | }) |
| | | }, |
| | | |
| | | createMsk() { |
| | | this.maskWidth = this.windowWidth / 2 - this.canvasWidth / 2 |
| | | this.maskHeight = this.windowHeight / 2 - this.canvasHeight / 2 |
| | | }, |
| | | |
| | | transtion(number) { |
| | | return this.definition ? number * 2.8 : number * 1.8 |
| | | }, |
| | | nutranstion(number) { |
| | | return this.definition ? number / 2.8 : number / 1.8 |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | page { |
| | | background-color: #333333; |
| | | } |
| | | |
| | | .canvasBox { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | position: relative; |
| | | |
| | | background-image: linear-gradient( |
| | | 0deg, |
| | | transparent 24%, |
| | | rgba(32, 255, 77, 0.1) 25%, |
| | | rgba(32, 255, 77, 0.1) 26%, |
| | | transparent 27%, |
| | | transparent 74%, |
| | | rgba(32, 255, 77, 0.1) 75%, |
| | | rgba(32, 255, 77, 0.1) 76%, |
| | | transparent 77%, |
| | | transparent |
| | | ), |
| | | linear-gradient( |
| | | 90deg, |
| | | transparent 24%, |
| | | rgba(32, 255, 77, 0.1) 25%, |
| | | rgba(32, 255, 77, 0.1) 26%, |
| | | transparent 27%, |
| | | transparent 74%, |
| | | rgba(32, 255, 77, 0.1) 75%, |
| | | rgba(32, 255, 77, 0.1) 76%, |
| | | transparent 77%, |
| | | transparent |
| | | ); |
| | | background-size: 3rem 3rem; |
| | | background-position: -1rem -1rem; |
| | | z-index: 10; |
| | | background-color: #1110; |
| | | } |
| | | |
| | | .box { |
| | | width: 200px; |
| | | height: 200px; |
| | | position: absolute; |
| | | left: 50%; |
| | | top: 50%; |
| | | transform: translate(-50%, -50%); |
| | | overflow: hidden; |
| | | border: 0.1rem solid rgba(0, 255, 51, 0.2); |
| | | z-index: 11; |
| | | } |
| | | |
| | | .line { |
| | | height: calc(100% - 2px); |
| | | width: 100%; |
| | | background: linear-gradient(180deg, rgba(0, 255, 51, 0) 43%, #00ff33 211%); |
| | | border-bottom: 3px solid #00ff33; |
| | | transform: translateY(-100%); |
| | | animation: radar-beam 2s infinite alternate; |
| | | animation-timing-function: cubic-bezier(0.53, 0, 0.43, 0.99); |
| | | animation-delay: 1.4s; |
| | | } |
| | | |
| | | .box:after, |
| | | .box:before, |
| | | .angle:after, |
| | | .angle:before { |
| | | content: ''; |
| | | display: block; |
| | | position: absolute; |
| | | width: 3vw; |
| | | height: 3vw; |
| | | z-index: 12; |
| | | border: 0.2rem solid transparent; |
| | | } |
| | | |
| | | .box:after, |
| | | .box:before { |
| | | top: 0; |
| | | border-top-color: #00ff33; |
| | | } |
| | | |
| | | .angle:after, |
| | | .angle:before { |
| | | bottom: 0; |
| | | border-bottom-color: #00ff33; |
| | | } |
| | | |
| | | .box:before, |
| | | .angle:before { |
| | | left: 0; |
| | | border-left-color: #00ff33; |
| | | } |
| | | |
| | | .box:after, |
| | | .angle:after { |
| | | right: 0; |
| | | border-right-color: #00ff33; |
| | | } |
| | | |
| | | @keyframes radar-beam { |
| | | 0% { |
| | | transform: translateY(-100%); |
| | | } |
| | | |
| | | 100% { |
| | | transform: translateY(0); |
| | | } |
| | | } |
| | | |
| | | .msg { |
| | | text-align: center; |
| | | padding: 20rpx 0; |
| | | } |
| | | |
| | | .box2 { |
| | | width: 300px; |
| | | height: 200px; |
| | | position: absolute; |
| | | left: 50%; |
| | | top: 50%; |
| | | transform: translate(-50%, -50%); |
| | | z-index: 20; |
| | | } |
| | | |
| | | .track { |
| | | position: absolute; |
| | | bottom: -100px; |
| | | left: 50%; |
| | | transform: translateX(-50%); |
| | | z-index: 20; |
| | | color: #fff; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | } |
| | | |
| | | .mask { |
| | | position: absolute; |
| | | z-index: 10; |
| | | background-color: rgba(0, 0, 0, 0.55); |
| | | } |
| | | |
| | | .mask1 { |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | } |
| | | |
| | | .mask2 { |
| | | right: 0; |
| | | } |
| | | |
| | | .mask3 { |
| | | right: 0; |
| | | left: 0; |
| | | bottom: 0; |
| | | } |
| | | |
| | | .mask4 { |
| | | left: 0; |
| | | } |
| | | |
| | | .error { |
| | | color: #fff; |
| | | padding: 40rpx; |
| | | font-size: 24rpx; |
| | | background-color: #333333; |
| | | position: fixed; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | width: 550rpx; |
| | | border-radius: 20rpx; |
| | | } |
| | | |
| | | .error .on1 { |
| | | font-size: 30rpx; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "id": "mumu-getQrcode", |
| | | "displayName": "H5è°ç¨æå头è¯å«äºç»´ç ï¼åçH5è°ç¨ï¼ä¸éè¦ä»»ä½sdkï¼æ¬å°æ«æè¯å«ï¼ä¸éè¦å端ï¼", |
| | | "version": "1.3.0", |
| | | "description": "卿µè§å¨ä¸è°ç¨ææºæå头è¿è¡æ«ç ï¼æ 须任ä½sdkï¼æ¯æå¸é¢ä¸ç»å¤§é¨åææºãå¨å®åç³»ç»ä¸å¯ä»¥æå¼éªå
ç¯", |
| | | "keywords": [ |
| | | "h5æ«ç ", |
| | | "åçH5è°ç¨æå头", |
| | | "äºç»´ç ", |
| | | "éªå
ç¯" |
| | | ], |
| | | "repository": "", |
| | | "engines": { |
| | | "HBuilderX": "^3.1.0" |
| | | }, |
| | | "dcloudext": { |
| | | "category": [ |
| | | "å端ç»ä»¶", |
| | | "éç¨ç»ä»¶" |
| | | ], |
| | | "sale": { |
| | | "regular": { |
| | | "price": "4.55" |
| | | }, |
| | | "sourcecode": { |
| | | "price": "30.00" |
| | | } |
| | | }, |
| | | "contact": { |
| | | "qq": "1139027508" |
| | | }, |
| | | "declaration": { |
| | | "ads": "æ ", |
| | | "data": "æ ", |
| | | "permissions": "æå头" |
| | | }, |
| | | "npmurl": "" |
| | | }, |
| | | "uni_modules": { |
| | | "dependencies": [], |
| | | "encrypt": [], |
| | | "platforms": { |
| | | "cloud": { |
| | | "tcb": "y", |
| | | "aliyun": "y" |
| | | }, |
| | | "client": { |
| | | "Vue": { |
| | | "vue2": "y", |
| | | "vue3": "y" |
| | | }, |
| | | "App": { |
| | | "app-vue": "n", |
| | | "app-nvue": "n" |
| | | }, |
| | | "H5-mobile": { |
| | | "Safari": "y", |
| | | "Android Browser": "y", |
| | | "微信æµè§å¨(Android)": "y", |
| | | "QQæµè§å¨(Android)": "y" |
| | | }, |
| | | "H5-pc": { |
| | | "Chrome": "n", |
| | | "IE": "n", |
| | | "Edge": "n", |
| | | "Firefox": "n", |
| | | "Safari": "n" |
| | | }, |
| | | "å°ç¨åº": { |
| | | "微信": "n", |
| | | "é¿é": "n", |
| | | "ç¾åº¦": "n", |
| | | "åèè·³å¨": "n", |
| | | "QQ": "n" |
| | | }, |
| | | "å¿«åºç¨": { |
| | | "å为": "u", |
| | | "èç": "u" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | ## æä»¶ç®ç» |
| | | ### å®ç°åç |
| | | |
| | | > äºç»´ç è¯å«åè½ä½¿ç¨çæ¯jsQRè¿ä¸ªåºï¼è°ç¨æå头使ç¨ç navigator.mediaDevices.getUserMedia è¿ä¸ªH5çapiãéè¿canvasç»å¸ææå头è·åå°çæ°æ®å±ç°å°é¡µé¢ä¸ï¼åæ¶å¾ªç¯çå¬jsQRè§£æã |
| | | |
| | | |
| | | ### 使ç¨ç¯å¢ |
| | | ç»æµè¯åç°å¤§é¨åæµè§å¨é½å¯ä»¥æ£å¸¸ä½¿ç¨ï¼å¾®ä¿¡ï¼QQï¼è°·æï¼ç«çï¼safariï¼ï¼å°æ°çå®åèªå¸¦æµè§å¨æ æ³ä½¿ç¨ï¼æµè§å¨å
æ ¸çæ¬è¿ä½ï¼ãéè¦httpsç¯å¢æè½ä½¿ç¨ï¼æ¬å°æµè¯å¯ä»¥å¨ manifest.json ä¸ç¹å»æºç å±ç¤ºï¼æ¾å°h5 ï¼æ·»å ï¼"devServer" : { "https" : true} |
| | | |
| | | éè¦httpsç¯å¢æè½ä½¿ç¨ï¼ï¼ï¼ |
| | | |
| | | éè¦httpsç¯å¢æè½ä½¿ç¨ï¼ï¼ï¼ |
| | | |
| | | éè¦httpsç¯å¢æè½ä½¿ç¨ï¼ï¼ï¼ |
| | | |
| | | **å°ç¥è¯ç¹ï¼è¹æè®¾å¤ä¸ä¸è®ºä»ä¹æµè§å¨é½æ¯safariå¥å£³çï¼ä¸è®ºæ¯è°·æè¿æ¯ç«ç齿¯safariå¥å£³ãè¿ä¹å°±æ¯ä»£è¡¨å¨è¹æä¸æ éæ
å¿æ æ³ä½¿ç¨æ¤æä»¶ãï¼é æè¿æ ·çç°è±¡æ¯å ä¸ºè¹ææä¸ååè®®ï¼æµè§å¨åªè½ä½¿ç¨safariå
æ ¸ï¼** |
| | | |
| | | å¨å®åç³»ç»ä¸å¯ä»¥æå¼éªå
ç¯ |
| | | |
| | | #### éè¿èææ¶å建ç uni 项ç®ï¼éè¦çè¿é |
| | | |
| | | å¦æä½ æ¯éè¿èææ¶å建ç uni ç项ç®ï¼éè¦èªè¡å®è£
`jsQR` ä¾èµï¼å¹¶ä¸ä¿®æ¹ç»ä»¶ä¸æºç ä¸çå¼å
¥ãéè¿ HBuilder å建ç项ç®ä¸éè¦æ¤æä½ã |
| | | |
| | | ```bash |
| | | # å®è£
jsQR |
| | | npm install jsqr --save |
| | | # ä¿®æ¹ç»ä»¶æºç 对 jsQR ä¾èµ |
| | | import jsQR from "jsqr" |
| | | ``` |
| | | |
| | | |
| | | |
| | | ### æä»¶ä½¿ç¨ |
| | | **æä»¶å·²æ¯æ uni_modules æ¯æç»ä»¶easycomï¼ä»¥ä¸ä»£ç æ¼ç¤ºçæ¯æ®é使ç¨** |
| | | |
| | | ``` html |
| | | <!-- HTML --> |
| | | <mumu-get-qrcode @success='qrcodeSucess' @error="qrcodeError" ></mumu-get-qrcode> |
| | | ``` |
| | | |
| | | ``` javascript |
| | | // js |
| | | import mumuGetQrcode from '@/uni_modules/mumu-getQrcode/components/mumu-getQrcode/mumu-getQrcode.vue' |
| | | // å«è·¯å¾é¿çè¯å¯ä»¥åç¬å¤å¶åºæ¥ |
| | | export default { |
| | | components: { |
| | | mumuGetQrcode |
| | | }, |
| | | methods: { |
| | | qrcodeSucess(data) { |
| | | uni.showModal({ |
| | | title: 'æå', |
| | | content: data, |
| | | success: () => { |
| | | uni.navigateBack({}) |
| | | } |
| | | }) |
| | | }, |
| | | qrcodeError(err) { |
| | | console.log(err) |
| | | uni.showModal({ |
| | | title: 'æå头ææå¤±è´¥', |
| | | content: 'æå头ææå¤±è´¥ï¼è¯·æ£æµå½åæµè§å¨æ¯å¦ææå头æéã', |
| | | success: () => { |
| | | uni.navigateBack({}) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | ``` |
| | | ### ç¸å
³API |
| | | |
| | | ##### å¯ä¼ 屿§ï¼Propsï¼ |
| | | |
| | | | åæ° | 说æ | ç±»å | é»è®¤å¼ | |
| | | | ---------- | ------------------------------------------------- | ------- | ----------- | |
| | | | continue | æ¯å¦è¿ç»è·åãfalse çå¬ä¸æ¬¡ true æç»çå¬ | Boolean | false | |
| | | | exact | éè°ç¨æå头ãenvironment åæå头 user åæå头 | String | environment | |
| | | | size | æ«ç å±å¹å¤§å°ãwhole å
¨å± balf åå± | String | whole | |
| | | | definition | è°ç¨æå头æ¸
æ°åº¦ãfasle æ£å¸¸ true 髿¸
| Boolean | false | |
| | | |
| | | |
| | | |
| | | ##### äºä»¶ï¼Eventsï¼ |
| | | |
| | | | äºä»¶å | 说æ | åè°åæ° | |
| | | | ------- | ------------------------------------------ | ------------------ | |
| | | | success | æ£æµå°å¾ä¸æäºç»´ç 并读åå°æ°æ®æ¯åè° | äºç»´ç æ°æ® | |
| | | | error | ç»ä»¶å
é¨åéé误ï¼éå¸¸æ¯æå头没æè°ç¨æå | é误信æ¯ï¼è¯¦æ
è§ä¸ | |
| | | |
| | | **常è§çé误信æ¯ï¼** |
| | | |
| | | - `AbortError`ï¼»ä¸æ¢é误] |
| | | |
| | | å°½ç®¡ç¨æ·åæä½ç³»ç»é½æäºäºè®¿é®è®¾å¤ç¡¬ä»¶çæå©ï¼è䏿ªåºç°å¯è½æåº`NotReadableError`å¼å¸¸ç硬件é®é¢ï¼ä½ä»ç¶æä¸äºé®é¢çåºç°å¯¼è´äºè®¾å¤æ æ³è¢«ä½¿ç¨ã |
| | | |
| | | - `NotAllowedError`ï¼»æç»é误] |
| | | |
| | | ç¨æ·æç»äºå½åçæµè§å¨å®ä¾ç访é®è¯·æ±ï¼æè
ç¨æ·æç»äºå½åä¼è¯ç访é®ï¼æè
ç¨æ·å¨å
¨å±èå´å
æç»äºææåªä½è®¿é®è¯·æ±ã |
| | | |
| | | - `NotFoundError`ï¼»æ¾ä¸å°é误] |
| | | |
| | | æ¾ä¸å°æ»¡è¶³è¯·æ±åæ°çåªä½ç±»åã |
| | | |
| | | - `NotReadableError`ï¼»æ æ³è¯»åé误] |
| | | |
| | | å°½ç®¡ç¨æ·å·²ç»ææä½¿ç¨ç¸åºç设å¤ï¼æä½ç³»ç»ä¸æä¸ªç¡¬ä»¶ãæµè§å¨æè
ç½é¡µå±é¢åççé误导è´è®¾å¤æ æ³è¢«è®¿é®ã |
| | | |
| | | - `OverconstrainedError`ï¼»æ æ³æ»¡è¶³è¦æ±é误] |
| | | |
| | | æå®çè¦æ±æ æ³è¢«è®¾å¤æ»¡è¶³ï¼æ¤å¼å¸¸æ¯ä¸ä¸ªç±»å为`OverconstrainedError`çå¯¹è±¡ï¼æ¥æä¸ä¸ª`constraint`屿§ï¼è¿ä¸ªå±æ§å
å«äºå½åæ æ³è¢«æ»¡è¶³ç`constraint`对象ï¼è¿æ¥æä¸ä¸ª`message`屿§ï¼å
å«äºé
读å好çåç¬¦ä¸²ç¨æ¥è¯´ææ
åµã |
| | | |
| | | - `SecurityError`ï¼»å®å
¨é误] |
| | | |
| | | å¨`getUserMedia()` 被è°ç¨ç [`Document`](https://developer.mozilla.org/zh-CN/docs/Web/API/Document) ä¸é¢ï¼ä½¿ç¨è®¾å¤åªä½è¢«ç¦æ¢ãè¿ä¸ªæºå¶æ¯å¦å¼å¯æè
å
³éåå³äºåä¸ªç¨æ·çå好设置ã |
| | | |
| | | - `TypeError`[类åé误] |
| | | |
| | | constraints 对象æªè®¾ç½®ï¼»ç©ºï¼½ï¼æè
é½è¢«è®¾ç½®ä¸º`false`ã |
| | | |
| | | |
| | | |
| | | ##### ææ§½ ï¼slotï¼ |
| | | |
| | | | ææ§½åç§° | 说æ | é»è®¤å¼ | |
| | | | -------- | -------------------------------- | ------------------ | |
| | | | error | å½åéé误æ¶ï¼å¨é¡µé¢ä¸æ¾ç¤ºçå
容 | ç¸æºæé被æç»æç¤º | |
| | | |
| | | |
| | | |
| | | ### æ¡ä¾æ¼ç¤º |
| | | |
| | |  |
| | | |
| | | ## æ¯æä½è
|
| | |  |