apply-clients 3.3.36 → 3.3.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/css-loaders.js +34 -0
- package/build/dev-android.js +101 -0
- package/build/dev-client.js +8 -0
- package/build/dev-server-app.js +76 -0
- package/build/dev-server.js +130 -0
- package/build/example-server.js +80 -0
- package/build/release.sh +28 -0
- package/build/utils.js +80 -0
- package/build/webpack.base.conf.js +84 -0
- package/build/webpack.baseandroid.conf.js +84 -0
- package/build/webpack.dev.conf.js +39 -0
- package/build/webpack.devandroid.conf.js +34 -0
- package/build/webpack.example.conf.js +49 -0
- package/build/webpack.prod.conf.js +60 -0
- package/build/webpack.prodandroid.conf.js +60 -0
- package/build/webpack.test.conf.js +31 -0
- package/index.html +33 -33
- package/package.json +1 -1
- package/src/AndroidApp.vue +30 -30
- package/src/android.js +21 -21
- package/src/apply.js +1 -8
- package/src/applyAndroid.js +1 -8
- package/src/components/android/AppOnetomany.vue +305 -305
- package/src/components/android/AppServiceView.vue +1 -1
- package/src/components/android/AppTakePic.vue +143 -143
- package/src/components/android/Function/AppFunctionServiceControl.vue +344 -344
- package/src/components/android/Function/AppInstallFunction.vue +1 -1
- package/src/components/android/Process/AppExplorationUser.vue +1 -1
- package/src/components/android/Process/AppServiceControl.vue +1 -0
- package/src/components/android/Process/Processes/AppChargeManagement.vue +468 -468
- package/src/components/android/Process/Processes/AppDevicesManagement.vue +508 -508
- package/src/components/android/Process/Processes/AppInstallationDetails.vue +471 -471
- package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +297 -297
- package/src/components/android/Supervisory/AppProcessSupervisory.vue +1 -1
- package/src/components/android/Supervisory/AppSupervisoryCart.vue +115 -115
- package/src/components/product/ApplyCharge/ApplyChargeList.vue +59 -13
- package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +30 -30
- package/src/components/product/Function/InstallFunction.vue +10 -0
- package/src/components/product/Function/InstallInfoSelect.vue +4 -0
- package/src/components/product/Function/Service/FunctionServiceControl.vue +4 -4
- package/src/components/product/Install/InstallProject.vue +194 -194
- package/src/components/product/Material/MaterialDetailed.vue +12 -1
- package/src/components/product/OldApply/Handle/HandleApply.vue +3 -0
- package/src/components/product/OldApply/Monitor/MonitorApply.vue +3 -0
- package/src/components/product/OldApply/OldApply.vue +2 -2
- package/src/components/product/OldApply/OldApplyMessage.vue +411 -411
- package/src/components/product/Onetomany.vue +381 -381
- package/src/components/product/Order/OrderApply.vue +47 -47
- package/src/components/product/Order/OrderApplyList.vue +263 -263
- package/src/components/product/Order/OrderMessage.vue +237 -237
- package/src/components/product/Process/ExplorationSelect.vue +4 -0
- package/src/components/product/Process/ExplorationUser.vue +10 -0
- package/src/components/product/Process/Processes/InstallationDetails.vue +17 -3
- package/src/components/product/Process/Processes/Print/printBuildOrder.vue +8 -29
- package/src/components/product/Process/Processes/Print/printCharge.vue +142 -142
- package/src/components/product/Process/Processes/Print/printRefund.vue +1 -1
- package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +19 -3
- package/src/components/product/Process/Processes/chargeManagement.vue +1 -1
- package/src/components/product/Process/Processes/devicesManagement.vue +478 -478
- package/src/components/product/Process/Processes/selectApply.vue +250 -250
- package/src/components/product/Process/Processes/selectUserinfo.vue +182 -182
- package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
- package/src/components/product/Process/Service/ServiceControl.vue +2 -1
- package/src/components/product/Process/ShowBackReason.vue +33 -33
- package/src/components/product/ServiceView.vue +1 -1
- package/src/components/product/Stop/StopApply.vue +101 -101
- package/src/components/product/Stop/StopApplyList.vue +271 -271
- package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +804 -804
- package/src/components/product/Supervisory/SupervisoryControl.vue +10 -0
- package/src/components/product/Supervisory/SupervisoryList.vue +4 -0
- package/src/components/product/Supervisory/SupervisoryhCart.vue +124 -124
- package/src/components/product/VueUtils/ApplyUpload.vue +262 -262
- package/src/components/product/VueUtils/GaoPaiYi/HighMeter.vue +1090 -1090
- package/src/main.js +23 -23
- package/dist-android/index.html +0 -3
- package/dist-android/static/.gitkeep +0 -0
- package/dist-android/static/0.js +0 -2
- package/dist-android/static/0.js.map +0 -1
- package/dist-android/static/1.js +0 -2
- package/dist-android/static/1.js.map +0 -1
- package/dist-android/static/10.js +0 -2
- package/dist-android/static/10.js.map +0 -1
- package/dist-android/static/100.js +0 -2
- package/dist-android/static/100.js.map +0 -1
- package/dist-android/static/11.js +0 -2
- package/dist-android/static/11.js.map +0 -1
- package/dist-android/static/12.js +0 -2
- package/dist-android/static/12.js.map +0 -1
- package/dist-android/static/13.js +0 -2
- package/dist-android/static/13.js.map +0 -1
- package/dist-android/static/14.js +0 -2
- package/dist-android/static/14.js.map +0 -1
- package/dist-android/static/15.js +0 -2
- package/dist-android/static/15.js.map +0 -1
- package/dist-android/static/16.js +0 -2
- package/dist-android/static/16.js.map +0 -1
- package/dist-android/static/17.js +0 -2
- package/dist-android/static/17.js.map +0 -1
- package/dist-android/static/18.js +0 -2
- package/dist-android/static/18.js.map +0 -1
- package/dist-android/static/19.js +0 -2
- package/dist-android/static/19.js.map +0 -1
- package/dist-android/static/2.js +0 -2
- package/dist-android/static/2.js.map +0 -1
- package/dist-android/static/20.js +0 -2
- package/dist-android/static/20.js.map +0 -1
- package/dist-android/static/21.js +0 -2
- package/dist-android/static/21.js.map +0 -1
- package/dist-android/static/22.js +0 -2
- package/dist-android/static/22.js.map +0 -1
- package/dist-android/static/23.js +0 -2
- package/dist-android/static/23.js.map +0 -1
- package/dist-android/static/24.js +0 -2
- package/dist-android/static/24.js.map +0 -1
- package/dist-android/static/25.js +0 -2
- package/dist-android/static/25.js.map +0 -1
- package/dist-android/static/26.js +0 -2
- package/dist-android/static/26.js.map +0 -1
- package/dist-android/static/27.js +0 -2
- package/dist-android/static/27.js.map +0 -1
- package/dist-android/static/28.js +0 -2
- package/dist-android/static/28.js.map +0 -1
- package/dist-android/static/29.js +0 -2
- package/dist-android/static/29.js.map +0 -1
- package/dist-android/static/3.js +0 -2
- package/dist-android/static/3.js.map +0 -1
- package/dist-android/static/30.js +0 -2
- package/dist-android/static/30.js.map +0 -1
- package/dist-android/static/31.js +0 -2
- package/dist-android/static/31.js.map +0 -1
- package/dist-android/static/32.js +0 -2
- package/dist-android/static/32.js.map +0 -1
- package/dist-android/static/33.js +0 -2
- package/dist-android/static/33.js.map +0 -1
- package/dist-android/static/34.js +0 -2
- package/dist-android/static/34.js.map +0 -1
- package/dist-android/static/35.js +0 -2
- package/dist-android/static/35.js.map +0 -1
- package/dist-android/static/36.js +0 -2
- package/dist-android/static/36.js.map +0 -1
- package/dist-android/static/37.js +0 -2
- package/dist-android/static/37.js.map +0 -1
- package/dist-android/static/38.js +0 -2
- package/dist-android/static/38.js.map +0 -1
- package/dist-android/static/39.js +0 -2
- package/dist-android/static/39.js.map +0 -1
- package/dist-android/static/4.js +0 -2
- package/dist-android/static/4.js.map +0 -1
- package/dist-android/static/40.js +0 -2
- package/dist-android/static/40.js.map +0 -1
- package/dist-android/static/41.js +0 -2
- package/dist-android/static/41.js.map +0 -1
- package/dist-android/static/42.js +0 -2
- package/dist-android/static/42.js.map +0 -1
- package/dist-android/static/43.js +0 -2
- package/dist-android/static/43.js.map +0 -1
- package/dist-android/static/44.js +0 -2
- package/dist-android/static/44.js.map +0 -1
- package/dist-android/static/45.js +0 -2
- package/dist-android/static/45.js.map +0 -1
- package/dist-android/static/46.js +0 -2
- package/dist-android/static/46.js.map +0 -1
- package/dist-android/static/47.js +0 -2
- package/dist-android/static/47.js.map +0 -1
- package/dist-android/static/48.js +0 -2
- package/dist-android/static/48.js.map +0 -1
- package/dist-android/static/49.js +0 -2
- package/dist-android/static/49.js.map +0 -1
- package/dist-android/static/5.js +0 -2
- package/dist-android/static/5.js.map +0 -1
- package/dist-android/static/50.js +0 -2
- package/dist-android/static/50.js.map +0 -1
- package/dist-android/static/51.js +0 -2
- package/dist-android/static/51.js.map +0 -1
- package/dist-android/static/52.js +0 -2
- package/dist-android/static/52.js.map +0 -1
- package/dist-android/static/53.js +0 -2
- package/dist-android/static/53.js.map +0 -1
- package/dist-android/static/54.js +0 -2
- package/dist-android/static/54.js.map +0 -1
- package/dist-android/static/55.js +0 -2
- package/dist-android/static/55.js.map +0 -1
- package/dist-android/static/56.js +0 -2
- package/dist-android/static/56.js.map +0 -1
- package/dist-android/static/57.js +0 -2
- package/dist-android/static/57.js.map +0 -1
- package/dist-android/static/58.js +0 -2
- package/dist-android/static/58.js.map +0 -1
- package/dist-android/static/59.js +0 -2
- package/dist-android/static/59.js.map +0 -1
- package/dist-android/static/6.js +0 -2
- package/dist-android/static/6.js.map +0 -1
- package/dist-android/static/60.js +0 -2
- package/dist-android/static/60.js.map +0 -1
- package/dist-android/static/61.js +0 -2
- package/dist-android/static/61.js.map +0 -1
- package/dist-android/static/62.js +0 -2
- package/dist-android/static/62.js.map +0 -1
- package/dist-android/static/63.js +0 -2
- package/dist-android/static/63.js.map +0 -1
- package/dist-android/static/64.js +0 -2
- package/dist-android/static/64.js.map +0 -1
- package/dist-android/static/65.js +0 -2
- package/dist-android/static/65.js.map +0 -1
- package/dist-android/static/66.js +0 -2
- package/dist-android/static/66.js.map +0 -1
- package/dist-android/static/67.js +0 -2
- package/dist-android/static/67.js.map +0 -1
- package/dist-android/static/68.js +0 -2
- package/dist-android/static/68.js.map +0 -1
- package/dist-android/static/69.js +0 -2
- package/dist-android/static/69.js.map +0 -1
- package/dist-android/static/7.js +0 -6
- package/dist-android/static/7.js.map +0 -1
- package/dist-android/static/70.js +0 -2
- package/dist-android/static/70.js.map +0 -1
- package/dist-android/static/71.js +0 -2
- package/dist-android/static/71.js.map +0 -1
- package/dist-android/static/72.js +0 -2
- package/dist-android/static/72.js.map +0 -1
- package/dist-android/static/73.js +0 -2
- package/dist-android/static/73.js.map +0 -1
- package/dist-android/static/74.js +0 -2
- package/dist-android/static/74.js.map +0 -1
- package/dist-android/static/75.js +0 -2
- package/dist-android/static/75.js.map +0 -1
- package/dist-android/static/76.js +0 -2
- package/dist-android/static/76.js.map +0 -1
- package/dist-android/static/77.js +0 -2
- package/dist-android/static/77.js.map +0 -1
- package/dist-android/static/78.js +0 -2
- package/dist-android/static/78.js.map +0 -1
- package/dist-android/static/79.js +0 -2
- package/dist-android/static/79.js.map +0 -1
- package/dist-android/static/8.js +0 -2
- package/dist-android/static/8.js.map +0 -1
- package/dist-android/static/80.js +0 -2
- package/dist-android/static/80.js.map +0 -1
- package/dist-android/static/81.js +0 -2
- package/dist-android/static/81.js.map +0 -1
- package/dist-android/static/82.js +0 -2
- package/dist-android/static/82.js.map +0 -1
- package/dist-android/static/83.js +0 -2
- package/dist-android/static/83.js.map +0 -1
- package/dist-android/static/84.js +0 -2
- package/dist-android/static/84.js.map +0 -1
- package/dist-android/static/85.js +0 -2
- package/dist-android/static/85.js.map +0 -1
- package/dist-android/static/86.js +0 -2
- package/dist-android/static/86.js.map +0 -1
- package/dist-android/static/87.js +0 -2
- package/dist-android/static/87.js.map +0 -1
- package/dist-android/static/88.js +0 -2
- package/dist-android/static/88.js.map +0 -1
- package/dist-android/static/89.js +0 -2
- package/dist-android/static/89.js.map +0 -1
- package/dist-android/static/9.js +0 -3
- package/dist-android/static/9.js.map +0 -1
- package/dist-android/static/90.js +0 -2
- package/dist-android/static/90.js.map +0 -1
- package/dist-android/static/91.js +0 -2
- package/dist-android/static/91.js.map +0 -1
- package/dist-android/static/92.js +0 -2
- package/dist-android/static/92.js.map +0 -1
- package/dist-android/static/93.js +0 -2
- package/dist-android/static/93.js.map +0 -1
- package/dist-android/static/94.js +0 -2
- package/dist-android/static/94.js.map +0 -1
- package/dist-android/static/95.js +0 -2
- package/dist-android/static/95.js.map +0 -1
- package/dist-android/static/96.js +0 -2
- package/dist-android/static/96.js.map +0 -1
- package/dist-android/static/97.js +0 -2
- package/dist-android/static/97.js.map +0 -1
- package/dist-android/static/98.js +0 -2
- package/dist-android/static/98.js.map +0 -1
- package/dist-android/static/99.js +0 -2
- package/dist-android/static/99.js.map +0 -1
- package/dist-android/static/app.css +0 -2
- package/dist-android/static/app.css.map +0 -1
- package/dist-android/static/app.js +0 -80
- package/dist-android/static/app.js.map +0 -1
- package/dist-android/static/batchleft.png +0 -0
- package/dist-android/static/batchright.png +0 -0
- package/dist-android/static/bluemainbg.jpg +0 -0
- package/dist-android/static/config.json +0 -7
- package/dist-android/static/denglu.png +0 -0
- package/dist-android/static/glyphicons-halflings-regular.eot +0 -0
- package/dist-android/static/glyphicons-halflings-regular.svg +0 -288
- package/dist-android/static/glyphicons-halflings-regular.ttf +0 -0
- package/dist-android/static/glyphicons-halflings-regular.woff +0 -0
- package/dist-android/static/glyphicons-halflings-regular.woff2 +0 -0
- package/dist-android/static/huangtengbiaozhi.png +0 -0
- package/dist-android/static/jingyin.jpg +0 -0
- package/dist-android/static/login_bg.jpg +0 -0
- package/dist-android/static/login_title.png +0 -0
- package/dist-android/static/login_title1.png +0 -0
- package/dist-android/static/loginbg.jpg +0 -0
- package/dist-android/static/loginlogo.png +0 -0
- package/dist-android/static/main_logo.png +0 -0
- package/dist-android/static/mainbg.jpg +0 -0
- package/dist-android/static/menulogo.png +0 -0
- package/dist-android/static/newmainbg.jpg +0 -0
- package/dist-android/static/psicon.png +0 -0
- package/dist-android/static/singleleft.png +0 -0
- package/dist-android/static/singleright.png +0 -0
- package/dist-android/static/treeopen.png +0 -0
- package/dist-android/static/treeout.png +0 -0
- package/dist-android/static/treeset.png +0 -0
- package/dist-android/static/usericon.png +0 -0
- package/dist-android/static/workflow_apply.json +0 -766
- package/dist-android/static/xinxi.png +0 -0
- package/dist-android/static//344/277/256/346/224/271/345/257/206/347/240/201.png +0 -0
- package/dist-android/static//345/256/211/346/243/200/345/257/274/350/210/252/347/253/226/345/261/2173.png +0 -0
- package/dist-android/static//345/257/274/345/207/272/346/225/260/346/215/256.png +0 -0
- package/dist-android/static//346/270/205/347/251/272/346/225/260/346/215/256.png +0 -0
- package/src/filiale/wuan/android.js +0 -0
- package/src/filiale/wuan/pc.js +0 -4
- package/src/filiale/yuchuan/android/AppServiceView.vue +0 -599
- package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +0 -414
- package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +0 -456
- package/src/filiale/yuchuan/android/Reserve/ApplyReserve.vue +0 -200
- package/src/filiale/yuchuan/android/SiteSurvey/TaskGraph.vue +0 -137
- package/src/filiale/yuchuan/android.js +0 -8
- package/src/filiale/yuchuan/pc/Order/OrderApply.vue +0 -517
- package/src/filiale/yuchuan/pc/Order/OrderApplyList.vue +0 -343
- package/src/filiale/yuchuan/pc/Process/ExplorationSelect.vue +0 -356
- package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +0 -131
- package/src/filiale/yuchuan/pc/Process/Processes/MapCom.vue +0 -51
- package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +0 -517
- package/src/filiale/yuchuan/pc.js +0 -13
|
@@ -1,305 +1,305 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="col-sm-12 col-xs-12 form-group app-btn">
|
|
4
|
-
<button
|
|
5
|
-
:class="onetomany.add.class || 'btn btn-info'"
|
|
6
|
-
@click.prevent="openAdd()"
|
|
7
|
-
v-if="!onetomany.add.hidden"
|
|
8
|
-
:style="onetomany.add.style || ''">
|
|
9
|
-
{{ onetomany.add.text || '添加'}}
|
|
10
|
-
</button>
|
|
11
|
-
</div>
|
|
12
|
-
<div class="col-sm-12 col-xs-12">
|
|
13
|
-
<list :model="onetomany" partial='list'>
|
|
14
|
-
<div partial class="auto app-text panel">
|
|
15
|
-
<div class="panel-body panel-self">
|
|
16
|
-
<div class="row" v-for="field in $parent.$parent.onetomany.fields" v-if="!field.displayPosition || field.displayPosition === 'list'">
|
|
17
|
-
<p class="col-xs-3 text-left font label-justify"><b>{{ field.label }}</b></p>
|
|
18
|
-
<p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row[field.field] }}</p>
|
|
19
|
-
</div>
|
|
20
|
-
<div class="row text-right" v-if="!$parent.$parent.onetomany.hiddenOperate">
|
|
21
|
-
<button
|
|
22
|
-
:class="$parent.$parent.onetomany.update.style || 'btn btn-warning'"
|
|
23
|
-
@click.prevent="$parent.$parent.openUpdate($index)"
|
|
24
|
-
v-if="!$parent.$parent.onetomany.update.hidden"
|
|
25
|
-
:style="$parent.$parent.onetomany.update.style || ''">
|
|
26
|
-
{{ $parent.$parent.onetomany.update.text || '修改'}}
|
|
27
|
-
</button>
|
|
28
|
-
<button
|
|
29
|
-
:class="$parent.$parent.onetomany.delete.style || 'btn btn-danger'"
|
|
30
|
-
@click.prevent="$parent.$parent.openDelete($index)"
|
|
31
|
-
v-if="!$parent.$parent.onetomany.delete.hidden"
|
|
32
|
-
:style="$parent.$parent.onetomany.delete.style || ''">
|
|
33
|
-
{{ $parent.$parent.onetomany.delete.text || '删除'}}
|
|
34
|
-
</button>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</list>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<!-- onetomany模态框 -->
|
|
43
|
-
<modal v-if="showModal" :show.sync="showModal" backdrop="false" :large="onetomany.modalSize === 'large' ? true : false" :small="onetomany.modalSize === 'small' ? true : false">
|
|
44
|
-
<header slot="modal-header" class="modal-header">
|
|
45
|
-
<button type="button" class="close" @click="closeModal()"><span>×</span></button>
|
|
46
|
-
<span class="modal-title"><font
|
|
47
|
-
size="3">{{modelTitle}}</font></span>
|
|
48
|
-
</header>
|
|
49
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
50
|
-
<div v-for="(index,item) in onetomany.fields">
|
|
51
|
-
<!--input-->
|
|
52
|
-
<div :style="item.style ? item.style : ''"
|
|
53
|
-
v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'app' || !item.device)"
|
|
54
|
-
:class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped + ' form-group app-input':'col-xs-12 form-group app-input']">
|
|
55
|
-
<label class="control-label-justify">{{item.label}}</label>
|
|
56
|
-
<div :style="item.value_style ? item.value_style:''"
|
|
57
|
-
:class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
|
|
58
|
-
<input class="" style="width: 100%"
|
|
59
|
-
:type="item.type"
|
|
60
|
-
v-model="onetomany.fields[index].value"
|
|
61
|
-
:placeholder="item.placeholder"
|
|
62
|
-
:value="onetomany.fields[index].value"
|
|
63
|
-
:readonly="item.readonly"
|
|
64
|
-
:disabled="item.disabled"
|
|
65
|
-
@change="onchange(index)"
|
|
66
|
-
@blur="onblur(index)"
|
|
67
|
-
@input="oninput(index)"
|
|
68
|
-
/>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
|
|
72
|
-
<!--select-->
|
|
73
|
-
<div :style="item.style ? item.style : ''"
|
|
74
|
-
v-if="item.type==='select' && !item.hidden && (item.device === 'app' || !item.device)"
|
|
75
|
-
:class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped + ' form-group app-input':'col-xs-12 form-group app-input']">
|
|
76
|
-
<label class="control-label-justify">{{item.label}}</label>
|
|
77
|
-
<div :style="item.value_style ? item.value_style:''"
|
|
78
|
-
:class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
|
|
79
|
-
<v-select
|
|
80
|
-
class="select" width="100%" align="right"
|
|
81
|
-
:placeholder="item.placeholder"
|
|
82
|
-
:search="item.search"
|
|
83
|
-
close-on-select value-single
|
|
84
|
-
:options="item.options"
|
|
85
|
-
v-model="onetomany.fields[index].value"
|
|
86
|
-
:value.sync="onetomany.fields[index].value"
|
|
87
|
-
:readonly="item.readonly"
|
|
88
|
-
:disabled="item.disabled"
|
|
89
|
-
@blur="onblur(index)"
|
|
90
|
-
@change="onchange(index)"
|
|
91
|
-
></v-select>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
|
|
95
|
-
<!--时间datepicker-->
|
|
96
|
-
<div :style="item.style ? item.style : ''"
|
|
97
|
-
v-if="item.type==='datepicker' && !item.hidden && (item.device === 'app' || !item.device)"
|
|
98
|
-
:class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped+' form-group app-input':'col-xs-12 form-group app-input']">
|
|
99
|
-
<label class="control-label-justify">{{item.label}}</label>
|
|
100
|
-
<div :style="item.value_style ? item.value_style:''"
|
|
101
|
-
:class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
|
|
102
|
-
<datepicker
|
|
103
|
-
:placeholder="item.placeholder"
|
|
104
|
-
:value.sync="onetomany.fields[index].value"
|
|
105
|
-
:format="item.format ? item.format : 'yyyy-MM-dd'"
|
|
106
|
-
v-model="onetomany.fields[index].value"
|
|
107
|
-
:readonly="item.readonly"
|
|
108
|
-
:disabled="item.disabled"
|
|
109
|
-
@change="onchange(index)"
|
|
110
|
-
@blur="onblur(index)"
|
|
111
|
-
:show-reset-button="true">
|
|
112
|
-
</datepicker>
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
115
|
-
|
|
116
|
-
<!--textarea-->
|
|
117
|
-
<div :style="item.style ? item.style : ''"
|
|
118
|
-
v-if="item.type==='textarea' && !item.hidden && (item.device === 'app' || !item.device)"
|
|
119
|
-
:class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped?item.bootstraped+' form-group app-input':'col-xs-12 form-group app-input']">
|
|
120
|
-
<label class="control-label-justify">{{item.label}}</label>
|
|
121
|
-
<div :style="item.value_style ? item.value_style:''"
|
|
122
|
-
:class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
|
|
123
|
-
<textarea
|
|
124
|
-
:readonly="item.readonly"
|
|
125
|
-
:disabled="item.disabled"
|
|
126
|
-
class="" rows="1"
|
|
127
|
-
style="width: 100%;height: 100%"
|
|
128
|
-
v-model="onetomany.fields[index].value"
|
|
129
|
-
:value="onetomany.fields[index].value"
|
|
130
|
-
@change="onchange(index)"
|
|
131
|
-
@blur="onblur(index)"
|
|
132
|
-
@input="oninput(index)"
|
|
133
|
-
></textarea>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
</article>
|
|
138
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
139
|
-
<button :class="disableButton?'btn btn-default':'btn btn-primary'"
|
|
140
|
-
:disabled="disableButton" type="button" @click.prevent="confirmModal()">
|
|
141
|
-
确认
|
|
142
|
-
</button>
|
|
143
|
-
</footer>
|
|
144
|
-
</modal>
|
|
145
|
-
</div>
|
|
146
|
-
</template>
|
|
147
|
-
|
|
148
|
-
<script>
|
|
149
|
-
import {HttpResetClass} from 'vue-client'
|
|
150
|
-
import {guid, toStandardTimeString} from '../Util'
|
|
151
|
-
import Vue from 'vue'
|
|
152
|
-
export default {
|
|
153
|
-
title: 'onetomany',
|
|
154
|
-
props: ['onetomany', 'index'],
|
|
155
|
-
data () {
|
|
156
|
-
return {
|
|
157
|
-
showModal: false,
|
|
158
|
-
disableButton: true,
|
|
159
|
-
modelTitle: null,
|
|
160
|
-
rowIndex: null
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
ready () {
|
|
164
|
-
},
|
|
165
|
-
methods: {
|
|
166
|
-
confirmModal () {
|
|
167
|
-
if (this.modelTitle === '新增') {
|
|
168
|
-
if (this.onetomany.add.event) {
|
|
169
|
-
this.$dispatch(this.onetomany.add.event, this.index)
|
|
170
|
-
} else {
|
|
171
|
-
this.$dispatch('onetomanyadd', this.index)
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
if (this.modelTitle === '修改') {
|
|
175
|
-
if (this.onetomany.update.event) {
|
|
176
|
-
this.$dispatch(this.onetomany.update.event, this.index, this.rowIndex)
|
|
177
|
-
} else {
|
|
178
|
-
this.$dispatch('onetomanyupdate', this.index, this.rowIndex)
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
this.closeModal()
|
|
183
|
-
},
|
|
184
|
-
onchange (fieldIndex) {
|
|
185
|
-
this.disableModalButton()
|
|
186
|
-
if (this.onetomany.fields[fieldIndex].onchange) {
|
|
187
|
-
this.$dispatch(this.onetomany.fields[fieldIndex].onchange, this.index, fieldIndex)
|
|
188
|
-
} else {
|
|
189
|
-
this.$dispatch('onchangeModal', this.index, fieldIndex)
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
onblur (fieldIndex) {
|
|
193
|
-
this.disableModalButton()
|
|
194
|
-
if (this.onetomany.fields[fieldIndex].onblur) {
|
|
195
|
-
this.$dispatch(this.onetomany.fields[fieldIndex].onblur, this.index, fieldIndex)
|
|
196
|
-
} else {
|
|
197
|
-
this.$dispatch('onblurModal', this.index, fieldIndex)
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
oninput (fieldIndex) {
|
|
201
|
-
this.disableModalButton()
|
|
202
|
-
if (this.onetomany.fields[fieldIndex].oninput) {
|
|
203
|
-
this.$dispatch(this.onetomany.fields[fieldIndex].oninput, this.index, fieldIndex)
|
|
204
|
-
} else {
|
|
205
|
-
this.$dispatch('oninputModal', this.index, fieldIndex)
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
openDelete (rowIndex) {
|
|
209
|
-
this.$showMessage(this.onetomany.delete.message ? this.onetomany.delete.message : '您确定要删除这条记录吗?', ['confirm']).then((res) => {
|
|
210
|
-
if (res === 'confirm') {
|
|
211
|
-
if (this.onetomany.delete.event) {
|
|
212
|
-
this.$dispatch(this.onetomany.delete.event, this.index, rowIndex)
|
|
213
|
-
} else {
|
|
214
|
-
this.$dispatch('onetomanydelete', this.index, rowIndex)
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
})
|
|
218
|
-
},
|
|
219
|
-
// 修改
|
|
220
|
-
openUpdate (rowIndex) {
|
|
221
|
-
let row = this.onetomany.rows[rowIndex]
|
|
222
|
-
for (const item of this.onetomany.fields) {
|
|
223
|
-
item.value = row[item.field]
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
this.disableModalButton()
|
|
227
|
-
|
|
228
|
-
this.modelTitle = '修改'
|
|
229
|
-
this.rowIndex = rowIndex
|
|
230
|
-
|
|
231
|
-
if (this.onetomany.update.openEvent) {
|
|
232
|
-
this.$dispatch(this.onetomany.update.openEvent, this.index, this.rowIndex)
|
|
233
|
-
}
|
|
234
|
-
this.$dispatch('openUpdateModel', this.index, this.rowIndex)
|
|
235
|
-
|
|
236
|
-
this.showModal = true
|
|
237
|
-
},
|
|
238
|
-
openAdd () {
|
|
239
|
-
this.disableModalButton()
|
|
240
|
-
this.modelTitle = '新增'
|
|
241
|
-
|
|
242
|
-
if (this.onetomany.add.openEvent) {
|
|
243
|
-
this.$dispatch(this.onetomany.add.openEvent, this.index)
|
|
244
|
-
}
|
|
245
|
-
this.$dispatch('openAddModel', this.index)
|
|
246
|
-
|
|
247
|
-
this.showModal = true
|
|
248
|
-
},
|
|
249
|
-
closeModal () {
|
|
250
|
-
this.showModal = false
|
|
251
|
-
this.disableButton = false
|
|
252
|
-
this.modelTitle = null
|
|
253
|
-
this.rowIndex = null
|
|
254
|
-
|
|
255
|
-
for (const item of this.onetomany.fields) {
|
|
256
|
-
item.value = null
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
// 是否禁用按钮
|
|
260
|
-
disableModalButton () {
|
|
261
|
-
let flag = false
|
|
262
|
-
|
|
263
|
-
for (const field of this.onetomany.fields) {
|
|
264
|
-
if (field.required && !field.value) {
|
|
265
|
-
if (field.value === 0) {
|
|
266
|
-
flag = false
|
|
267
|
-
} else {
|
|
268
|
-
flag = true
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
this.disableButton = flag
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
computed: {
|
|
277
|
-
},
|
|
278
|
-
events: {
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
</script>
|
|
282
|
-
|
|
283
|
-
<style scoped>
|
|
284
|
-
.control-label-justify {
|
|
285
|
-
width: 30%;
|
|
286
|
-
text-align: justify;
|
|
287
|
-
text-align-last: justify;
|
|
288
|
-
font-family: PingFang-SC-Bold;
|
|
289
|
-
float: left;
|
|
290
|
-
}
|
|
291
|
-
.label-justify {
|
|
292
|
-
text-align: justify;
|
|
293
|
-
text-align-last: justify;
|
|
294
|
-
float: left;
|
|
295
|
-
}
|
|
296
|
-
.panel-self{
|
|
297
|
-
border-radius: 10px;
|
|
298
|
-
border:1px solid #499EDF;
|
|
299
|
-
background-color: #F8F8F8;
|
|
300
|
-
}
|
|
301
|
-
.font{
|
|
302
|
-
font: 15px PingFang-SC-Medium;
|
|
303
|
-
color: #666666;
|
|
304
|
-
}
|
|
305
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="col-sm-12 col-xs-12 form-group app-btn">
|
|
4
|
+
<button
|
|
5
|
+
:class="onetomany.add.class || 'btn btn-info'"
|
|
6
|
+
@click.prevent="openAdd()"
|
|
7
|
+
v-if="!onetomany.add.hidden"
|
|
8
|
+
:style="onetomany.add.style || ''">
|
|
9
|
+
{{ onetomany.add.text || '添加'}}
|
|
10
|
+
</button>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="col-sm-12 col-xs-12">
|
|
13
|
+
<list :model="onetomany" partial='list'>
|
|
14
|
+
<div partial class="auto app-text panel">
|
|
15
|
+
<div class="panel-body panel-self">
|
|
16
|
+
<div class="row" v-for="field in $parent.$parent.onetomany.fields" v-if="!field.displayPosition || field.displayPosition === 'list'">
|
|
17
|
+
<p class="col-xs-3 text-left font label-justify"><b>{{ field.label }}</b></p>
|
|
18
|
+
<p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row[field.field] }}</p>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="row text-right" v-if="!$parent.$parent.onetomany.hiddenOperate">
|
|
21
|
+
<button
|
|
22
|
+
:class="$parent.$parent.onetomany.update.style || 'btn btn-warning'"
|
|
23
|
+
@click.prevent="$parent.$parent.openUpdate($index)"
|
|
24
|
+
v-if="!$parent.$parent.onetomany.update.hidden"
|
|
25
|
+
:style="$parent.$parent.onetomany.update.style || ''">
|
|
26
|
+
{{ $parent.$parent.onetomany.update.text || '修改'}}
|
|
27
|
+
</button>
|
|
28
|
+
<button
|
|
29
|
+
:class="$parent.$parent.onetomany.delete.style || 'btn btn-danger'"
|
|
30
|
+
@click.prevent="$parent.$parent.openDelete($index)"
|
|
31
|
+
v-if="!$parent.$parent.onetomany.delete.hidden"
|
|
32
|
+
:style="$parent.$parent.onetomany.delete.style || ''">
|
|
33
|
+
{{ $parent.$parent.onetomany.delete.text || '删除'}}
|
|
34
|
+
</button>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</list>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<!-- onetomany模态框 -->
|
|
43
|
+
<modal v-if="showModal" :show.sync="showModal" backdrop="false" :large="onetomany.modalSize === 'large' ? true : false" :small="onetomany.modalSize === 'small' ? true : false">
|
|
44
|
+
<header slot="modal-header" class="modal-header">
|
|
45
|
+
<button type="button" class="close" @click="closeModal()"><span>×</span></button>
|
|
46
|
+
<span class="modal-title"><font
|
|
47
|
+
size="3">{{modelTitle}}</font></span>
|
|
48
|
+
</header>
|
|
49
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
50
|
+
<div v-for="(index,item) in onetomany.fields">
|
|
51
|
+
<!--input-->
|
|
52
|
+
<div :style="item.style ? item.style : ''"
|
|
53
|
+
v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'app' || !item.device)"
|
|
54
|
+
:class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped + ' form-group app-input':'col-xs-12 form-group app-input']">
|
|
55
|
+
<label class="control-label-justify">{{item.label}}</label>
|
|
56
|
+
<div :style="item.value_style ? item.value_style:''"
|
|
57
|
+
:class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
|
|
58
|
+
<input class="" style="width: 100%"
|
|
59
|
+
:type="item.type"
|
|
60
|
+
v-model="onetomany.fields[index].value"
|
|
61
|
+
:placeholder="item.placeholder"
|
|
62
|
+
:value="onetomany.fields[index].value"
|
|
63
|
+
:readonly="item.readonly"
|
|
64
|
+
:disabled="item.disabled"
|
|
65
|
+
@change="onchange(index)"
|
|
66
|
+
@blur="onblur(index)"
|
|
67
|
+
@input="oninput(index)"
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<!--select-->
|
|
73
|
+
<div :style="item.style ? item.style : ''"
|
|
74
|
+
v-if="item.type==='select' && !item.hidden && (item.device === 'app' || !item.device)"
|
|
75
|
+
:class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped + ' form-group app-input':'col-xs-12 form-group app-input']">
|
|
76
|
+
<label class="control-label-justify">{{item.label}}</label>
|
|
77
|
+
<div :style="item.value_style ? item.value_style:''"
|
|
78
|
+
:class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
|
|
79
|
+
<v-select
|
|
80
|
+
class="select" width="100%" align="right"
|
|
81
|
+
:placeholder="item.placeholder"
|
|
82
|
+
:search="item.search"
|
|
83
|
+
close-on-select value-single
|
|
84
|
+
:options="item.options"
|
|
85
|
+
v-model="onetomany.fields[index].value"
|
|
86
|
+
:value.sync="onetomany.fields[index].value"
|
|
87
|
+
:readonly="item.readonly"
|
|
88
|
+
:disabled="item.disabled"
|
|
89
|
+
@blur="onblur(index)"
|
|
90
|
+
@change="onchange(index)"
|
|
91
|
+
></v-select>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<!--时间datepicker-->
|
|
96
|
+
<div :style="item.style ? item.style : ''"
|
|
97
|
+
v-if="item.type==='datepicker' && !item.hidden && (item.device === 'app' || !item.device)"
|
|
98
|
+
:class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped+' form-group app-input':'col-xs-12 form-group app-input']">
|
|
99
|
+
<label class="control-label-justify">{{item.label}}</label>
|
|
100
|
+
<div :style="item.value_style ? item.value_style:''"
|
|
101
|
+
:class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
|
|
102
|
+
<datepicker
|
|
103
|
+
:placeholder="item.placeholder"
|
|
104
|
+
:value.sync="onetomany.fields[index].value"
|
|
105
|
+
:format="item.format ? item.format : 'yyyy-MM-dd'"
|
|
106
|
+
v-model="onetomany.fields[index].value"
|
|
107
|
+
:readonly="item.readonly"
|
|
108
|
+
:disabled="item.disabled"
|
|
109
|
+
@change="onchange(index)"
|
|
110
|
+
@blur="onblur(index)"
|
|
111
|
+
:show-reset-button="true">
|
|
112
|
+
</datepicker>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
<!--textarea-->
|
|
117
|
+
<div :style="item.style ? item.style : ''"
|
|
118
|
+
v-if="item.type==='textarea' && !item.hidden && (item.device === 'app' || !item.device)"
|
|
119
|
+
:class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped?item.bootstraped+' form-group app-input':'col-xs-12 form-group app-input']">
|
|
120
|
+
<label class="control-label-justify">{{item.label}}</label>
|
|
121
|
+
<div :style="item.value_style ? item.value_style:''"
|
|
122
|
+
:class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
|
|
123
|
+
<textarea
|
|
124
|
+
:readonly="item.readonly"
|
|
125
|
+
:disabled="item.disabled"
|
|
126
|
+
class="" rows="1"
|
|
127
|
+
style="width: 100%;height: 100%"
|
|
128
|
+
v-model="onetomany.fields[index].value"
|
|
129
|
+
:value="onetomany.fields[index].value"
|
|
130
|
+
@change="onchange(index)"
|
|
131
|
+
@blur="onblur(index)"
|
|
132
|
+
@input="oninput(index)"
|
|
133
|
+
></textarea>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</article>
|
|
138
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
139
|
+
<button :class="disableButton?'btn btn-default':'btn btn-primary'"
|
|
140
|
+
:disabled="disableButton" type="button" @click.prevent="confirmModal()">
|
|
141
|
+
确认
|
|
142
|
+
</button>
|
|
143
|
+
</footer>
|
|
144
|
+
</modal>
|
|
145
|
+
</div>
|
|
146
|
+
</template>
|
|
147
|
+
|
|
148
|
+
<script>
|
|
149
|
+
import {HttpResetClass} from 'vue-client'
|
|
150
|
+
import {guid, toStandardTimeString} from '../Util'
|
|
151
|
+
import Vue from 'vue'
|
|
152
|
+
export default {
|
|
153
|
+
title: 'onetomany',
|
|
154
|
+
props: ['onetomany', 'index'],
|
|
155
|
+
data () {
|
|
156
|
+
return {
|
|
157
|
+
showModal: false,
|
|
158
|
+
disableButton: true,
|
|
159
|
+
modelTitle: null,
|
|
160
|
+
rowIndex: null
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
ready () {
|
|
164
|
+
},
|
|
165
|
+
methods: {
|
|
166
|
+
confirmModal () {
|
|
167
|
+
if (this.modelTitle === '新增') {
|
|
168
|
+
if (this.onetomany.add.event) {
|
|
169
|
+
this.$dispatch(this.onetomany.add.event, this.index)
|
|
170
|
+
} else {
|
|
171
|
+
this.$dispatch('onetomanyadd', this.index)
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (this.modelTitle === '修改') {
|
|
175
|
+
if (this.onetomany.update.event) {
|
|
176
|
+
this.$dispatch(this.onetomany.update.event, this.index, this.rowIndex)
|
|
177
|
+
} else {
|
|
178
|
+
this.$dispatch('onetomanyupdate', this.index, this.rowIndex)
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
this.closeModal()
|
|
183
|
+
},
|
|
184
|
+
onchange (fieldIndex) {
|
|
185
|
+
this.disableModalButton()
|
|
186
|
+
if (this.onetomany.fields[fieldIndex].onchange) {
|
|
187
|
+
this.$dispatch(this.onetomany.fields[fieldIndex].onchange, this.index, fieldIndex)
|
|
188
|
+
} else {
|
|
189
|
+
this.$dispatch('onchangeModal', this.index, fieldIndex)
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
onblur (fieldIndex) {
|
|
193
|
+
this.disableModalButton()
|
|
194
|
+
if (this.onetomany.fields[fieldIndex].onblur) {
|
|
195
|
+
this.$dispatch(this.onetomany.fields[fieldIndex].onblur, this.index, fieldIndex)
|
|
196
|
+
} else {
|
|
197
|
+
this.$dispatch('onblurModal', this.index, fieldIndex)
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
oninput (fieldIndex) {
|
|
201
|
+
this.disableModalButton()
|
|
202
|
+
if (this.onetomany.fields[fieldIndex].oninput) {
|
|
203
|
+
this.$dispatch(this.onetomany.fields[fieldIndex].oninput, this.index, fieldIndex)
|
|
204
|
+
} else {
|
|
205
|
+
this.$dispatch('oninputModal', this.index, fieldIndex)
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
openDelete (rowIndex) {
|
|
209
|
+
this.$showMessage(this.onetomany.delete.message ? this.onetomany.delete.message : '您确定要删除这条记录吗?', ['confirm']).then((res) => {
|
|
210
|
+
if (res === 'confirm') {
|
|
211
|
+
if (this.onetomany.delete.event) {
|
|
212
|
+
this.$dispatch(this.onetomany.delete.event, this.index, rowIndex)
|
|
213
|
+
} else {
|
|
214
|
+
this.$dispatch('onetomanydelete', this.index, rowIndex)
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
})
|
|
218
|
+
},
|
|
219
|
+
// 修改
|
|
220
|
+
openUpdate (rowIndex) {
|
|
221
|
+
let row = this.onetomany.rows[rowIndex]
|
|
222
|
+
for (const item of this.onetomany.fields) {
|
|
223
|
+
item.value = row[item.field]
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
this.disableModalButton()
|
|
227
|
+
|
|
228
|
+
this.modelTitle = '修改'
|
|
229
|
+
this.rowIndex = rowIndex
|
|
230
|
+
|
|
231
|
+
if (this.onetomany.update.openEvent) {
|
|
232
|
+
this.$dispatch(this.onetomany.update.openEvent, this.index, this.rowIndex)
|
|
233
|
+
}
|
|
234
|
+
this.$dispatch('openUpdateModel', this.index, this.rowIndex)
|
|
235
|
+
|
|
236
|
+
this.showModal = true
|
|
237
|
+
},
|
|
238
|
+
openAdd () {
|
|
239
|
+
this.disableModalButton()
|
|
240
|
+
this.modelTitle = '新增'
|
|
241
|
+
|
|
242
|
+
if (this.onetomany.add.openEvent) {
|
|
243
|
+
this.$dispatch(this.onetomany.add.openEvent, this.index)
|
|
244
|
+
}
|
|
245
|
+
this.$dispatch('openAddModel', this.index)
|
|
246
|
+
|
|
247
|
+
this.showModal = true
|
|
248
|
+
},
|
|
249
|
+
closeModal () {
|
|
250
|
+
this.showModal = false
|
|
251
|
+
this.disableButton = false
|
|
252
|
+
this.modelTitle = null
|
|
253
|
+
this.rowIndex = null
|
|
254
|
+
|
|
255
|
+
for (const item of this.onetomany.fields) {
|
|
256
|
+
item.value = null
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
// 是否禁用按钮
|
|
260
|
+
disableModalButton () {
|
|
261
|
+
let flag = false
|
|
262
|
+
|
|
263
|
+
for (const field of this.onetomany.fields) {
|
|
264
|
+
if (field.required && !field.value) {
|
|
265
|
+
if (field.value === 0) {
|
|
266
|
+
flag = false
|
|
267
|
+
} else {
|
|
268
|
+
flag = true
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
this.disableButton = flag
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
computed: {
|
|
277
|
+
},
|
|
278
|
+
events: {
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
</script>
|
|
282
|
+
|
|
283
|
+
<style scoped>
|
|
284
|
+
.control-label-justify {
|
|
285
|
+
width: 30%;
|
|
286
|
+
text-align: justify;
|
|
287
|
+
text-align-last: justify;
|
|
288
|
+
font-family: PingFang-SC-Bold;
|
|
289
|
+
float: left;
|
|
290
|
+
}
|
|
291
|
+
.label-justify {
|
|
292
|
+
text-align: justify;
|
|
293
|
+
text-align-last: justify;
|
|
294
|
+
float: left;
|
|
295
|
+
}
|
|
296
|
+
.panel-self{
|
|
297
|
+
border-radius: 10px;
|
|
298
|
+
border:1px solid #499EDF;
|
|
299
|
+
background-color: #F8F8F8;
|
|
300
|
+
}
|
|
301
|
+
.font{
|
|
302
|
+
font: 15px PingFang-SC-Medium;
|
|
303
|
+
color: #666666;
|
|
304
|
+
}
|
|
305
|
+
</style>
|