|
@@ -116,6 +116,14 @@
|
|
style="position: absolute;top:7px;right:0px"
|
|
style="position: absolute;top:7px;right:0px"
|
|
>导出</el-button
|
|
>导出</el-button
|
|
>
|
|
>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="importCoordinate()"
|
|
|
|
+ icon="el-icon-download"
|
|
|
|
+ style="position: absolute;top:7px;right:0px"
|
|
|
|
+ >导入</el-button
|
|
|
|
+ >
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
</table>
|
|
</table>
|
|
@@ -175,6 +183,34 @@
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</div>
|
|
</div>
|
|
</cart-item>
|
|
</cart-item>
|
|
|
|
+ <Modal v-model="isImportCoordinate" title="导入坐标" :footer-hide="true">
|
|
|
|
+ <Upload
|
|
|
|
+ :before-upload="handleUpload"
|
|
|
|
+ style="display: inline-block"
|
|
|
|
+ accept=".txt,.TXT"
|
|
|
|
+ action=""
|
|
|
|
+ >
|
|
|
|
+ <Button icon="ios-cloud-upload-outline">选择文件</Button>
|
|
|
|
+ </Upload>
|
|
|
|
+ <Button
|
|
|
|
+ type="primary"
|
|
|
|
+ style="position: absolute; right: 120px"
|
|
|
|
+ :loading="loadingStatus"
|
|
|
|
+ @click="uploadTxt"
|
|
|
|
+ >上传</Button>
|
|
|
|
+ <Button style="position: absolute; right: 20px" @click="openHelpPage">帮助说明</Button>
|
|
|
|
+ <div v-if="txtFile !== null" style="color: red">
|
|
|
|
+ 选择的文件: {{ txtFile.name }}
|
|
|
|
+ </div>
|
|
|
|
+ <p style="margin-top:8px;font-weight:bold;font-size:16px">提示:如果界址点数量很多,需要等待比较长的时间。</p>
|
|
|
|
+ </Modal>
|
|
|
|
+ <Modal
|
|
|
|
+ v-model="isErrorVisiable"
|
|
|
|
+ title="提示"
|
|
|
|
+ :footer-hide="true"
|
|
|
|
+ >
|
|
|
|
+ <p v-for="(item, index) in uploadErrorList" :key="index">{{ item }}</p>
|
|
|
|
+ </Modal>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -222,6 +258,11 @@ export default {
|
|
total: 100,
|
|
total: 100,
|
|
},
|
|
},
|
|
foldShow: false,
|
|
foldShow: false,
|
|
|
|
+ txtFile:null,
|
|
|
|
+ loadingStatus: false,
|
|
|
|
+ isImportCoordinate: false,
|
|
|
|
+ uploadErrorList: [],
|
|
|
|
+ isErrorVisiable: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -275,6 +316,44 @@ export default {
|
|
let url = `/api/ybz-bj/manageExport`;
|
|
let url = `/api/ybz-bj/manageExport`;
|
|
Excels.open(url, params, this, true, false, '滨江区管理地块情况表');
|
|
Excels.open(url, params, this, true, false, '滨江区管理地块情况表');
|
|
},
|
|
},
|
|
|
|
+ handleUpload(file) {
|
|
|
|
+ this.txtFile = file
|
|
|
|
+ return false
|
|
|
|
+ },
|
|
|
|
+ openHelpPage() {
|
|
|
|
+ window.open('/app215/ybzBj/bbjzdgswd.html')
|
|
|
|
+ },
|
|
|
|
+ importCoordinate() {
|
|
|
|
+ this.isImportCoordinate = true
|
|
|
|
+ this.txtFile = null
|
|
|
|
+ },
|
|
|
|
+ async uploadTxt() {
|
|
|
|
+ if (!this.txtFile) {
|
|
|
|
+ this.$Message.error('请选择文件!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.loadingStatus = true
|
|
|
|
+ const formData = new FormData()
|
|
|
|
+ formData.append('file', this.txtFile)
|
|
|
|
+ const urlStr = '/app/xc/uploadTxt'
|
|
|
|
+ const response = await this.$ajax.post(urlStr, formData, this)
|
|
|
|
+ if (response.success) {
|
|
|
|
+ this.isImportCoordinate = false
|
|
|
|
+ const errorList = response.data.errorList
|
|
|
|
+ if (!errorList || !errorList.length) {
|
|
|
|
+ this.$Message.success('上传界址点成功!')
|
|
|
|
+ } else {
|
|
|
|
+ this.isErrorVisiable = true
|
|
|
|
+ this.uploadErrorList = errorList
|
|
|
|
+ }
|
|
|
|
+ this.queryData();
|
|
|
|
+ } else {
|
|
|
|
+ this.isErrorVisiable = true
|
|
|
|
+ this.uploadErrorList = [response.message]
|
|
|
|
+ }
|
|
|
|
+ this.loadingStatus = false
|
|
|
|
+ return false
|
|
|
|
+ },
|
|
async queryData() {
|
|
async queryData() {
|
|
this.initHZ();
|
|
this.initHZ();
|
|
this.getTsxzListData();
|
|
this.getTsxzListData();
|