update
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
import { getInfo, login, logout } from "@/api/login";
|
import { getInfo, login, logout } from "@/api/login";
|
||||||
import { getToken, removeToken, setToken } from "@/utils/auth";
|
import { getToken, removeToken, setToken } from "@/utils/auth";
|
||||||
// import defAva from "@/assets/images/profile.jpg";
|
import defAva from "@/assets/images/profile.jpg";
|
||||||
|
|
||||||
const useUserStore = defineStore("user", {
|
const useUserStore = defineStore("user", {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
@ -41,10 +41,9 @@ const useUserStore = defineStore("user", {
|
|||||||
const user = res.data.user;
|
const user = res.data.user;
|
||||||
const enterprise = res.data.enterprise;
|
const enterprise = res.data.enterprise;
|
||||||
const userId = user.userId;
|
const userId = user.userId;
|
||||||
const avatar =
|
const avatar = !user.avatar
|
||||||
/*user.avatar == "" || user.avatar == null
|
|
||||||
? defAva
|
? defAva
|
||||||
:*/ user.avatar;
|
: user.avatar;
|
||||||
|
|
||||||
if (res.roles && res.roles.length > 0) {
|
if (res.roles && res.roles.length > 0) {
|
||||||
// 验证返回的roles是否是一个非空数组
|
// 验证返回的roles是否是一个非空数组
|
||||||
|
|||||||
@ -43,10 +43,12 @@
|
|||||||
icon="Search"
|
icon="Search"
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
>搜索</el-button
|
>搜索
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
<el-button icon="Refresh" size="small" @click="resetQuery"
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
>重置</el-button
|
>重置
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -58,14 +60,16 @@
|
|||||||
icon="Plus"
|
icon="Plus"
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
>新增</el-button
|
>新增
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 无接口 暂时注释 -->
|
<!-- 无接口 暂时注释 -->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<router-link to="./claimPatent">
|
<router-link to="./claimPatent">
|
||||||
<el-button type="primary" plain icon="Plus" size="small"
|
<el-button type="primary" plain icon="Plus" size="small"
|
||||||
>认领</el-button
|
>认领
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</router-link>
|
</router-link>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -106,14 +110,16 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="Edit"
|
icon="Edit"
|
||||||
@click="handleUpdate(row)"
|
@click="handleUpdate(row)"
|
||||||
>修改</el-button
|
>修改
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
type="text"
|
type="text"
|
||||||
icon="Delete"
|
icon="Delete"
|
||||||
@click="handleDelete(row.id)"
|
@click="handleDelete(row.id)"
|
||||||
>删除</el-button
|
>删除
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -253,6 +259,7 @@ import dayjs from "dayjs";
|
|||||||
import {ElMessage, ElMessageBox} from "element-plus";
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
import {patentOptions} from "@/utils/parameter";
|
import {patentOptions} from "@/utils/parameter";
|
||||||
import {useRouter} from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const {proxy} = getCurrentInstance();
|
const {proxy} = getCurrentInstance();
|
||||||
@ -316,19 +323,22 @@ const getList = async () => {
|
|||||||
expertPatentList(id, queryParams.value).then((resp) => {
|
expertPatentList(id, queryParams.value).then((resp) => {
|
||||||
dataList.value = resp.rows;
|
dataList.value = resp.rows;
|
||||||
total.value = resp.total;
|
total.value = resp.total;
|
||||||
|
}).finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
})
|
||||||
};
|
};
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
queryParams.value.pageNum = 1;
|
queryParams.value.pageNum = 1;
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
queryRef.value.resetFields();
|
queryRef.value.resetFields();
|
||||||
handleQuery();
|
handleQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
function handleDelete(id) {
|
function handleDelete(id) {
|
||||||
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的专利项?')
|
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的专利项?')
|
||||||
@ -363,6 +373,7 @@ function reset() {
|
|||||||
};
|
};
|
||||||
proxy.resetForm("patentRef");
|
proxy.resetForm("patentRef");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 添加数据 */
|
/** 添加数据 */
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
reset();
|
reset();
|
||||||
@ -395,6 +406,7 @@ const submitForm = async () => {
|
|||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 取消按钮 */
|
/** 取消按钮 */
|
||||||
function cancel() {
|
function cancel() {
|
||||||
open.value = false;
|
open.value = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user