|
@@ -27,9 +27,16 @@
|
|
|
</p>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <upload
|
|
|
+ ref="upload"
|
|
|
+ :folderid="folderid"
|
|
|
+ @onSuccess="onSuccess"
|
|
|
+ :bindData="bindData"
|
|
|
+ type="button">
|
|
|
+ </upload>
|
|
|
</div>
|
|
|
<div class="fixed__btn__panel">
|
|
|
- <el-button class="normal-btn-width" type="primary" size="small" @click="submitForm">创 建</el-button>
|
|
|
+ <el-button class="normal-btn-width" :loading="loading" type="primary" size="small" @click="submitForm">创 建</el-button>
|
|
|
<!-- <el-button class="normal-btn-width" size="small" @click="resetForm">重 置</el-button> -->
|
|
|
</div>
|
|
|
</el-drawer>
|
|
@@ -37,13 +44,20 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import upload from '@/SManagement/orderclue/components/upload'
|
|
|
+import { log } from '@antv/g2plot/lib/utils'
|
|
|
export default {
|
|
|
+ components:{upload},
|
|
|
data () {
|
|
|
return {
|
|
|
modelList:[],
|
|
|
+ loading:false,
|
|
|
drawer:false,
|
|
|
detail:'',
|
|
|
- currentModel:{}
|
|
|
+ currentModel:{},
|
|
|
+ bindData:{},
|
|
|
+ folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
|
|
|
+ uploadIndex:0,
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -94,12 +108,30 @@ export default {
|
|
|
},
|
|
|
})
|
|
|
this.tool.showMessage(res,() => {
|
|
|
- this.drawer = false
|
|
|
- res.data.name = res.data.createby
|
|
|
- this.$emit('onSuccess',res.data)
|
|
|
+ this.bindData = {
|
|
|
+ "ownertable": 'sys_workreport',
|
|
|
+ "ownerid": res.data.sys_workreportid,
|
|
|
+ "usetype": 'default',
|
|
|
+ }
|
|
|
+ this.loading = true
|
|
|
+ let index = 0
|
|
|
+ this.$refs['upload'].toUpload(() => {
|
|
|
+ if (!index) this.uploadIndex = this.$refs.upload.fileList.length
|
|
|
+ index++
|
|
|
+ if (this.uploadIndex == index) {
|
|
|
+ this.loading = false
|
|
|
+ this.drawer = false
|
|
|
+ res.data.name = res.data.createby
|
|
|
+ this.$emit('onSuccess',res.data)
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
})
|
|
|
console.log(res);
|
|
|
- }
|
|
|
+ },
|
|
|
+ onSuccess () {
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
created () {
|
|
|
this.getModelList()
|