|
@@ -28,13 +28,13 @@
|
|
</el-button>
|
|
</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
<HcTooltip keys="tentative_collect_test_download">
|
|
<HcTooltip keys="tentative_collect_test_download">
|
|
- <el-button hc-btn color="#A16222">
|
|
|
|
|
|
+ <el-button hc-btn color="#A16222" :loading="downLoading" :disabled="tableCheckedKeys.length === 0" @click="downClick">
|
|
<HcIcon name="download" />
|
|
<HcIcon name="download" />
|
|
<span>下载</span>
|
|
<span>下载</span>
|
|
</el-button>
|
|
</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
<HcTooltip keys="tentative_collect_test_del">
|
|
<HcTooltip keys="tentative_collect_test_del">
|
|
- <el-button hc-btn color="#e03997" @click="delModalClick">
|
|
|
|
|
|
+ <el-button hc-btn color="#e03997" :disabled="tableCheckedKeys.length === 0" @click="delModalClick">
|
|
<HcIcon name="delete-bin-2" />
|
|
<HcIcon name="delete-bin-2" />
|
|
<span>删除</span>
|
|
<span>删除</span>
|
|
</el-button>
|
|
</el-button>
|
|
@@ -159,7 +159,7 @@
|
|
import { onMounted, ref, watch } from 'vue'
|
|
import { onMounted, ref, watch } from 'vue'
|
|
import { useAppStore } from '~src/store'
|
|
import { useAppStore } from '~src/store'
|
|
import { download, getContractList, getPage, getSummaryList, removeByIds, save } from '~api/tentative/collect/test'
|
|
import { download, getContractList, getPage, getSummaryList, removeByIds, save } from '~api/tentative/collect/test'
|
|
-import { arrToId, getArrValue, getObjValue } from 'js-fast-way'
|
|
|
|
|
|
+import { arrToId, getArrValue, getObjValue, isString } from 'js-fast-way'
|
|
|
|
|
|
import { delMessageV2 } from '~com/message/index.js'
|
|
import { delMessageV2 } from '~com/message/index.js'
|
|
import { getDictionary } from '~api/other'
|
|
import { getDictionary } from '~api/other'
|
|
@@ -435,6 +435,19 @@ const addModalSave = async ()=>{
|
|
const unitOpt = ref([
|
|
const unitOpt = ref([
|
|
{ name:'施工', id:'1' },
|
|
{ name:'施工', id:'1' },
|
|
])
|
|
])
|
|
|
|
+const downLoading = ref(false)
|
|
|
|
+const downClick = async ()=>{
|
|
|
|
+ downLoading.value = true
|
|
|
|
+ const { error, code, data } = await download({
|
|
|
|
+ ids: arrToId( tableCheckedKeys.value),
|
|
|
|
+ })
|
|
|
|
+ downLoading.value = false
|
|
|
|
+
|
|
|
|
+ const res = isString(data) ? data || '' : ''
|
|
|
|
+ if (!error && code === 200 && res) {
|
|
|
|
+ window.open(res, '_blank')
|
|
|
|
+ }
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|