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