|
@@ -4,7 +4,7 @@
|
|
|
<template slot="searchItem1">
|
|
|
<span class="label">指标ID</span>
|
|
|
<el-input
|
|
|
- v-model="searchParams.id"
|
|
|
+ v-model="searchParams.packageId"
|
|
|
size="small"
|
|
|
clearable
|
|
|
placeholder="请输入"
|
|
@@ -14,7 +14,7 @@
|
|
|
<template slot="searchItem2">
|
|
|
<span class="label">指标名称</span>
|
|
|
<el-input
|
|
|
- v-model="searchParams.clientOrgName"
|
|
|
+ v-model="searchParams.packageName"
|
|
|
size="small"
|
|
|
clearable
|
|
|
placeholder="请输入"
|
|
@@ -24,43 +24,41 @@
|
|
|
<template slot="searchItem3">
|
|
|
<span class="label">创建时间</span>
|
|
|
<el-date-picker
|
|
|
- v-model="searchParams.clientOrgName1"
|
|
|
- type="date"
|
|
|
- placeholder="选择日期"
|
|
|
+ v-model="searchDate"
|
|
|
+ type="daterange"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
</template>
|
|
|
|
|
|
<template slot="searchBtn1">
|
|
|
- <el-button type="primary">查询</el-button>
|
|
|
+ <el-button type="primary" @click="doSearch">查询</el-button>
|
|
|
</template>
|
|
|
<template slot="searchBtn2">
|
|
|
- <el-button type="primary">重置</el-button>
|
|
|
+ <el-button type="primary" @click="doReset">重置</el-button>
|
|
|
</template>
|
|
|
</search-layout>
|
|
|
|
|
|
<div class="tabsBox">
|
|
|
- <toolbarTab
|
|
|
- :isConnect="true"
|
|
|
- position="top"
|
|
|
- :subPageActiveName="subPageActiveName"
|
|
|
- :toolbarItem="pageBtnList"
|
|
|
- @toolbarClick="pageControl"
|
|
|
- class="toolbarTab"
|
|
|
- >
|
|
|
- </toolbarTab>
|
|
|
+ <el-tabs v-model="activeName" type="card" @tab-click="pageControl">
|
|
|
+ <el-tab-pane label="公有" name="1"></el-tab-pane>
|
|
|
+ <el-tab-pane label="私有" name="2"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
<el-button
|
|
|
+ class="addBtn"
|
|
|
icon="el-icon-circle-plus-outline"
|
|
|
@click="addConfig"
|
|
|
type="primary"
|
|
|
- plain
|
|
|
- :disabled="activitedPageNum === 1"
|
|
|
+ :disabled="activeName === '1'"
|
|
|
>新增</el-button
|
|
|
>
|
|
|
</div>
|
|
|
|
|
|
<tableList
|
|
|
- v-if="activitedPageNum === 1"
|
|
|
ref="table"
|
|
|
style="margin: 0 30px"
|
|
|
:columns="columns"
|
|
@@ -71,39 +69,25 @@
|
|
|
<el-table-column label="操作" slot="cgInfos" align="center">
|
|
|
<template v-slot="scope">
|
|
|
<i
|
|
|
- @click="addMarkDia(scope.row)"
|
|
|
+ v-if="activeName === '2'"
|
|
|
+ @click="shareRow(scope.row)"
|
|
|
+ class="el-icon-share elIcon"
|
|
|
+ title="分享"
|
|
|
+ ></i>
|
|
|
+ <i
|
|
|
+ @click="editRow(scope.row)"
|
|
|
class="el-icon-edit-outline elIcon"
|
|
|
+ title="编辑"
|
|
|
+ ></i>
|
|
|
+ <i
|
|
|
+ v-if="activeName === '2'"
|
|
|
+ @click="delRow(scope.row)"
|
|
|
+ class="el-icon-delete elIcon"
|
|
|
+ title="删除"
|
|
|
></i>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</tableList>
|
|
|
- <div v-else>
|
|
|
- <tableList
|
|
|
- ref="tableA"
|
|
|
- style="margin: 0 30px"
|
|
|
- :columns="columnsA"
|
|
|
- :getDataWay="getDataWayA"
|
|
|
- :pagination="paginationA"
|
|
|
- index
|
|
|
- >
|
|
|
- <el-table-column label="操作" slot="cgInfos" align="center">
|
|
|
- <template v-slot="scope">
|
|
|
- <i
|
|
|
- @click="addMarkDia(scope.row)"
|
|
|
- class="el-icon-share elIcon"
|
|
|
- ></i>
|
|
|
- <i
|
|
|
- @click="addMarkDia(scope.row)"
|
|
|
- class="el-icon-edit-outline elIcon"
|
|
|
- ></i>
|
|
|
- <i
|
|
|
- @click="addMarkDia(scope.row)"
|
|
|
- class="el-icon-delete elIcon"
|
|
|
- ></i>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </tableList>
|
|
|
- </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -119,65 +103,21 @@ export default {
|
|
|
return {
|
|
|
searchParams: {
|
|
|
//搜索参数
|
|
|
- id: "", //ID
|
|
|
- clientOrgName: "", //车辆名称
|
|
|
- clientOrgName1: "", //配置名称
|
|
|
- clientOrgName2: "", //配置描述
|
|
|
+ packageId: "", //指标ID
|
|
|
+ packageName: "", //指标名称
|
|
|
+ yearMin: "", // 开始时间
|
|
|
+ yearMax: "", // 结束时间
|
|
|
},
|
|
|
- activitedPageNum: 1,
|
|
|
- subPageActiveName: 1,
|
|
|
- pageBtnList: [
|
|
|
- {
|
|
|
- type: "primary",
|
|
|
- title: "公有",
|
|
|
- key: "all",
|
|
|
- fromId: 1,
|
|
|
- method: "showAll",
|
|
|
- plain: true,
|
|
|
- disabled: false,
|
|
|
- },
|
|
|
- {
|
|
|
- type: "primary",
|
|
|
- title: "私有",
|
|
|
- key: "notRead",
|
|
|
- fromId: 2,
|
|
|
- method: "showNotRead",
|
|
|
- plain: true,
|
|
|
- disabled: false,
|
|
|
- },
|
|
|
- ],
|
|
|
+ searchDate: "", // 创建时间
|
|
|
+ activeName: "1",
|
|
|
columns: [
|
|
|
{
|
|
|
label: "指标ID",
|
|
|
- prop: "id",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "指标名称",
|
|
|
- prop: "ktName",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "场景数量",
|
|
|
- prop: "jbSource",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "创建时间",
|
|
|
- prop: "startDateStr",
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "操作",
|
|
|
- prop: "cgInfos",
|
|
|
- template: true,
|
|
|
- },
|
|
|
- ],
|
|
|
- columnsA: [
|
|
|
- {
|
|
|
- label: "指标ID",
|
|
|
- prop: "id",
|
|
|
+ prop: "packageId",
|
|
|
},
|
|
|
{
|
|
|
label: "指标名称",
|
|
|
- prop: "ktName",
|
|
|
+ prop: "packageName",
|
|
|
},
|
|
|
{
|
|
|
label: "场景数量",
|
|
@@ -202,68 +142,116 @@ export default {
|
|
|
pageSizes: [10, 30, 50, 100, 200],
|
|
|
layout: "sizes, total, prev, pager, next, jumper",
|
|
|
},
|
|
|
- paginationA: {
|
|
|
- //分页使用
|
|
|
- currentPage: 1,
|
|
|
- pageSize: 10,
|
|
|
- position: "right",
|
|
|
- pageSizes: [10, 30, 50, 100, 200],
|
|
|
- layout: "sizes, total, prev, pager, next, jumper",
|
|
|
- },
|
|
|
getDataWay: {
|
|
|
//加载表格数据
|
|
|
- dataType: "data",
|
|
|
- type: "post",
|
|
|
- firstRequest: false,
|
|
|
- data: [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- ktName: "kjdhfkjsdhfkjsjhdfksdjhfkhwoieyrhfisdhfksjhdf",
|
|
|
- jbSource: "收到就好付款时间的回复可见收到货覅无痕",
|
|
|
- },
|
|
|
- { id: 2 },
|
|
|
- { id: 3 },
|
|
|
- { id: 4 },
|
|
|
- { id: 5 },
|
|
|
- { id: 6 },
|
|
|
- ],
|
|
|
- param: {},
|
|
|
- },
|
|
|
- getDataWayA: {
|
|
|
- //加载表格数据
|
|
|
- dataType: "data",
|
|
|
+ dataType: "url",
|
|
|
type: "post",
|
|
|
- firstRequest: false,
|
|
|
- data: [
|
|
|
- {
|
|
|
- id: 6,
|
|
|
- ktName: "沃尔沃二",
|
|
|
- jbSource: "收到就好付款时间的回复可见收到货覅无痕",
|
|
|
- },
|
|
|
- { id: 66 },
|
|
|
- {
|
|
|
- id: 666,
|
|
|
- tName: "沃尔沃二",
|
|
|
- jbSource: "收到就好付款时间的回复可见收到货覅无痕",
|
|
|
- },
|
|
|
- { id: 6666 },
|
|
|
- { id: 51 },
|
|
|
- { id: 6 },
|
|
|
- ],
|
|
|
- param: {},
|
|
|
+ // firstRequest: false,
|
|
|
+ data: this.$api.sceneLibrary.queryScenePackageList,
|
|
|
+ param: {
|
|
|
+ share: "1"
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ doSearch() {
|
|
|
+ if (this.searchDate) {
|
|
|
+ this.searchParams.yearMin = `${this.searchDate[0]} 00:00:00`;
|
|
|
+ this.searchParams.yearMax = `${this.searchDate[1]} 23:59:59`;
|
|
|
+ } else {
|
|
|
+ this.searchParams.yearMin = "";
|
|
|
+ this.searchParams.yearMax = "";
|
|
|
+ }
|
|
|
+
|
|
|
+ let pageMap = {
|
|
|
+ packageId: this.searchParams.packageId,
|
|
|
+ packageName: this.searchParams.packageName,
|
|
|
+ yearMin: this.searchParams.yearMin,
|
|
|
+ yearMax: this.searchParams.yearMax,
|
|
|
+ share: this.activeName === "1" ? "1" : "0",
|
|
|
+ };
|
|
|
+ this.refreshList(pageMap);
|
|
|
+ },
|
|
|
+ //刷新table
|
|
|
+ refreshList(param) {
|
|
|
+ param
|
|
|
+ ? this.$refs["table"].loadData(param)
|
|
|
+ : this.$refs["table"].loadData();
|
|
|
+ },
|
|
|
+ doReset() {
|
|
|
+ this.searchParams = {
|
|
|
+ packageId: "",
|
|
|
+ packageName: "",
|
|
|
+ yearMin: "",
|
|
|
+ yearMax: "",
|
|
|
+ };
|
|
|
+ this.searchDate = "";
|
|
|
+ this.doSearch();
|
|
|
+ },
|
|
|
pageControl(data) {
|
|
|
- this.activitedPageNum = data.fromId;
|
|
|
+ this.activeName = data.name;
|
|
|
+ this.doSearch();
|
|
|
},
|
|
|
addConfig() {
|
|
|
this.$router.push({ path: "/scenePacketList" });
|
|
|
},
|
|
|
- addMarkDia() {},
|
|
|
+ shareRow(row) {
|
|
|
+ this.$confirm("确认是否分享?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then((e) => {
|
|
|
+ this.$axios({
|
|
|
+ method: "post",
|
|
|
+ url: this.$api.sceneLibrary.fxScoringRules,
|
|
|
+ data: {
|
|
|
+ rulesId: row.rulesId,
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("分享成功");
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message || "分享失败");
|
|
|
+ }
|
|
|
+ this.doSearch();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ delRow(row) {
|
|
|
+ this.$confirm("确认是否删除?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then((e) => {
|
|
|
+ this.$axios({
|
|
|
+ method: "post",
|
|
|
+ url: this.$api.sceneLibrary.deleteScoringRules,
|
|
|
+ data: {
|
|
|
+ rulesId: row.rulesId,
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message || "删除失败");
|
|
|
+ }
|
|
|
+ this.doSearch();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ editRow(row) {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/scenePacketList",
|
|
|
+ query: {
|
|
|
+ formData: {
|
|
|
+ packageId: row.packageId
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
- created() {},
|
|
|
+ // created() {},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -274,12 +262,15 @@ export default {
|
|
|
|
|
|
.el-button {
|
|
|
position: absolute;
|
|
|
+ bottom: 18px;
|
|
|
right: 40px;
|
|
|
- top: 45px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-.toolbarTab {
|
|
|
- margin: 45px 40px 15px;
|
|
|
+.el-range-editor.el-input__inner {
|
|
|
+ padding: 0 10px;
|
|
|
+}
|
|
|
+/deep/ .el-date-editor .el-range-separator {
|
|
|
+ width: 6%;
|
|
|
}
|
|
|
</style>
|