Compare commits
No commits in common. "a724fdf585838c6464735a39a367477aa3123b7a" and "45d9e621ad49b99c710a8a3b9f855793d1f3ba56" have entirely different histories.
a724fdf585
...
45d9e621ad
@ -4,7 +4,7 @@
|
|||||||
<label for="upInput">
|
<label for="upInput">
|
||||||
<div class="export-btn">{{ $t('systemSet.importSettings') }}</div>
|
<div class="export-btn">{{ $t('systemSet.importSettings') }}</div>
|
||||||
</label>
|
</label>
|
||||||
<div class="export-btn" @click="downLoad">{{ $t('systemSet.exportSettings') }}</div>
|
<div class="export-btn" @click="downLoadData">{{ $t('systemSet.exportSettings') }}</div>
|
||||||
<input ref="fileInput" style="display: none" multiple id="upInput" type="file" accept=".txt" @change="changeTxt" />
|
<input ref="fileInput" style="display: none" multiple id="upInput" type="file" accept=".txt" @change="changeTxt" />
|
||||||
</div>
|
</div>
|
||||||
<div class="table-title">
|
<div class="table-title">
|
||||||
@ -101,22 +101,6 @@
|
|||||||
class="system-tips system-textarea" maxlength="1200">
|
class="system-tips system-textarea" maxlength="1200">
|
||||||
</textarea>
|
</textarea>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog title="" class="vrcode-model confirm-psw" top="30vh" :close-on-click-modal="false" :append-to-body="true" :visible.sync="warnModel"
|
|
||||||
width="700px">
|
|
||||||
<div class="vrcode-model-title vrcode-model-title-282">{{ $t('placeholder.fileName') }}</div>
|
|
||||||
<div class="warning-model" style="padding: 0 30px;">
|
|
||||||
<div class="flex-view border-none">
|
|
||||||
<div class="input-main">
|
|
||||||
<div>{{ $t('placeholder.fileName') }}</div>
|
|
||||||
<input type="text" v-model="fileName">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<span slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="warnModel=false">{{$t('index.cancel1')}}</el-button>
|
|
||||||
<el-button type="success" @click="downLoadData">{{$t('index.confirm1')}}</el-button>
|
|
||||||
</span>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -130,13 +114,9 @@ export default {
|
|||||||
inputData: [],
|
inputData: [],
|
||||||
loading:null,
|
loading:null,
|
||||||
ICCID:'',
|
ICCID:'',
|
||||||
|
|
||||||
memoDetail: {
|
memoDetail: {
|
||||||
memo: ''
|
memo: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
warnModel:false,
|
|
||||||
fileName:'',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -155,12 +135,6 @@ this.dataInit();
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
downLoad(){
|
|
||||||
var store = this.$store.state
|
|
||||||
var index = store.equipmentIndex;
|
|
||||||
this.fileName=store.equipmentList[index - 1].deviceTypeName
|
|
||||||
this.warnModel=true
|
|
||||||
},
|
|
||||||
//文件下载导出
|
//文件下载导出
|
||||||
downLoadData() {
|
downLoadData() {
|
||||||
this.loading = this.$loading({
|
this.loading = this.$loading({
|
||||||
@ -175,14 +149,16 @@ this.dataInit();
|
|||||||
this.api.controlReadValuedownload(devicecode).then(res => {
|
this.api.controlReadValuedownload(devicecode).then(res => {
|
||||||
// 创建一个blob对象
|
// 创建一个blob对象
|
||||||
this.loading.close()
|
this.loading.close()
|
||||||
|
console.log(res,111);
|
||||||
const blob = new Blob([res.data], { type: 'text/txt' });
|
const blob = new Blob([res.data], { type: 'text/txt' });
|
||||||
|
console.log(blob,111);
|
||||||
// 创建一个a标签
|
// 创建一个a标签
|
||||||
const url = window.URL.createObjectURL(blob);
|
const url = window.URL.createObjectURL(blob);
|
||||||
const link = document.createElement('a');
|
const link = document.createElement('a');
|
||||||
link.href = url;
|
link.href = url;
|
||||||
|
|
||||||
// 设置文件名
|
// 设置文件名
|
||||||
link.setAttribute('download', `${this.fileName}.txt`);
|
link.setAttribute('download', `${this.$t('deviceManagement.deviceTypes.controller')}-${devicecode}.txt`);
|
||||||
|
|
||||||
// 模拟点击下载
|
// 模拟点击下载
|
||||||
document.body.appendChild(link);
|
document.body.appendChild(link);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<label for="upInput">
|
<label for="upInput">
|
||||||
<div class="export-btn">{{ $t('systemSet.importSettings') }}</div>
|
<div class="export-btn">{{ $t('systemSet.importSettings') }}</div>
|
||||||
</label>
|
</label>
|
||||||
<div class="export-btn" @click="downLoad">{{ $t('systemSet.exportSettings') }}</div>
|
<div class="export-btn" @click="downLoadData">{{ $t('systemSet.exportSettings') }}</div>
|
||||||
<input ref="fileInput" style="display: none" multiple id="upInput" type="file" accept=".txt" @change="changeTxt" />
|
<input ref="fileInput" style="display: none" multiple id="upInput" type="file" accept=".txt" @change="changeTxt" />
|
||||||
</div>
|
</div>
|
||||||
<div class="table-title">
|
<div class="table-title">
|
||||||
@ -82,22 +82,6 @@
|
|||||||
class="system-tips system-textarea" maxlength="1200">
|
class="system-tips system-textarea" maxlength="1200">
|
||||||
</textarea>
|
</textarea>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog title="" class="vrcode-model confirm-psw" top="30vh" :close-on-click-modal="false" :append-to-body="true" :visible.sync="warnModel"
|
|
||||||
width="700px">
|
|
||||||
<div class="vrcode-model-title vrcode-model-title-282">{{ $t('placeholder.fileName') }}</div>
|
|
||||||
<div class="warning-model" style="padding: 0 30px;">
|
|
||||||
<div class="flex-view border-none">
|
|
||||||
<div class="input-main">
|
|
||||||
<div>{{ $t('placeholder.fileName') }}</div>
|
|
||||||
<input type="text" v-model="fileName">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<span slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="warnModel=false">{{$t('index.cancel1')}}</el-button>
|
|
||||||
<el-button type="success" @click="downLoadData">{{$t('index.confirm1')}}</el-button>
|
|
||||||
</span>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -111,8 +95,6 @@ export default {
|
|||||||
memoDetail: {
|
memoDetail: {
|
||||||
memo: ''
|
memo: ''
|
||||||
},
|
},
|
||||||
warnModel:false,
|
|
||||||
fileName:'',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -131,12 +113,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
downLoad(){
|
|
||||||
var store = this.$store.state
|
|
||||||
var index = store.equipmentIndex;
|
|
||||||
this.fileName=store.equipmentList[index - 1].deviceTypeName
|
|
||||||
this.warnModel=true
|
|
||||||
},
|
|
||||||
//文件下载导出
|
//文件下载导出
|
||||||
downLoadData() {
|
downLoadData() {
|
||||||
this.loading = this.$loading({
|
this.loading = this.$loading({
|
||||||
@ -158,7 +134,7 @@ export default {
|
|||||||
link.href = url;
|
link.href = url;
|
||||||
|
|
||||||
// 设置文件名
|
// 设置文件名
|
||||||
link.setAttribute('download', `${this.fileName}.txt`);
|
link.setAttribute('download', `${this.$t('deviceManagement.deviceTypes.smartController')}-${devicecode}.txt`);
|
||||||
|
|
||||||
// 模拟点击下载
|
// 模拟点击下载
|
||||||
document.body.appendChild(link);
|
document.body.appendChild(link);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<label for="upInput">
|
<label for="upInput">
|
||||||
<div class="export-btn">{{ $t('systemSet.importSettings') }}</div>
|
<div class="export-btn">{{ $t('systemSet.importSettings') }}</div>
|
||||||
</label>
|
</label>
|
||||||
<div class="export-btn" @click="downLoad">{{ $t('systemSet.exportSettings') }}</div>
|
<div class="export-btn" @click="downLoadData">{{ $t('systemSet.exportSettings') }}</div>
|
||||||
<input ref="fileInput" style="display: none" multiple id="upInput" type="file" accept=".txt"
|
<input ref="fileInput" style="display: none" multiple id="upInput" type="file" accept=".txt"
|
||||||
@change="changeTxt" />
|
@change="changeTxt" />
|
||||||
</div>
|
</div>
|
||||||
@ -103,22 +103,6 @@
|
|||||||
</textarea>
|
</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog title="" class="vrcode-model confirm-psw" top="30vh" :close-on-click-modal="false" :append-to-body="true" :visible.sync="warnModel"
|
|
||||||
width="700px">
|
|
||||||
<div class="vrcode-model-title vrcode-model-title-282">{{ $t('placeholder.fileName') }}</div>
|
|
||||||
<div class="warning-model" style="padding: 0 30px;">
|
|
||||||
<div class="flex-view border-none">
|
|
||||||
<div class="input-main">
|
|
||||||
<div>{{ $t('placeholder.fileName') }}</div>
|
|
||||||
<input type="text" v-model="fileName">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<span slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="warnModel=false">{{$t('index.cancel1')}}</el-button>
|
|
||||||
<el-button type="success" @click="downLoadData">{{$t('index.confirm1')}}</el-button>
|
|
||||||
</span>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -136,8 +120,6 @@ export default {
|
|||||||
memoDetail: {
|
memoDetail: {
|
||||||
memo: ''
|
memo: ''
|
||||||
},
|
},
|
||||||
warnModel:false,
|
|
||||||
fileName:'',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -156,12 +138,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
downLoad(){
|
|
||||||
var store = this.$store.state
|
|
||||||
var index = store.equipmentIndex;
|
|
||||||
this.fileName=store.equipmentList[index - 1].deviceTypeName
|
|
||||||
this.warnModel=true
|
|
||||||
},
|
|
||||||
//文件下载导出
|
//文件下载导出
|
||||||
downLoadData() {
|
downLoadData() {
|
||||||
this.loading = this.$loading({
|
this.loading = this.$loading({
|
||||||
@ -185,7 +161,7 @@ export default {
|
|||||||
link.href = url;
|
link.href = url;
|
||||||
|
|
||||||
// 设置文件名
|
// 设置文件名
|
||||||
link.setAttribute('download', `${this.fileName}.txt`);
|
link.setAttribute('download', `${this.$t('deviceManagement.deviceTypes.fertilizer')}-${devicecode}.txt`);
|
||||||
|
|
||||||
// 模拟点击下载
|
// 模拟点击下载
|
||||||
document.body.appendChild(link);
|
document.body.appendChild(link);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user