|
@@ -47,7 +47,7 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="4">
|
|
<el-col :span="4">
|
|
|
- <el-button type="primary" @click="handleSearch">
|
|
|
|
|
|
|
+ <el-button type="primary" @click="getData">
|
|
|
<el-icon><Search /></el-icon>
|
|
<el-icon><Search /></el-icon>
|
|
|
<span> 查询</span>
|
|
<span> 查询</span>
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -66,11 +66,12 @@
|
|
|
<el-table
|
|
<el-table
|
|
|
stripe
|
|
stripe
|
|
|
height="481"
|
|
height="481"
|
|
|
|
|
+ ref="multipleTable"
|
|
|
:data="tableData"
|
|
:data="tableData"
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
:header-cell-style="{ backgroundColor: '#F0F3F7' }"
|
|
:header-cell-style="{ backgroundColor: '#F0F3F7' }"
|
|
|
- @select="handleCurrentChangeTable"
|
|
|
|
|
- @select-all="handleCurrentChangeAll"
|
|
|
|
|
|
|
+ @select="handleChooseList"
|
|
|
|
|
+ @select-all="handleChooseList"
|
|
|
>
|
|
>
|
|
|
<el-table-column type="selection" width="55" />
|
|
<el-table-column type="selection" width="55" />
|
|
|
<el-table-column width="100" align="center" prop="name" label="姓名" />
|
|
<el-table-column width="100" align="center" prop="name" label="姓名" />
|
|
@@ -171,29 +172,9 @@ import { useStore } from 'vuex'
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import { getProjectList, deleteProjectList } from '@/api/project'
|
|
import { getProjectList, deleteProjectList } from '@/api/project'
|
|
|
|
|
|
|
|
-const store = useStore()
|
|
|
|
|
-
|
|
|
|
|
-const downIds = ref([])
|
|
|
|
|
-
|
|
|
|
|
-const handleCurrentChangeTable = (list) => {
|
|
|
|
|
- downIds.value = []
|
|
|
|
|
- if (list.length !== 0) {
|
|
|
|
|
- list.forEach((item) => {
|
|
|
|
|
- downIds.value.push(item.id)
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- console.log(downIds.value)
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-const handleCurrentChangeAll = (list) => {
|
|
|
|
|
- downIds.value = []
|
|
|
|
|
- if (list.length !== 0) {
|
|
|
|
|
- list.forEach((item) => {
|
|
|
|
|
- downIds.value.push(item.id)
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- console.log(downIds.value)
|
|
|
|
|
-}
|
|
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ getData()
|
|
|
|
|
+})
|
|
|
|
|
|
|
|
// 获取项目管理列表
|
|
// 获取项目管理列表
|
|
|
const getData = async () => {
|
|
const getData = async () => {
|
|
@@ -211,43 +192,62 @@ const getData = async () => {
|
|
|
currentPage.value = res.currPage
|
|
currentPage.value = res.currPage
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-onMounted(() => {
|
|
|
|
|
- getData()
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
// 筛选区域绑定数据
|
|
// 筛选区域绑定数据
|
|
|
const searchName = ref('')
|
|
const searchName = ref('')
|
|
|
const searchAddress = ref('')
|
|
const searchAddress = ref('')
|
|
|
const searchPhone = ref('')
|
|
const searchPhone = ref('')
|
|
|
const searchTime = ref('')
|
|
const searchTime = ref('')
|
|
|
|
|
+// 表单元素DOM标识
|
|
|
|
|
+const multipleTable = ref(null)
|
|
|
|
|
+// 仓库
|
|
|
|
|
+const store = useStore()
|
|
|
|
|
+// 勾选的数据id
|
|
|
|
|
+const downIds = ref([])
|
|
|
|
|
+// 控制详情弹窗显示隐藏
|
|
|
|
|
+const dialogVisible = ref(false)
|
|
|
|
|
+// 控制详情弹窗数据
|
|
|
|
|
+const dialogInfo = ref({})
|
|
|
|
|
+// 一共多少条
|
|
|
|
|
+const total = ref(0)
|
|
|
|
|
+// 分页器当前页
|
|
|
|
|
+const currentPage = ref(1)
|
|
|
|
|
+// 每页条数
|
|
|
|
|
+const pageSize = ref(8)
|
|
|
|
|
+// 表格数据
|
|
|
|
|
+const tableData = ref([])
|
|
|
|
|
|
|
|
-// 点击查询按钮回调
|
|
|
|
|
-const handleSearch = () => {
|
|
|
|
|
- // ElMessage.success('查询')
|
|
|
|
|
- getData()
|
|
|
|
|
|
|
+// 点击勾选框回调
|
|
|
|
|
+const handleChooseList = (list) => {
|
|
|
|
|
+ downIds.value = []
|
|
|
|
|
+ if (list.length !== 0) {
|
|
|
|
|
+ list.forEach((item) => {
|
|
|
|
|
+ downIds.value.push(item.id)
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
// 导出表单按钮回调
|
|
// 导出表单按钮回调
|
|
|
const hanleExportForm = () => {
|
|
const hanleExportForm = () => {
|
|
|
|
|
+ const id = downIds.value.join(',')
|
|
|
ElMessageBox.confirm('确定导出表单吗?', '提示', {
|
|
ElMessageBox.confirm('确定导出表单吗?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
- window.location.href = `/reporting/informationReporting/download?name=${searchName.value}&phone=${searchPhone.value}&company=${searchAddress.value}&reportingTime=${searchTime.value}&ids=${downIds.value}`
|
|
|
|
|
|
|
+ window.location.href = `/reporting/informationReporting/download?name=${searchName.value}&phone=${searchPhone.value}&company=${searchAddress.value}&reportingTime=${searchTime.value}&ids=${id}`
|
|
|
|
|
+ multipleTable.value.clearSelection()
|
|
|
})
|
|
})
|
|
|
.catch(() => {
|
|
.catch(() => {
|
|
|
ElMessage.info('取消')
|
|
ElMessage.info('取消')
|
|
|
|
|
+ multipleTable.value.clearSelection()
|
|
|
})
|
|
})
|
|
|
|
|
+ downIds.value = []
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
// 点击详情按钮回调
|
|
// 点击详情按钮回调
|
|
|
const handleCheckDetail = (row) => {
|
|
const handleCheckDetail = (row) => {
|
|
|
dialogVisible.value = true
|
|
dialogVisible.value = true
|
|
|
dialogInfo.value = row
|
|
dialogInfo.value = row
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
// 点击删除按钮回调
|
|
// 点击删除按钮回调
|
|
|
const handleDelete = (id) => {
|
|
const handleDelete = (id) => {
|
|
|
ElMessageBox.confirm('确定删除吗?', '提示', {
|
|
ElMessageBox.confirm('确定删除吗?', '提示', {
|
|
@@ -271,34 +271,16 @@ const handleDelete = (id) => {
|
|
|
ElMessage.info('已取消')
|
|
ElMessage.info('已取消')
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-// 控制详情弹窗显示隐藏
|
|
|
|
|
-const dialogVisible = ref(false)
|
|
|
|
|
-
|
|
|
|
|
-const dialogInfo = ref({})
|
|
|
|
|
-
|
|
|
|
|
-// 一共多少条
|
|
|
|
|
-const total = ref(0)
|
|
|
|
|
-// 分页器当前页
|
|
|
|
|
-const currentPage = ref(1)
|
|
|
|
|
-// 每页条数
|
|
|
|
|
-const pageSize = ref(8)
|
|
|
|
|
-
|
|
|
|
|
// 改变每页条数回调
|
|
// 改变每页条数回调
|
|
|
const handleSizeChange = (val) => {
|
|
const handleSizeChange = (val) => {
|
|
|
- // console.log(`每条${val}页`)
|
|
|
|
|
pageSize.value = val
|
|
pageSize.value = val
|
|
|
getData()
|
|
getData()
|
|
|
}
|
|
}
|
|
|
// 改变当前页回调
|
|
// 改变当前页回调
|
|
|
const handleCurrentChange = (val) => {
|
|
const handleCurrentChange = (val) => {
|
|
|
- // console.log(`当前页: ${val}`)
|
|
|
|
|
currentPage.value = val
|
|
currentPage.value = val
|
|
|
getData()
|
|
getData()
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-// 表格数据
|
|
|
|
|
-const tableData = ref([])
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|