|
@@ -3,11 +3,13 @@ import { onMounted, ref } from 'vue'
|
|
|
import Download from '@/components/icon/download.vue'
|
|
|
import Warning from '@/components/icon/warning.vue'
|
|
|
import Search from '@/components/icon/search.vue'
|
|
|
-import { get } from '../../utils/request'
|
|
|
+import { get, post } from '../../utils/request'
|
|
|
|
|
|
const currentPage = ref(1)
|
|
|
const size = ref(5)
|
|
|
const search = ref('')
|
|
|
+const total = ref(0)
|
|
|
+const linceseId = ref('')
|
|
|
const tableData = ref([])
|
|
|
const dialogVisible = ref(false)
|
|
|
const cancelEmail = ref('')
|
|
@@ -16,21 +18,25 @@ onMounted(() => {
|
|
|
if (pageText) {
|
|
|
pageText.childNodes[0].nodeValue = '跳至'
|
|
|
}
|
|
|
- //获取分页数据
|
|
|
+ pagingQuery()
|
|
|
+})
|
|
|
+const pagingQuery = (val) => {
|
|
|
get(
|
|
|
- 'http://81.68.234.235:8032/pdf-tech/vppLicenseCode/page?' +
|
|
|
+ 'http://81.68.234.235:8032/pdf-tech/vppDevice/page?page=' +
|
|
|
currentPage.value +
|
|
|
'&' +
|
|
|
'pageSize=' +
|
|
|
size.value
|
|
|
).then((res) => {
|
|
|
tableData.value = res.data.result.list
|
|
|
+ total.value = res.data.result.total
|
|
|
})
|
|
|
-})
|
|
|
+}
|
|
|
//打开对话框
|
|
|
const handleClick = (val) => {
|
|
|
dialogVisible.value = true
|
|
|
cancelEmail.value = val.email
|
|
|
+ linceseId.value = val.licenseCodeId
|
|
|
}
|
|
|
//导出序列码
|
|
|
const download = () => {
|
|
@@ -40,24 +46,27 @@ const download = () => {
|
|
|
}
|
|
|
)
|
|
|
}
|
|
|
+//取消授权序列码
|
|
|
+const cancelAssign = () => {
|
|
|
+ post(
|
|
|
+ 'http://81.68.234.235:8032/pdf-tech/vppLicenseCode/cancelLicenceAssign',
|
|
|
+ { licenceId: linceseId.value }
|
|
|
+ ).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+}
|
|
|
//切换每页条数
|
|
|
-const handleSizeChange = () => {
|
|
|
- console.log(`每页条`)
|
|
|
+const handleSizeChange = (val) => {
|
|
|
+ size.value = val
|
|
|
+ pagingQuery()
|
|
|
}
|
|
|
//切换分页
|
|
|
-const handleCurrentChange = () => {
|
|
|
- console.log(`当前页:`)
|
|
|
-}
|
|
|
-//按产品筛选
|
|
|
-const product = (val) => {
|
|
|
- console.log(`当前页:`)
|
|
|
+const handleCurrentChange = (val) => {
|
|
|
+ currentPage.value = val
|
|
|
+ pagingQuery()
|
|
|
}
|
|
|
-//按分配筛选
|
|
|
-const assigned = (val) => {
|
|
|
- console.log(`当前页:`)
|
|
|
-}
|
|
|
-//按团队筛选
|
|
|
-const team = (val) => {
|
|
|
+//筛选
|
|
|
+const queryString = (val) => {
|
|
|
console.log(`当前页:`)
|
|
|
}
|
|
|
</script>
|
|
@@ -151,6 +160,8 @@ const team = (val) => {
|
|
|
<button class="absolute top-8px right-8px"><Search /></button>
|
|
|
</div>
|
|
|
<button
|
|
|
+ type="button"
|
|
|
+ @click="queryString()"
|
|
|
class="
|
|
|
w-70px
|
|
|
h-28px
|
|
@@ -189,11 +200,7 @@ const team = (val) => {
|
|
|
>
|
|
|
Cancel
|
|
|
</button>
|
|
|
- <el-dialog
|
|
|
- title=""
|
|
|
- :visible.sync="dialogVisible"
|
|
|
- width="376"
|
|
|
- >
|
|
|
+ <el-dialog title="" :visible.sync="dialogVisible" width="376">
|
|
|
<Warning />
|
|
|
<p class="mt-16px">Sure cancel the license?</p>
|
|
|
<p>
|
|
@@ -203,7 +210,7 @@ const team = (val) => {
|
|
|
</p>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogVisible = false">No</el-button>
|
|
|
- <el-button type="primary" @click="dialogVisible = false">
|
|
|
+ <el-button type="primary" @click="cancelAssign()">
|
|
|
Yes
|
|
|
</el-button>
|
|
|
</span>
|
|
@@ -219,7 +226,7 @@ const team = (val) => {
|
|
|
:page-size="size"
|
|
|
:background="true"
|
|
|
layout="sizes, prev, pager, next, jumper"
|
|
|
- :total="tableData.length"
|
|
|
+ :total="total"
|
|
|
class="px-24px !rounded-0 rounded-b-8px mt-20px flex justify-end"
|
|
|
>
|
|
|
</el-pagination>
|