|
@@ -21,17 +21,22 @@
|
|
|
v-loading="loading"
|
|
|
:header-cell-style="headerCellStyle"
|
|
|
>
|
|
|
- <el-table-column label="标识" min-width="45" show-overflow-tooltip>
|
|
|
+ <el-table-column label="正式名称" min-width="45" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">{{
|
|
|
+ scope.row.url[0].name ? scope.row.url[0].name : "-"
|
|
|
+ }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="标识" min-width="45" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">{{
|
|
|
scope.row.toolId ? scope.row.toolId : "-"
|
|
|
}}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="宽度" min-width="45" show-overflow-tooltip>
|
|
|
+ <el-table-column label="窗口宽度" min-width="45" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">{{
|
|
|
scope.row.dialogWidth ? scope.row.dialogWidth : "-"
|
|
|
}}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="高度" min-width="45" show-overflow-tooltip>
|
|
|
+ <el-table-column label="窗口高度" min-width="45" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">{{
|
|
|
scope.row.dialogHeight ? scope.row.dialogHeight : "-"
|
|
|
}}</template>
|
|
@@ -43,7 +48,7 @@
|
|
|
}}</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column label="工具设置" min-width="45" show-overflow-tooltip>
|
|
|
+ <el-table-column label="工具设置" width="102" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<el-popover placement="bottom" width="840" trigger="hover">
|
|
|
<div class="urlItemBox">
|
|
@@ -86,7 +91,7 @@
|
|
|
<span v-else>-</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div>
|
|
|
+ <!-- <div>
|
|
|
<span>默认图标:</span>
|
|
|
<div class="ui_m_image">
|
|
|
<el-image
|
|
@@ -109,11 +114,11 @@
|
|
|
></el-image>
|
|
|
<span v-else>-</span>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-button slot="reference">查看设置</el-button>
|
|
|
+ <el-button slot="reference" size="small">查看设置</el-button>
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -181,7 +186,7 @@
|
|
|
v-if="scope.row.status == '1'"
|
|
|
@click="changeToolStatus(scope.row, '0')"
|
|
|
style="
|
|
|
- color: #67C23A;
|
|
|
+ color: #67c23a;
|
|
|
background: none;
|
|
|
border: none;
|
|
|
cursor: pointer;
|
|
@@ -214,10 +219,15 @@
|
|
|
<script>
|
|
|
import { API_CONFIG } from "@/common/apiConfig";
|
|
|
import addDesktopToolDialog from "./dialog/addDesktopToolDialog.vue";
|
|
|
+import { addOp } from "@/api/user";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
components: {
|
|
|
addDesktopToolDialog,
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(["userid"]),
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
desktopList: [],
|
|
@@ -282,7 +292,7 @@ export default {
|
|
|
{
|
|
|
functionName: "update_desktopToolById",
|
|
|
id: form.id,
|
|
|
- toolId:form.toolId,
|
|
|
+ toolId: form.toolId,
|
|
|
width: form.dialogWidth,
|
|
|
height: form.dialogHeight,
|
|
|
description: form.description,
|
|
@@ -296,12 +306,18 @@ export default {
|
|
|
this.$refs.addDesktopToolDialogRef.loading = true;
|
|
|
this.$ajax
|
|
|
.post(API_CONFIG.baseUrl, params)
|
|
|
- .then((res) => {
|
|
|
+ .then(async (res) => {
|
|
|
if (res.data == 1) {
|
|
|
this.$refs.addDesktopToolDialogRef.close();
|
|
|
this.$message.success("修改工具成功");
|
|
|
- } else if(res.data[0][0].message == "repeat toolId"){
|
|
|
- this.$message.error("工具标识重复!")
|
|
|
+ await addOp({
|
|
|
+ uid: this.userid,
|
|
|
+ cid: "",
|
|
|
+ type: "user_op",
|
|
|
+ content: `修改了了工具:${form.toolId}`,
|
|
|
+ });
|
|
|
+ } else if (res.data[0][0].message == "repeat toolId") {
|
|
|
+ this.$message.error("工具标识重复!");
|
|
|
} else {
|
|
|
this.$message.error("修改工具失败");
|
|
|
}
|
|
@@ -317,7 +333,7 @@ export default {
|
|
|
let params = [
|
|
|
{
|
|
|
functionName: "insert_desktopTool",
|
|
|
- toolId:form.toolId,
|
|
|
+ toolId: form.toolId,
|
|
|
width: form.dialogWidth,
|
|
|
height: form.dialogHeight,
|
|
|
description: form.description,
|
|
@@ -330,14 +346,20 @@ export default {
|
|
|
this.$refs.addDesktopToolDialogRef.loading = true;
|
|
|
this.$ajax
|
|
|
.post(API_CONFIG.baseUrl, params)
|
|
|
- .then((res) => {
|
|
|
- console.log(res)
|
|
|
+ .then(async (res) => {
|
|
|
+ console.log(res);
|
|
|
if (res.data == 1) {
|
|
|
this.$refs.addDesktopToolDialogRef.close();
|
|
|
this.$message.success("添加工具成功");
|
|
|
- } else if(res.data[0][0].message == "repeat toolId"){
|
|
|
- this.$message.error("工具标识重复!")
|
|
|
- }else{
|
|
|
+ await addOp({
|
|
|
+ uid: this.userid,
|
|
|
+ cid: "",
|
|
|
+ type: "user_op",
|
|
|
+ content: `添加了工具:${form.toolId}`,
|
|
|
+ });
|
|
|
+ } else if (res.data[0][0].message == "repeat toolId") {
|
|
|
+ this.$message.error("工具标识重复!");
|
|
|
+ } else {
|
|
|
this.$message.error("添加工具失败");
|
|
|
}
|
|
|
this.$refs.addDesktopToolDialogRef.loading = false;
|
|
@@ -365,7 +387,7 @@ export default {
|
|
|
{
|
|
|
functionName: "update_desktopToolById",
|
|
|
id: _data.id,
|
|
|
- toolId:_data.toolId,
|
|
|
+ toolId: _data.toolId,
|
|
|
width: _data.dialogWidth,
|
|
|
height: _data.dialogHeight,
|
|
|
description: _data.description,
|
|
@@ -378,11 +400,31 @@ export default {
|
|
|
];
|
|
|
this.$ajax
|
|
|
.post(API_CONFIG.baseUrl, params)
|
|
|
- .then((res) => {
|
|
|
+ .then(async (res) => {
|
|
|
if (res.data == 1) {
|
|
|
- this.$message.success("已停用");
|
|
|
+ if (newValue == 1) {
|
|
|
+ this.$message.success("已停用");
|
|
|
+ await addOp({
|
|
|
+ uid: this.userid,
|
|
|
+ cid: "",
|
|
|
+ type: "user_op",
|
|
|
+ content: `停用了工具:${item.toolId}`,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message.success("已启用");
|
|
|
+ await addOp({
|
|
|
+ uid: this.userid,
|
|
|
+ cid: "",
|
|
|
+ type: "user_op",
|
|
|
+ content: `启用了工具:${item.toolId}`,
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
- this.$message.error("停用失败");
|
|
|
+ if (newValue == 1) {
|
|
|
+ this.$message.success("停用失败");
|
|
|
+ } else {
|
|
|
+ this.$message.success("启用失败");
|
|
|
+ }
|
|
|
}
|
|
|
this.loading = false;
|
|
|
this.getData();
|
|
@@ -438,7 +480,7 @@ export default {
|
|
|
|
|
|
.urlItem {
|
|
|
width: 400px;
|
|
|
- height: 250px;
|
|
|
+ height: 170px;
|
|
|
overflow: auto;
|
|
|
position: relative;
|
|
|
box-sizing: border-box;
|