|
@@ -9,6 +9,17 @@
|
|
|
</div>
|
|
|
<app-main />
|
|
|
</div>
|
|
|
+ <el-dialog title="文件下发通知" width="700px" :visible.sync="dialogTableVisible">
|
|
|
+ <el-table :data="ListDownload" size="mini">
|
|
|
+ <el-table-column property="title" label="标题"></el-table-column>
|
|
|
+ <el-table-column property="createTime" label="下发时间" width="120"></el-table-column>
|
|
|
+ <el-table-column label="操作" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button @click="handleClick(scope.row)" type="text" size="small">确认接受并且下载</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -16,14 +27,16 @@
|
|
|
import { Navbar, Sidebar, AppMain } from './components'
|
|
|
import TagsView from './components/TagsView/index'
|
|
|
import ResizeMixin from './mixin/ResizeHandler'
|
|
|
-
|
|
|
+import { comListDownloadGet } from '@/api/common'
|
|
|
+import { exportFile } from '@/api/universal/universal_list'
|
|
|
+import { downloadFiles } from '@/utils/util'
|
|
|
export default {
|
|
|
name: 'Layout',
|
|
|
components: {
|
|
|
Navbar,
|
|
|
Sidebar,
|
|
|
AppMain,
|
|
|
- TagsView,
|
|
|
+ TagsView
|
|
|
},
|
|
|
mixins: [ResizeMixin],
|
|
|
computed: {
|
|
@@ -48,8 +61,49 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dialogTableVisible: true,
|
|
|
+ ListDownload: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ if (window.localStorage.getItem('dakaitishichuangkou')) {
|
|
|
+ window.localStorage.removeItem('dakaitishichuangkou')
|
|
|
+ // 打开提示窗口
|
|
|
+ comListDownloadGet({ pageNo: 1, pageSize: -1 }).then(res => {
|
|
|
+ this.ListDownload = res.data.records
|
|
|
+ if (this.ListDownload.length) {
|
|
|
+ this.dialogTableVisible = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ handleClick(item) {
|
|
|
+ if (item.isPwd) {
|
|
|
+ this.$prompt('请输入下载密码', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ inputValidator: value => {
|
|
|
+ if (!value) {
|
|
|
+ return '密码不能为空!'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .then(({ value }) => {
|
|
|
+ downloadFiles('com/list/download', {
|
|
|
+ id: item.id,
|
|
|
+ downloadPwd: value
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ } else {
|
|
|
+ downloadFiles('com/list/download', {
|
|
|
+ id: item.id
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
handleClickOutside() {
|
|
|
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
|
|
}
|