|
@@ -10,7 +10,7 @@
|
|
<el-link v-if="isAdminAuth" type="warning" @click="completion(row)">项目完成情况</el-link>
|
|
<el-link v-if="isAdminAuth" type="warning" @click="completion(row)">项目完成情况</el-link>
|
|
<el-link type="primary" @click="examine(row)">查看</el-link>
|
|
<el-link type="primary" @click="examine(row)">查看</el-link>
|
|
<el-link v-if="isAdminAuth" v-del-com:[delTableItem]="row" type="danger">删除</el-link>
|
|
<el-link v-if="isAdminAuth" v-del-com:[delTableItem]="row" type="danger">删除</el-link>
|
|
- <el-link v-yes-com:[deriveTableItem]="row" type="success" yes-com-text="您确定要导出当前数据吗?">导出</el-link>
|
|
|
|
|
|
+ <el-link v-yes-com:[deriveTableItem]="row" type="success">导出</el-link>
|
|
</template>
|
|
</template>
|
|
</hc-table>
|
|
</hc-table>
|
|
</template>
|
|
</template>
|
|
@@ -26,7 +26,7 @@ const props = defineProps({
|
|
})
|
|
})
|
|
|
|
|
|
//事件
|
|
//事件
|
|
-const emit = defineEmits(['tap', 'completion', 'examine', 'del', 'export'])
|
|
|
|
|
|
+const emit = defineEmits(['tap', 'completion', 'examine', 'del', 'export', 'check'])
|
|
|
|
|
|
//监听权限
|
|
//监听权限
|
|
const isAdminAuth = ref(props.isAdmin)
|
|
const isAdminAuth = ref(props.isAdmin)
|
|
@@ -224,11 +224,11 @@ const tableData = ref([
|
|
const tableCheckKeys = ref([])
|
|
const tableCheckKeys = ref([])
|
|
const tableCheckChange = (rows) => {
|
|
const tableCheckChange = (rows) => {
|
|
tableCheckKeys.value = rows
|
|
tableCheckKeys.value = rows
|
|
|
|
+ emit('check', rows)
|
|
}
|
|
}
|
|
|
|
|
|
//项目名称被点击
|
|
//项目名称被点击
|
|
const rowNameClick = (row) => {
|
|
const rowNameClick = (row) => {
|
|
- console.log('项目名称被点击')
|
|
|
|
emit('tap', row)
|
|
emit('tap', row)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -263,6 +263,24 @@ const deriveTableItem = ({ item }, resolve) => {
|
|
emit('export', item)
|
|
emit('export', item)
|
|
}, 3000)
|
|
}, 3000)
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+//批量删除
|
|
|
|
+const batchRemove = () => {
|
|
|
|
+ if (!isAdminAuth.value) return
|
|
|
|
+ const rows = tableCheckKeys.value
|
|
|
|
+ console.log('批量删除', rows)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//批量导出
|
|
|
|
+const batchExport = () => {
|
|
|
|
+ const rows = tableCheckKeys.value
|
|
|
|
+ console.log('批量导出', rows)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+defineExpose({
|
|
|
|
+ batchRemove,
|
|
|
|
+ batchExport,
|
|
|
|
+})
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|