| | |
| | | "name" : "GS-MES-AP", |
| | | "appid" : "__UNI__B38B152", |
| | | "description" : "", |
| | | "versionName" : "1.1.2.0001", |
| | | "versionName" : "1.1.2.0002", |
| | | "versionCode" : 1, |
| | | "transformPx" : false, |
| | | /* 5+Appç¹æç¸å
³ */ |
| | |
| | | "iconPath": "static/img/home.png", |
| | | "selectedIconPath": "static/img/homeHL.png" |
| | | }, |
| | | { |
| | | "pagePath": "pages/BasePages/message", |
| | | "text": "æ¶æ¯ä¸å¿", |
| | | "iconPath": "static/img/user.png", |
| | | "selectedIconPath": "static/img/userHL.png" |
| | | }, |
| | | // { |
| | | // "pagePath": "pages/BasePages/message", |
| | | // "text": "æ¶æ¯ä¸å¿", |
| | | // "iconPath": "static/img/user.png", |
| | | // "selectedIconPath": "static/img/userHL.png" |
| | | // }, |
| | | { |
| | | "pagePath": "pages/BasePages/user", |
| | | "text": "æç", |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/QC/SJ/yzxFrom", |
| | | "style": { |
| | | "navigationBarTitleText": "ä¸è´æ§æ ¸å¯¹", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/QC/XJ/yzxFrom", |
| | | "style": { |
| | | "navigationBarTitleText": "ä¸è´æ§æ ¸å¯¹", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/QC/LLJ/Blms", |
| | | "style": { |
| | | "navigationBarTitleText": "ä¸è¯æè¿°", |
| | |
| | | <view class="action-buttons"> |
| | | <button v-if="isUpdate && !isShowTable" class="secondary-btn" @click="save">å建æ£éªåå¹¶çæé¨åé»è®¤å¼</button> |
| | | <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="toImage">ä¸ä¼ /æ¥çå¾ç</button> |
| | | <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="toYzxSubmitFrom(formData.releaseNo)">ä¸è´æ§æ ¸å¯¹</button> |
| | | <button v-if="!isUpdate && !formData.statusUser && !isShowTable" class="secondary-btn" @click="removeXJ"> |
| | | å é¤åæ® |
| | | </button> |
| | |
| | | //optionsä¸å
å«äºurlé带çåæ° |
| | | |
| | | let params = options; |
| | | |
| | | if(params["current"]==='A') |
| | | { |
| | | this.current=true; |
| | | }else if(params["current"]==='B'){ |
| | | this.current=false; |
| | | } |
| | | if (params["id"]) { |
| | | this.isUpdate = false; |
| | | this.formData.id = params["id"]; |
| | |
| | | this.isUpdate = false; |
| | | }) |
| | | }, |
| | | toYzxSubmitFrom(releaseNo){ |
| | | uni.navigateTo({ |
| | | url: 'yzxFrom?id=' +this.formData.id+'¤t='+this.current |
| | | }); |
| | | }, |
| | | save() { |
| | | |
| | | // if (this.tableData.length === 0) { |
| | |
| | | this.init(); |
| | | }, |
| | | navigateToDetail(item) { |
| | | uni.navigateTo({ |
| | | url: 'Add?id=' + item.id + '&billNo=' + item.billNo |
| | | }); |
| | | if (this.current === 1) { |
| | | uni.navigateTo({ |
| | | url: 'Add?id=' + item.id + '&billNo=' + item.billNo+ |
| | | '¤t=B' |
| | | }); |
| | | }else{ |
| | | uni.navigateTo({ |
| | | url: 'Add?id=' + item.id + '&billNo=' + item.billNo+ |
| | | '¤t=A' |
| | | }); |
| | | } |
| | | |
| | | } |
| | | }, |
| | | /** |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <!-- è¡¨æ ¼å¤´é¨ --> |
| | | <view class="table-header" v-if="components.length>0"> |
| | | <view class="th name">å
å¨ä»¶åç§°</view> |
| | | <view class="th spec">è§æ ¼</view> |
| | | <view class="th manufacturer">å¶é å</view> |
| | | <view class="th operation">ä¸ä¼ å¾ç</view> |
| | | |
| | | </view> |
| | | |
| | | <!-- è¡¨æ ¼å
容 --> |
| | | <view class="table-body" v-if="components.length>0"> |
| | | <!-- å¾ªç¯æ¸²æå
å¨ä»¶ --> |
| | | <view class="tr" v-for="(item, index) in components" :key="index"> |
| | | <view class="td name">{{ item.name }}</view> |
| | | |
| | | <!-- è§æ ¼å --> |
| | | <view class="td spec"v-if="current=='true'"> |
| | | <view v-for="(spec, sIndex) in item.specs" :key="sIndex" |
| | | class="option-item" @click="selectSpec(item, sIndex)"> |
| | | <radio :value="String(sIndex)" |
| | | :checked="item.selectedSpec === sIndex"/> |
| | | <text class="option-text">{{ spec }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- å¶é åå --> |
| | | <view class="td manufacturer" v-if="current=='true'"> |
| | | <view v-for="(mfg, mIndex) in item.manufacturers" :key="mIndex" |
| | | class="option-item" @click="selectMfg(item, mIndex)"> |
| | | <radio :value="String(mIndex)" |
| | | :checked="item.selectedMfg === mIndex"/> |
| | | <text class="option-text">{{ mfg }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="td operation" v-if="current=='true'"> |
| | | <button class="secondary-btn" @click="uploadImages(item.id)">ä¸ä¼ /æ¥çå¾ç</button> |
| | | </view> |
| | | |
| | | <!-- è§æ ¼å --> |
| | | <view class="td spec" v-if="current!='true'"> |
| | | <view v-for="(spec, sIndex) in item.specs" :key="sIndex" |
| | | class="option-item"> |
| | | <radio :value="String(sIndex)" |
| | | :checked="item.selectedSpec === sIndex" |
| | | :disabled="true"/> |
| | | <text class="option-text">{{ spec }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- å¶é åå --> |
| | | <view class="td manufacturer" v-if="current!='true'"> |
| | | <view v-for="(mfg, mIndex) in item.manufacturers" :key="mIndex" |
| | | class="option-item"> |
| | | <radio :value="String(mIndex)" |
| | | :checked="item.selectedMfg === mIndex" |
| | | :disabled="true"/> |
| | | <text class="option-text">{{ mfg }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="td operation" v-if="current!='true'"> |
| | | <button class="secondary-btn" @click="uploadImages(item.id)">ä¸ä¼ /æ¥çå¾ç</button> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- æäº¤æé® --> |
| | | <view class="submit-container" v-if="components.length>0"> |
| | | <button v-if="this.current=='true'" class="primary-btn" |
| | | :disabled="isSubmitting" |
| | | @tap="handleSubmit"> |
| | | {{ isSubmitting ? 'æäº¤ä¸...' : 'ä¿åæ¸
å' }} |
| | | </button> |
| | | <!-- <button class="secondary-btn" @click="uploadImages">ä¸ä¼ /æ¥çå¾ç</button> --> |
| | | </view> |
| | | <view class="submit-container" v-if="components.length==0"> |
| | | <h1>温馨æç¤ºï¼</h1> |
| | | <h1>è¯¥ç©ææ²¡æç»´æ¤ä¸è´æ§æ ¸å¯¹é¡¹ç®ï¼è¯·å
ç»´æ¤ï¼</h1> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | isSubmitting: false, |
| | | formid:0, |
| | | components: [], |
| | | current:'false' |
| | | } |
| | | }, |
| | | methods: { |
| | | selectSpec(item, index) { |
| | | if (this.isSubmitting) return |
| | | item.selectedSpec = index |
| | | if (index < item.manufacturers.length) { |
| | | item.selectedMfg = index |
| | | } |
| | | }, |
| | | selectMfg(item, index) { |
| | | if (this.isSubmitting) return |
| | | item.selectedMfg = index |
| | | if (index < item.specs.length) { |
| | | item.selectedSpec = index |
| | | } |
| | | }, |
| | | uploadImages(id) { |
| | | // ä¸ä¼ /æ¥çå¾ççé»è¾ |
| | | uni.navigateTo({ |
| | | url: 'ImageItem?id=999' + id.sort()[0] |
| | | }); |
| | | }, |
| | | async handleSubmit() { |
| | | if (this.isSubmitting) return |
| | | |
| | | try { |
| | | this.isSubmitting = true |
| | | |
| | | // 表åéªè¯ |
| | | const validation = this.validateForm() |
| | | if (!validation.valid) { |
| | | uni.showToast({ |
| | | title: validation.msg, |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | // è·åæäº¤æ°æ® |
| | | const submitData = this.components.map(item => ({ |
| | | name: item.name, |
| | | spec: item.specs[item.selectedSpec], |
| | | manufacturer: item.manufacturers[item.selectedMfg], |
| | | id: item.id[item.selectedMfg] |
| | | })) |
| | | |
| | | // å®é
æäº¤æ¶å¯åæ¶æ³¨é以ä¸ä»£ç |
| | | // const res = await uni.request({ |
| | | // url: 'your_api_url', |
| | | // method: 'POST', |
| | | // data: submitData |
| | | // }) |
| | | this.$post({ |
| | | url: "/SJ/saveYzxItem", |
| | | data: { |
| | | id:this.formid, |
| | | data: submitData |
| | | } |
| | | }).then(res => { |
| | | if(res.status==0){ |
| | | uni.showToast({ |
| | | title: 'ä¿åæå', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | }else{ |
| | | uni.showModal({ |
| | | title: "æç¤º", |
| | | content: res.message, |
| | | confirmText: "ç¡®å®", |
| | | showCancel: false, |
| | | success: (res) => { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }).catch(() => { |
| | | this.isLoading = false; // åºç°é误æ¶ç»æå è½½ |
| | | }); |
| | | |
| | | |
| | | |
| | | } finally { |
| | | this.isSubmitting = false |
| | | } |
| | | }, |
| | | validateForm() { |
| | | // for (const item of this.components) { |
| | | // if (item.selectedSpec === -1 || item.selectedMfg === -1) { |
| | | // return { |
| | | // valid: false, |
| | | // msg: `${item.name} æªå®æéæ©` |
| | | // } |
| | | // } |
| | | // } |
| | | return { valid: true } |
| | | }, |
| | | onLoad(options) { |
| | | //optionsä¸å
å«äºurlé带çåæ° |
| | | let params = options; |
| | | this.formid = params["id"]; |
| | | this.current=params["current"]; |
| | | |
| | | //页é¢å è½½æ¶è°ç¨çäºä»¶ |
| | | this.$post({ |
| | | url: "/SJ/getYzxItem", |
| | | data: { |
| | | id:this.formid |
| | | } |
| | | }).then(res => { |
| | | console.log(res); |
| | | this.components=res.data |
| | | }).catch(() => { |
| | | this.isLoading = false; // åºç°é误æ¶ç»æå è½½ |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .container { |
| | | padding: 20rpx; |
| | | background-color: #f5f5f5; |
| | | min-height: 100vh; |
| | | } |
| | | |
| | | /* è¡¨æ ¼æ ·å¼ */ |
| | | .table-header, .tr { |
| | | display: flex; |
| | | border-bottom: 1rpx solid #eee; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .th, .td { |
| | | padding: 20rpx; |
| | | border-right: 1rpx solid #eee; |
| | | } |
| | | |
| | | .th { |
| | | background-color: #f8f9fa; |
| | | font-weight: bold; |
| | | color: #333; |
| | | } |
| | | |
| | | .name { width: 20%; } |
| | | .spec { width: 30%; } |
| | | .manufacturer { width: 30%; } |
| | | .operation { width: 20%; } |
| | | |
| | | /* éé¡¹æ ·å¼ */ |
| | | .option-item { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 20rpx 0; |
| | | min-height: 80rpx; |
| | | } |
| | | |
| | | radio { |
| | | transform: scale(0.9); |
| | | margin-right: 15rpx; |
| | | } |
| | | |
| | | .option-text { |
| | | flex: 1; |
| | | font-size: 28rpx; |
| | | color: #444; |
| | | } |
| | | |
| | | .primary-btn, .secondary-btn { |
| | | padding: 10px 20px; |
| | | border: none; |
| | | border-radius: 4px; |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | transition: all 0.3s; |
| | | } |
| | | |
| | | .primary-btn { |
| | | background-color: #3498db; |
| | | color: white; |
| | | } |
| | | |
| | | .primary-btn:hover { |
| | | background-color: #2980b9; |
| | | } |
| | | |
| | | /* æäº¤æé®æ ·å¼ */ |
| | | .submit-container { |
| | | /* margin: 40rpx 20rpx; */ |
| | | padding: 20rpx 0; |
| | | background-color: #fff; |
| | | /* border-radius: 16rpx; */ |
| | | } |
| | | |
| | | |
| | | /* ååºå¼éé
*/ |
| | | @media (max-width: 768px) { |
| | | .th, .td { |
| | | padding: 16rpx; |
| | | font-size: 26rpx; |
| | | } |
| | | |
| | | .option-text { |
| | | font-size: 26rpx; |
| | | } |
| | | |
| | | .submit-btn { |
| | | width: 95%; |
| | | font-size: 28rpx; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <!-- æä½æé®åº --> |
| | | <view class="action-buttons"> |
| | | <button v-if="isUpdate && !isShowTable" class="secondary-btn" @click="getItem">å建æ£éªåå¹¶çæé¨åé»è®¤å¼</button> |
| | | |
| | | <!-- <button class="secondary-btn" @click="toYzxSubmitFrom(formData.releaseNo)">ä¸è´æ§æ ¸å¯¹</button> --> |
| | | |
| | | <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="toYzxSubmitFrom(formData.releaseNo)">ä¸è´æ§æ ¸å¯¹</button> |
| | | <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="toImage">ä¸ä¼ /æ¥çå¾ç</button> |
| | | <button v-if="!isUpdate && !formData.fsubmit && !isShowTable" class="secondary-btn" @click="removeXJ"> |
| | | å é¤åæ® |
| | |
| | | }, |
| | | onLoad(options) { |
| | | //optionsä¸å
å«äºurlé带çåæ° |
| | | |
| | | |
| | | let params = options; |
| | | |
| | | if(params["current"]==='A') |
| | | { |
| | | this.current=true; |
| | | }else if(params["current"]==='B'){ |
| | | this.current=false; |
| | | } |
| | | if (params["id"]) { |
| | | this.isUpdate = false; |
| | | this.formData.id = params["id"]; |
| | |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | }, toYzxSubmitFrom(releaseNo){ |
| | | uni.navigateTo({ |
| | | url: 'yzxFrom?id=' +this.formData.id+'¤t='+this.current |
| | | }); |
| | | }, |
| | | init() { |
| | | this.$post({ |
| | | url: "/XJ/getPage", |
| | |
| | | } |
| | | }, |
| | | navigateToDetail(item) { |
| | | if (this.current === 1) { |
| | | uni.navigateTo({ |
| | | url: 'Add?id=' + item.id + '&releaseNo=' + item.releaseNo |
| | | url: 'Add?id=' + item.id + '&releaseNo=' + item.releaseNo+ |
| | | '¤t=B' |
| | | }); |
| | | }else{ |
| | | uni.navigateTo({ |
| | | url: 'Add?id=' + item.id + '&releaseNo=' + item.releaseNo+ |
| | | '¤t=A' |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | /** |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <!-- è¡¨æ ¼å¤´é¨ --> |
| | | <view class="table-header" v-if="components.length>0"> |
| | | <view class="th name">å
å¨ä»¶åç§°</view> |
| | | <view class="th spec">è§æ ¼</view> |
| | | <view class="th manufacturer">å¶é å</view> |
| | | <view class="th operation">ä¸ä¼ å¾ç</view> |
| | | |
| | | </view> |
| | | |
| | | <!-- è¡¨æ ¼å
容 --> |
| | | <view class="table-body" v-if="components.length>0"> |
| | | <!-- å¾ªç¯æ¸²æå
å¨ä»¶ --> |
| | | <view class="tr" v-for="(item, index) in components" :key="index"> |
| | | <view class="td name">{{ item.name }}</view> |
| | | |
| | | <!-- è§æ ¼å --> |
| | | <view class="td spec"v-if="current=='true'"> |
| | | <view v-for="(spec, sIndex) in item.specs" :key="sIndex" |
| | | class="option-item" @click="selectSpec(item, sIndex)"> |
| | | <radio :value="String(sIndex)" |
| | | :checked="item.selectedSpec === sIndex"/> |
| | | <text class="option-text">{{ spec }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- å¶é åå --> |
| | | <view class="td manufacturer" v-if="current=='true'"> |
| | | <view v-for="(mfg, mIndex) in item.manufacturers" :key="mIndex" |
| | | class="option-item" @click="selectMfg(item, mIndex)"> |
| | | <radio :value="String(mIndex)" |
| | | :checked="item.selectedMfg === mIndex"/> |
| | | <text class="option-text">{{ mfg }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="td operation" v-if="current=='true'"> |
| | | <button class="secondary-btn" @click="uploadImages(item.id)">ä¸ä¼ /æ¥çå¾ç</button> |
| | | </view> |
| | | |
| | | <!-- è§æ ¼å --> |
| | | <view class="td spec" v-if="current!='true'"> |
| | | <view v-for="(spec, sIndex) in item.specs" :key="sIndex" |
| | | class="option-item"> |
| | | <radio :value="String(sIndex)" |
| | | :checked="item.selectedSpec === sIndex" |
| | | :disabled="true"/> |
| | | <text class="option-text">{{ spec }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- å¶é åå --> |
| | | <view class="td manufacturer" v-if="current!='true'"> |
| | | <view v-for="(mfg, mIndex) in item.manufacturers" :key="mIndex" |
| | | class="option-item"> |
| | | <radio :value="String(mIndex)" |
| | | :checked="item.selectedMfg === mIndex" |
| | | :disabled="true"/> |
| | | <text class="option-text">{{ mfg }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="td operation" v-if="current!='true'"> |
| | | <button class="secondary-btn" @click="uploadImages(item.id)">ä¸ä¼ /æ¥çå¾ç</button> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- æäº¤æé® --> |
| | | <view class="submit-container" v-if="components.length>0"> |
| | | <button v-if="this.current=='true'" class="primary-btn" |
| | | :disabled="isSubmitting" |
| | | @tap="handleSubmit"> |
| | | {{ isSubmitting ? 'æäº¤ä¸...' : 'ä¿åæ¸
å' }} |
| | | </button> |
| | | <!-- <button class="secondary-btn" @click="uploadImages">ä¸ä¼ /æ¥çå¾ç</button> --> |
| | | </view> |
| | | <view class="submit-container" v-if="components.length==0"> |
| | | <h1>温馨æç¤ºï¼</h1> |
| | | <h1>è¯¥ç©ææ²¡æç»´æ¤ä¸è´æ§æ ¸å¯¹é¡¹ç®ï¼è¯·å
ç»´æ¤ï¼</h1> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | isSubmitting: false, |
| | | formid:0, |
| | | components: [], |
| | | current:'false' |
| | | } |
| | | }, |
| | | methods: { |
| | | selectSpec(item, index) { |
| | | if (this.isSubmitting) return |
| | | item.selectedSpec = index |
| | | if (index < item.manufacturers.length) { |
| | | item.selectedMfg = index |
| | | } |
| | | }, |
| | | selectMfg(item, index) { |
| | | if (this.isSubmitting) return |
| | | item.selectedMfg = index |
| | | if (index < item.specs.length) { |
| | | item.selectedSpec = index |
| | | } |
| | | }, |
| | | uploadImages(id) { |
| | | // ä¸ä¼ /æ¥çå¾ççé»è¾ |
| | | uni.navigateTo({ |
| | | url: 'ImageItem?id=777' + id.sort()[0] |
| | | }); |
| | | }, |
| | | async handleSubmit() { |
| | | if (this.isSubmitting) return |
| | | |
| | | try { |
| | | this.isSubmitting = true |
| | | |
| | | // 表åéªè¯ |
| | | const validation = this.validateForm() |
| | | if (!validation.valid) { |
| | | uni.showToast({ |
| | | title: validation.msg, |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | // è·åæäº¤æ°æ® |
| | | const submitData = this.components.map(item => ({ |
| | | name: item.name, |
| | | spec: item.specs[item.selectedSpec], |
| | | manufacturer: item.manufacturers[item.selectedMfg], |
| | | id: item.id[item.selectedMfg] |
| | | })) |
| | | |
| | | // å®é
æäº¤æ¶å¯åæ¶æ³¨é以ä¸ä»£ç |
| | | // const res = await uni.request({ |
| | | // url: 'your_api_url', |
| | | // method: 'POST', |
| | | // data: submitData |
| | | // }) |
| | | this.$post({ |
| | | url: "/XJ/saveYzxItem", |
| | | data: { |
| | | id:this.formid, |
| | | data: submitData |
| | | } |
| | | }).then(res => { |
| | | if(res.status==0){ |
| | | uni.showToast({ |
| | | title: 'ä¿åæå', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | }else{ |
| | | uni.showModal({ |
| | | title: "æç¤º", |
| | | content: res.message, |
| | | confirmText: "ç¡®å®", |
| | | showCancel: false, |
| | | success: (res) => { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }).catch(() => { |
| | | this.isLoading = false; // åºç°é误æ¶ç»æå è½½ |
| | | }); |
| | | |
| | | |
| | | |
| | | } finally { |
| | | this.isSubmitting = false |
| | | } |
| | | }, |
| | | validateForm() { |
| | | // for (const item of this.components) { |
| | | // if (item.selectedSpec === -1 || item.selectedMfg === -1) { |
| | | // return { |
| | | // valid: false, |
| | | // msg: `${item.name} æªå®æéæ©` |
| | | // } |
| | | // } |
| | | // } |
| | | return { valid: true } |
| | | }, |
| | | onLoad(options) { |
| | | //optionsä¸å
å«äºurlé带çåæ° |
| | | let params = options; |
| | | this.formid = params["id"]; |
| | | this.current=params["current"]; |
| | | |
| | | //页é¢å è½½æ¶è°ç¨çäºä»¶ |
| | | this.$post({ |
| | | url: "/XJ/getYzxItem", |
| | | data: { |
| | | id:this.formid |
| | | } |
| | | }).then(res => { |
| | | console.log(res); |
| | | this.components=res.data |
| | | }).catch(() => { |
| | | this.isLoading = false; // åºç°é误æ¶ç»æå è½½ |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .container { |
| | | padding: 20rpx; |
| | | background-color: #f5f5f5; |
| | | min-height: 100vh; |
| | | } |
| | | |
| | | /* è¡¨æ ¼æ ·å¼ */ |
| | | .table-header, .tr { |
| | | display: flex; |
| | | border-bottom: 1rpx solid #eee; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .th, .td { |
| | | padding: 20rpx; |
| | | border-right: 1rpx solid #eee; |
| | | } |
| | | |
| | | .th { |
| | | background-color: #f8f9fa; |
| | | font-weight: bold; |
| | | color: #333; |
| | | } |
| | | |
| | | .name { width: 20%; } |
| | | .spec { width: 30%; } |
| | | .manufacturer { width: 30%; } |
| | | .operation { width: 20%; } |
| | | |
| | | /* éé¡¹æ ·å¼ */ |
| | | .option-item { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 20rpx 0; |
| | | min-height: 80rpx; |
| | | } |
| | | |
| | | radio { |
| | | transform: scale(0.9); |
| | | margin-right: 15rpx; |
| | | } |
| | | |
| | | .option-text { |
| | | flex: 1; |
| | | font-size: 28rpx; |
| | | color: #444; |
| | | } |
| | | |
| | | .primary-btn, .secondary-btn { |
| | | padding: 10px 20px; |
| | | border: none; |
| | | border-radius: 4px; |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | transition: all 0.3s; |
| | | } |
| | | |
| | | .primary-btn { |
| | | background-color: #3498db; |
| | | color: white; |
| | | } |
| | | |
| | | .primary-btn:hover { |
| | | background-color: #2980b9; |
| | | } |
| | | |
| | | /* æäº¤æé®æ ·å¼ */ |
| | | .submit-container { |
| | | /* margin: 40rpx 20rpx; */ |
| | | padding: 20rpx 0; |
| | | background-color: #fff; |
| | | /* border-radius: 16rpx; */ |
| | | } |
| | | |
| | | |
| | | /* ååºå¼éé
*/ |
| | | @media (max-width: 768px) { |
| | | .th, .td { |
| | | padding: 16rpx; |
| | | font-size: 26rpx; |
| | | } |
| | | |
| | | .option-text { |
| | | font-size: 26rpx; |
| | | } |
| | | |
| | | .submit-btn { |
| | | width: 95%; |
| | | font-size: 28rpx; |
| | | } |
| | | } |
| | | </style> |