|
@@ -1,15 +1,20 @@
|
|
|
<script setup>
|
|
|
-import { onMounted, ref } from "vue"
|
|
|
+import { onMounted, ref } from 'vue'
|
|
|
import Search from '@/components/icon/search.vue'
|
|
|
import Warning from '@/components/icon/warning.vue'
|
|
|
-import { get, downLoad, post} from '../../../utils/request'
|
|
|
+import { get, downLoad, post } from '../../../utils/request'
|
|
|
|
|
|
const tableData = ref([])
|
|
|
+const teamList = ref([])
|
|
|
+const productList = ref([])
|
|
|
const currentPage = ref(1)
|
|
|
-const search = ref('')
|
|
|
+const queryString = ref('')
|
|
|
const dialogVisible = ref(false)
|
|
|
const MemberName = ref('')
|
|
|
+const total = ref(0)
|
|
|
const teamId = ref('')
|
|
|
+const status = ref('')
|
|
|
+const product = ref('')
|
|
|
const size = ref(5)
|
|
|
const memberId = ref('')
|
|
|
|
|
@@ -20,10 +25,10 @@ const handleClick = (val) => {
|
|
|
memberId.value = val.id
|
|
|
}
|
|
|
//确认删除
|
|
|
-function deleteMember(){
|
|
|
- post("http://81.68.234.235:8032/pdf-tech/vppTeam/deleteMember",{
|
|
|
+function deleteMember() {
|
|
|
+ post('http://81.68.234.235:8032/pdf-tech/vppTeam/deleteMember', {
|
|
|
memberId: memberId.value
|
|
|
- }).then((res)=>{
|
|
|
+ }).then((res) => {
|
|
|
console.log(res)
|
|
|
})
|
|
|
}
|
|
@@ -37,45 +42,85 @@ function handleCurrentChange(val) {
|
|
|
getManageMemberList()
|
|
|
}
|
|
|
// 获取团队管理列表
|
|
|
+const getTeamList = () => {
|
|
|
+ get('http://81.68.234.235:8032/pdf-tech/vppTeam/getManageTeamList', {
|
|
|
+ teamId: '',
|
|
|
+ keyword: ''
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ teamList.value = res.data.result.list
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+//获取已购买产品
|
|
|
+const getproductList = () => {
|
|
|
+ get('http://81.68.234.235:8032/pdf-tech/product/listWithAdmin').then(
|
|
|
+ (res) => {
|
|
|
+ productList.value = res.data.result
|
|
|
+ }
|
|
|
+ )
|
|
|
+}
|
|
|
+// 获取成员列表
|
|
|
function getManageMemberList() {
|
|
|
get(
|
|
|
'http://81.68.234.235:8032/pdf-tech/vppRTeamMemberRole/pageForMember?page=' +
|
|
|
currentPage.value +
|
|
|
'&' +
|
|
|
'pageSize=' +
|
|
|
- size.value
|
|
|
+ size.value +
|
|
|
+ '&' +
|
|
|
+ 'teamId=' +
|
|
|
+ teamId.value +
|
|
|
+ '&' +
|
|
|
+ 'status=' +
|
|
|
+ status.value +
|
|
|
+ '&' +
|
|
|
+ 'queryString=' +
|
|
|
+ queryString.value +
|
|
|
+ '&' +
|
|
|
+ 'productCode=' +
|
|
|
+ product.value
|
|
|
).then((res) => {
|
|
|
const data = res.data.result.list
|
|
|
- for(let i = 0; i < data.length; i++){
|
|
|
- if(data[i].validFlag === '0'){
|
|
|
- data[i].validFlag = "Deleted"
|
|
|
- } else if(data[i].validFlag === '1'){
|
|
|
- data[i].validFlag = "Joined"
|
|
|
- }else{
|
|
|
- data[i].validFlag = "Invited"
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
+ if (data[i].validFlag === '0') {
|
|
|
+ data[i].validFlag = 'Deleted'
|
|
|
+ } else if (data[i].validFlag === '1') {
|
|
|
+ data[i].validFlag = 'Joined'
|
|
|
+ } else {
|
|
|
+ data[i].validFlag = 'Invited'
|
|
|
}
|
|
|
}
|
|
|
tableData.value = data
|
|
|
+ total.value = res.data.total
|
|
|
})
|
|
|
}
|
|
|
// 团队成员列表导出
|
|
|
function exportManageMemberList() {
|
|
|
- downLoad("http://81.68.234.235:8032/pdf-tech/vppRTeamMemberRole/download").then((res)=>{
|
|
|
- const link = document.createElement("a") //创建a标签
|
|
|
- let blob = new Blob([res], { type: "application/vnd.ms-excel" }) // response就是接口返回的文件流
|
|
|
+ downLoad(
|
|
|
+ 'http://81.68.234.235:8032/pdf-tech/vppRTeamMemberRole/download'
|
|
|
+ ).then((res) => {
|
|
|
+ const link = document.createElement('a') //创建a标签
|
|
|
+ let blob = new Blob([res], { type: 'application/vnd.ms-excel' }) // response就是接口返回的文件流
|
|
|
let objectUrl = URL.createObjectURL(blob)
|
|
|
link.href = objectUrl
|
|
|
- link.download = "团队成员" // 自定义文件名
|
|
|
+ link.download = '团队成员' // 自定义文件名
|
|
|
link.click() // 下载文件
|
|
|
URL.revokeObjectURL(objectUrl) // 释放内存
|
|
|
})
|
|
|
}
|
|
|
+//筛选
|
|
|
+const searchInfo = () => {
|
|
|
+ getManageMemberList()
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
- let pageText = document.getElementsByClassName("el-pagination__jump")[0]
|
|
|
+ let pageText = document.getElementsByClassName('el-pagination__jump')[0]
|
|
|
if (pageText) {
|
|
|
- pageText.childNodes[0].nodeValue = "跳至"
|
|
|
+ pageText.childNodes[0].nodeValue = '跳至'
|
|
|
}
|
|
|
getManageMemberList()
|
|
|
+ getTeamList()
|
|
|
+ getproductList()
|
|
|
})
|
|
|
</script>
|
|
|
|
|
@@ -85,94 +130,176 @@ onMounted(() => {
|
|
|
<div class="mt-36px mb-16px flex justify-between">
|
|
|
<h2>Content</h2>
|
|
|
<div class="flex">
|
|
|
- <el-tooltip class="item" effect="dark" content="Download data" placement="bottom">
|
|
|
- <a class="w-28px h-28px border-1 border-[#D9D9D9] rounded-4px bg-[#F9FAFB] flex justify-center items-center mr-12px cursor-pointer" @click="exportManageMemberList">
|
|
|
- <img src="@/assets/images/download.svg" alt="download">
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="dark"
|
|
|
+ content="Download data"
|
|
|
+ placement="bottom"
|
|
|
+ >
|
|
|
+ <a
|
|
|
+ class="
|
|
|
+ w-28px
|
|
|
+ h-28px
|
|
|
+ border-1 border-[#D9D9D9]
|
|
|
+ rounded-4px
|
|
|
+ bg-[#F9FAFB]
|
|
|
+ flex
|
|
|
+ justify-center
|
|
|
+ items-center
|
|
|
+ mr-12px
|
|
|
+ cursor-pointer
|
|
|
+ "
|
|
|
+ @click="exportManageMemberList"
|
|
|
+ >
|
|
|
+ <img src="@/assets/images/download.svg" alt="download" />
|
|
|
</a>
|
|
|
</el-tooltip>
|
|
|
<router-link :to="{ name: 'AddManageMember' }">
|
|
|
- <div class="h-28px px-10px py-4px bg-[#1460F3] rounded-4px text-14px leading-20px font-400 text-[#fff] cursor-pointer">Add Member</div>
|
|
|
+ <div
|
|
|
+ class="
|
|
|
+ h-28px
|
|
|
+ px-10px
|
|
|
+ py-4px
|
|
|
+ bg-[#1460F3]
|
|
|
+ rounded-4px
|
|
|
+ text-14px
|
|
|
+ leading-20px
|
|
|
+ font-400
|
|
|
+ text-[#fff]
|
|
|
+ cursor-pointer
|
|
|
+ "
|
|
|
+ >
|
|
|
+ Add Member
|
|
|
+ </div>
|
|
|
</router-link>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="block px-24px pt-32px pb-40px">
|
|
|
<div class="flex">
|
|
|
- <select name="team" class="min-w-50px mr-16px">
|
|
|
- <option value="Team">Team</option>
|
|
|
- <option value="Produce Designer">Produce Designer</option>
|
|
|
- <option value="Finance Department">Finance Department</option>
|
|
|
+ <select name="team" class="min-w-50px mr-16px" v-model="teamId">
|
|
|
+ <option value="" selected>Team</option>
|
|
|
+ <option v-for="item in teamList" :value="item.id" :key="item.id">
|
|
|
+ {{ item.name }}
|
|
|
+ </option>
|
|
|
</select>
|
|
|
- <select name="status" class="min-w-100px mr-16px">
|
|
|
- <option value="Status">Status</option>
|
|
|
- <option value="Invited">Invited</option>
|
|
|
- <option value="Joined">Joined</option>
|
|
|
- <option value="Deleted">Deleted</option>
|
|
|
+ <select name="status" class="min-w-100px mr-16px" v-model="status">
|
|
|
+ <option value="" selected>Status</option>
|
|
|
+ <option value="2">Invited</option>
|
|
|
+ <option value="1">Joined</option>
|
|
|
+ <option value="0">Deleted</option>
|
|
|
</select>
|
|
|
- <select name="Assigned Product" class="min-w-100px mr-16px">
|
|
|
- <option value="Assigned Product">Assigned Product</option>
|
|
|
- <option value="PDF Reader Pro Win">PDF Reader Pro Win</option>
|
|
|
- <option value="PDF Reader Pro Mac">PDF Reader Pro Mac</option>
|
|
|
+ <select name="Assigned Product" class="min-w-100px mr-16px" v-model="product">
|
|
|
+ <option value="" selected>Assigned Product</option>
|
|
|
+ <option
|
|
|
+ v-for="item in productList"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ {{ item.name }}
|
|
|
+ </option>
|
|
|
</select>
|
|
|
<div class="relative mr-16px">
|
|
|
<el-input
|
|
|
- v-model="search"
|
|
|
- size="mini"
|
|
|
- class="!w-316px input-with-select"
|
|
|
- placeholder="Search Member Name/Email/Device UUID"
|
|
|
+ v-model="queryString"
|
|
|
+ size="mini"
|
|
|
+ class="!w-316px input-with-select"
|
|
|
+ placeholder="Search Member Name/Email/Device UUID"
|
|
|
>
|
|
|
- </el-input>
|
|
|
- <button class="absolute top-8px right-8px"><Search /></button>
|
|
|
+ </el-input>
|
|
|
+ <button class="absolute top-8px right-8px"><Search /></button>
|
|
|
</div>
|
|
|
- <div class="w-70px h-28px border-[#1460F3] border-1px rounded-4px px-10px py-4px text-14px leading-20px text-[#1460F3] cursor-pointer">Confirm</div>
|
|
|
+ <button
|
|
|
+ type="button"
|
|
|
+ @click="searchInfo()"
|
|
|
+ class="
|
|
|
+ w-70px
|
|
|
+ h-28px
|
|
|
+ border-[#1460F3] border-1px
|
|
|
+ rounded-4px
|
|
|
+ px-10px
|
|
|
+ py-4px
|
|
|
+ text-14px
|
|
|
+ leading-20px
|
|
|
+ text-[#1460F3]
|
|
|
+ cursor-pointer
|
|
|
+ "
|
|
|
+ >
|
|
|
+ Confirm
|
|
|
+ </button>
|
|
|
</div>
|
|
|
- <el-table
|
|
|
- :data="tableData"
|
|
|
- style="width: 100%">
|
|
|
- <el-table-column
|
|
|
- prop="fullName"
|
|
|
- label="Member Name"
|
|
|
- min-width="100px">
|
|
|
+ <el-table :data="tableData" style="width: 100%">
|
|
|
+ <el-table-column prop="fullName" label="Member Name" min-width="100px">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="email"
|
|
|
- label="Email"
|
|
|
- min-width="100px">
|
|
|
+ <el-table-column prop="email" label="Email" min-width="100px">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="teamName"
|
|
|
- label="Team"
|
|
|
- min-width="130px">
|
|
|
+ <el-table-column prop="teamName" label="Team" min-width="130px">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="validFlag"
|
|
|
- label="Status"
|
|
|
- min-width="80px">
|
|
|
+ <el-table-column prop="validFlag" label="Status" min-width="80px">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="productNames"
|
|
|
label="Assigned Product"
|
|
|
- min-width="150px">
|
|
|
+ min-width="150px"
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="uniqueSns"
|
|
|
label="Activated Device UUID"
|
|
|
- min-width="178px">
|
|
|
+ min-width="178px"
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="id"
|
|
|
class="hidden"
|
|
|
label="Activated Device UUID"
|
|
|
- min-width="178px">
|
|
|
+ min-width="178px"
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="Operate"
|
|
|
- min-width="62px">
|
|
|
+ <el-table-column label="Operate" min-width="62px">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- <router-link :to="{ name: 'EditManageMember', query: { MemberName: scope.row.fullName, Email: scope.row.email, Team: scope.row.teamName, Id: scope.row.id } }">
|
|
|
- <div class="w-61px h-20px border-1 border-[#1460F3] rounded-4px text-center text-14px leading-20px text-[#1460F3] cursor-pointer mb-8px">Edit</div>
|
|
|
+ <router-link
|
|
|
+ :to="{
|
|
|
+ name: 'EditManageMember',
|
|
|
+ query: {
|
|
|
+ MemberName: scope.row.fullName,
|
|
|
+ Email: scope.row.email,
|
|
|
+ Team: scope.row.teamName,
|
|
|
+ Id: scope.row.id,
|
|
|
+ },
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ class="
|
|
|
+ w-61px
|
|
|
+ h-20px
|
|
|
+ border-1 border-[#1460F3]
|
|
|
+ rounded-4px
|
|
|
+ text-center text-14px
|
|
|
+ leading-20px
|
|
|
+ text-[#1460F3]
|
|
|
+ cursor-pointer
|
|
|
+ mb-8px
|
|
|
+ "
|
|
|
+ >
|
|
|
+ Edit
|
|
|
+ </div>
|
|
|
</router-link>
|
|
|
- <div class="w-61px h-20px border-1 border-[#1460F3] rounded-4px text-center text-14px leading-20px text-[#1460F3] cursor-pointer" @click="handleClick(scope.row)">Delete</div>
|
|
|
+ <div
|
|
|
+ class="
|
|
|
+ w-61px
|
|
|
+ h-20px
|
|
|
+ border-1 border-[#1460F3]
|
|
|
+ rounded-4px
|
|
|
+ text-center text-14px
|
|
|
+ leading-20px
|
|
|
+ text-[#1460F3]
|
|
|
+ cursor-pointer
|
|
|
+ "
|
|
|
+ @click="handleClick(scope.row)"
|
|
|
+ >
|
|
|
+ Delete
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -189,7 +316,9 @@ onMounted(() => {
|
|
|
<Warning class="inline-block" />
|
|
|
<div class="mt-16px text-16px leading-24px text-[#232A40]">
|
|
|
<p>Sure Delete member?</p>
|
|
|
- <p>Team Name: <span class="font-bold">{{ MemberName }}</span></p>
|
|
|
+ <p>
|
|
|
+ Team Name: <span class="font-bold">{{ MemberName }}</span>
|
|
|
+ </p>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogVisible = false">No</el-button>
|
|
@@ -204,14 +333,8 @@ onMounted(() => {
|
|
|
:page-size="1"
|
|
|
:background="true"
|
|
|
layout="prev, pager, next, sizes, jumper"
|
|
|
- :total="tableData.length"
|
|
|
- class="
|
|
|
- px-24px
|
|
|
- !rounded-0
|
|
|
- rounded-b-8px
|
|
|
- flex
|
|
|
- justify-end
|
|
|
- "
|
|
|
+ :total="total"
|
|
|
+ class="px-24px !rounded-0 rounded-b-8px flex justify-end"
|
|
|
>
|
|
|
</el-pagination>
|
|
|
</div>
|
|
@@ -240,7 +363,7 @@ onMounted(() => {
|
|
|
}
|
|
|
::v-deep .input-with-select .el-input__inner {
|
|
|
padding: 0 20px 0 8px;
|
|
|
- border-color: #D9D9D9;
|
|
|
+ border-color: #d9d9d9;
|
|
|
}
|
|
|
::v-deep .input-with-select .el-input__inner::placeholder {
|
|
|
font-size: 14px;
|
|
@@ -263,9 +386,9 @@ onMounted(() => {
|
|
|
height: 32px;
|
|
|
padding: 0;
|
|
|
&.el-button--default {
|
|
|
- border-color: #1460F3;
|
|
|
+ border-color: #1460f3;
|
|
|
span {
|
|
|
- color: #1460F3;
|
|
|
+ color: #1460f3;
|
|
|
}
|
|
|
}
|
|
|
span {
|