Commit d8e67540 authored by 徐一鸣's avatar 徐一鸣

up pages

parent 00300dc2
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
type="primary" type="primary"
@click="addRow()" @click="addRow()"
class="ces_toolbar_btn" class="ces_toolbar_btn"
>新增</el-button> >新增</el-button
>
<el-input <el-input
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-if="searchShow" v-if="searchShow"
...@@ -95,9 +96,19 @@ ...@@ -95,9 +96,19 @@
:header-cell-class-name="headerCellClassName" :header-cell-class-name="headerCellClassName"
v-cloak v-cloak
> >
<el-table-column v-if="isSelection" type="selection" align="center"></el-table-column> <el-table-column
v-if="isSelection"
type="selection"
align="center"
></el-table-column>
<!-- 序号 --> <!-- 序号 -->
<el-table-column v-if="isIndex" type="index" :label="indexLabel" width="80" align="center"></el-table-column> <el-table-column
v-if="isIndex"
type="index"
:label="indexLabel"
width="80"
align="center"
></el-table-column>
<!-- 数据栏 --> <!-- 数据栏 -->
<el-table-column <el-table-column
...@@ -114,28 +125,45 @@ ...@@ -114,28 +125,45 @@
<!-- 操作按钮 --> <!-- 操作按钮 -->
<span v-if="item.type === 'Button'"> <span v-if="item.type === 'Button'">
<b v-for="(btn, key) in item.btnList" :key="key"> <b v-for="(btn, key) in item.btnList" :key="key">
<em v-if="btn.label == '分配'">
<em <em
class="action" v-if="btn.label == '分配' && scope.row.state == 0"
v-if="btn.label == '分配'||btn.label == '已分配'" class="cur_pointer"
style="color: #0f2683"
@click="handleClick(btn.type, scope.row)"
> >
<em v-if="btn.label == '分配'&&scope.row.state == 0" style="color: #0f2683" @click="handleClick(btn.type, scope.row)">{{ btn.label }}</em> 分配
<em v-if="btn.label == '已分配'&&scope.row.state == 1">{{ btn.label }}</em>
</em> </em>
<em v-if="btn.label == '分配' && scope.row.state == 1">
已分配
</em>
</em>
<em <em
class="action" class="cur_pointer"
v-else-if="btn.label == '删除'&&btn.local" v-else-if="btn.label == '删除' && btn.local"
:class="btn.type" :class="btn.type"
:style="{color: btn.label=='删除' ? '#830f53' : '#0f2683'}" :style="{
color: btn.label == '删除' ? '#830f53' : '#0f2683',
}"
@click="deleteLocal(scope)" @click="deleteLocal(scope)"
>{{ btn.label }}</em> >{{ btn.label }}</em
>
<em <em
class="action" class="cur_pointer"
v-else v-else
:class="btn.type" :class="btn.type"
:style="{color: btn.label=='删除' ? '#830f53' : '#0f2683'}" :style="{
color: btn.label == '删除' ? '#830f53' : '#0f2683',
}"
@click="handleClick(btn.type, scope.row)" @click="handleClick(btn.type, scope.row)"
>{{ btn.label }}</em> >{{ btn.label }}</em
<em v-if="btn.line" style="padding:0 20px;color:#edf0ff">{{ btn.line }}</em> >
<em v-if="btn.line" style="padding:0 20px;color:#edf0ff">
{{ btn.line }}
</em>
</b> </b>
</span> </span>
<!--href 链接--> <!--href 链接-->
...@@ -171,7 +199,9 @@ ...@@ -171,7 +199,9 @@
trigger="hover" trigger="hover"
:content="scope.row[item.prop]" :content="scope.row[item.prop]"
> >
<div slot="reference" class="overlit">{{ scope.row[item.prop] }}</div> <div slot="reference" class="overlit">
{{ scope.row[item.prop] }}
</div>
</el-popover> </el-popover>
<!-- others --> <!-- others -->
<span v-else>{{ scope.row[item.prop] }}</span> <span v-else>{{ scope.row[item.prop] }}</span>
...@@ -240,7 +270,7 @@ export default { ...@@ -240,7 +270,7 @@ export default {
"v-apaas-table-input": tableInput, "v-apaas-table-input": tableInput,
"v-apaas-table-select": tableSelect, "v-apaas-table-select": tableSelect,
"v-apaas-table-umhref": tableUmhref, "v-apaas-table-umhref": tableUmhref,
"d-confirm": DConfirm "d-confirm": DConfirm,
}, },
props: { props: {
// 表格型号:mini,medium,small // 表格型号:mini,medium,small
...@@ -265,78 +295,78 @@ export default { ...@@ -265,78 +295,78 @@ export default {
// }, // },
searchShow: { searchShow: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
url: { url: {
type: String, type: String,
default: "" default: "",
}, },
detailsUrl: { detailsUrl: {
type: String, type: String,
default: "" default: "",
}, },
rowprop: { rowprop: {
type: String, type: String,
default: "" default: "",
}, },
ready: { ready: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
addRowBtn: { addRowBtn: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
couldNotEdit: { couldNotEdit: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
refreshInit: { type: Boolean }, refreshInit: { type: Boolean },
sortBy: { sortBy: {
type: String, type: String,
default: "" default: "",
}, },
searchNoName: { type: Boolean, default: false }, searchNoName: { type: Boolean, default: false },
emptyText: { emptyText: {
type: String, type: String,
default: "暂无数据" default: "暂无数据",
}, },
autoAdd: { autoAdd: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
border: { border: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
stripe: { stripe: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
radius: { radius: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
pageSizeShow: { pageSizeShow: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
paginationShow: { paginationShow: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
headerCellClassName: { headerCellClassName: {
type: String, type: String,
default: "" default: "",
}, },
filterList: { filterList: {
type: Array, type: Array,
default: null default: null,
}, },
showHeader: { showHeader: {
type: Boolean, type: Boolean,
default: true default: true,
} },
}, },
data() { data() {
return { return {
...@@ -344,7 +374,7 @@ export default { ...@@ -344,7 +374,7 @@ export default {
pagination: { pagination: {
rowsPerPage: 10, rowsPerPage: 10,
page: 1, page: 1,
total: 0 total: 0,
}, },
delSelect: null, delSelect: null,
helper: helper, helper: helper,
...@@ -353,23 +383,23 @@ export default { ...@@ -353,23 +383,23 @@ export default {
pageOptions: [ pageOptions: [
{ {
value: "10", value: "10",
label: "10" label: "10",
}, },
{ {
value: "20", value: "20",
label: "20" label: "20",
}, },
{ {
value: "50", value: "50",
label: "50" label: "50",
} },
], ],
search: "", search: "",
times: null, times: null,
showFliterList: false, showFliterList: false,
filterData: null, // 筛选条件 filterData: null, // 筛选条件
filterToggle: null, // 控制筛选条件的展开和收起 filterToggle: null, // 控制筛选条件的展开和收起
filterLength: 0 // 每行最多可容纳多少个过滤条件 filterLength: 0, // 每行最多可容纳多少个过滤条件
}; };
}, },
mounted() { mounted() {
...@@ -387,25 +417,25 @@ export default { ...@@ -387,25 +417,25 @@ export default {
if (val) { if (val) {
this.getDataFromApiSync(); this.getDataFromApiSync();
} }
} },
}, },
url: { url: {
handler(val) { handler(val) {
this.getDataFromApiSync(); this.getDataFromApiSync();
}, },
deep: true deep: true,
}, },
filterList: { filterList: {
handler(val) { handler(val) {
this.initFilterData(); this.initFilterData();
}, },
deep: true deep: true,
} },
}, },
methods: { methods: {
//本地删除 //本地删除
deleteLocal(val){ deleteLocal(val) {
this.selectedTabsPage.splice(val.$index, 1)  this.selectedTabsPage.splice(val.$index, 1);
}, },
// get data // get data
getDataFromApiSync() { getDataFromApiSync() {
...@@ -420,14 +450,14 @@ export default { ...@@ -420,14 +450,14 @@ export default {
} }
} else { } else {
this.getDataFromApi().then( this.getDataFromApi().then(
data => { (data) => {
this.selectedTabsPage = JSON.parse(JSON.stringify(data.newArr)); this.selectedTabsPage = JSON.parse(JSON.stringify(data.newArr));
this.pagination.total = data.total; this.pagination.total = data.total;
if (this.autoAdd) { if (this.autoAdd) {
this.addRow(); this.addRow();
} }
}, },
err => { (err) => {
console.log("失败" + err); console.log("失败" + err);
} }
); );
...@@ -440,7 +470,7 @@ export default { ...@@ -440,7 +470,7 @@ export default {
this.all_url = `/static/data.json`; this.all_url = `/static/data.json`;
this.$http this.$http
.get(this.all_url) .get(this.all_url)
.then(response => { .then((response) => {
let newArr = response.data.data[this.url]; let newArr = response.data.data[this.url];
// if it is true url, total is response's total // if it is true url, total is response's total
let total = newArr.length; let total = newArr.length;
...@@ -485,7 +515,7 @@ export default { ...@@ -485,7 +515,7 @@ export default {
this.$message({ this.$message({
showClose: true, showClose: true,
message: this.label + "成功", message: this.label + "成功",
type: "success" type: "success",
}); });
}, },
switchChange(val) { switchChange(val) {
...@@ -557,7 +587,7 @@ export default { ...@@ -557,7 +587,7 @@ export default {
if (this.filterList && this.filterList.length) { if (this.filterList && this.filterList.length) {
this.filterData = {}; this.filterData = {};
this.filterToggle = {}; this.filterToggle = {};
this.filterList.forEach(item => { this.filterList.forEach((item) => {
this.$set(this.filterData, item.prop, []); this.$set(this.filterData, item.prop, []);
this.$set(this.filterToggle, item.prop, false); this.$set(this.filterToggle, item.prop, false);
}); });
...@@ -570,8 +600,8 @@ export default { ...@@ -570,8 +600,8 @@ export default {
this.filterData[prop].push(filter); this.filterData[prop].push(filter);
} }
console.log(this.filterData); console.log(this.filterData);
} },
} },
}; };
</script> </script>
...@@ -621,7 +651,7 @@ em { ...@@ -621,7 +651,7 @@ em {
font-style: normal; font-style: normal;
user-select: none; user-select: none;
} }
em.action { .cur_pointer {
cursor: pointer; cursor: pointer;
} }
.ces-table .el-table--mini td, .ces-table .el-table--mini td,
......
This diff is collapsed.
...@@ -5,25 +5,29 @@ ...@@ -5,25 +5,29 @@
"date": "2016-05-02", "date": "2016-05-02",
"name": "王小虎", "name": "王小虎",
"address": "0", "address": "0",
"id": "ssss2722" "id": "ssss2722",
"state": 0
}, },
{ {
"date": "2016-05-04", "date": "2016-05-04",
"name": "王小虎", "name": "王小虎",
"address": "0", "address": "0",
"id": "ssss2224" "id": "ssss2224",
"state": 0
}, },
{ {
"date": "2016-05-01", "date": "2016-05-01",
"name": "王小虎", "name": "王小虎",
"address": "0", "address": "0",
"id": "ssss222" "id": "ssss222",
"state": 1
}, },
{ {
"date": "2016-05-03", "date": "2016-05-03",
"name": "王小虎", "name": "王小虎",
"address": "0", "address": "0",
"id": "ssss22" "id": "ssss22",
"state": 0
} }
], ],
"tableData1": [ "tableData1": [
...@@ -66,7 +70,7 @@ ...@@ -66,7 +70,7 @@
"address": "上海市普陀区金沙江路 1516 弄" "address": "上海市普陀区金沙江路 1516 弄"
} }
], ],
"service_size_arr":[ "service_size_arr": [
{ {
"id": 1, "id": 1,
"fwcs": "100", "fwcs": "100",
...@@ -98,14 +102,14 @@ ...@@ -98,14 +102,14 @@
"ggsm": "每日可访问100次,访问量为1000PV" "ggsm": "每日可访问100次,访问量为1000PV"
} }
], ],
"params_arr":[ "params_arr": [
{ {
"id": 1, "id": 1,
"zdmc": "地区", "zdmc": "地区",
"zdbm": "area", "zdbm": "area",
"zdlx": "字符串", "zdlx": "字符串",
"zdsm": "这是一个地区的名称", "zdsm": "这是一个地区的名称",
"zdsl":"贵阳市" "zdsl": "贵阳市"
}, },
{ {
"id": 2, "id": 2,
...@@ -113,7 +117,7 @@ ...@@ -113,7 +117,7 @@
"zdbm": "GDP", "zdbm": "GDP",
"zdlx": "字符串", "zdlx": "字符串",
"zdsm": "这是一个地区的总值", "zdsm": "这是一个地区的总值",
"zdsl":"1235", "zdsl": "1235",
"children": [ "children": [
{ {
"id": 21, "id": 21,
...@@ -121,12 +125,12 @@ ...@@ -121,12 +125,12 @@
"zdbm": "area", "zdbm": "area",
"zdlx": "字符串", "zdlx": "字符串",
"zdsm": "这是一个地区的名称", "zdsm": "这是一个地区的名称",
"zdsl":"贵阳市" "zdsl": "贵阳市"
} }
] ]
} }
], ],
"params_use_arr":[ "params_use_arr": [
{ {
"id": 1, "id": 1,
"dydw": "某某省某某市莫某城管局字符占位", "dydw": "某某省某某市莫某城管局字符占位",
...@@ -173,27 +177,27 @@ ...@@ -173,27 +177,27 @@
"sqsj": "2016-05-02 12:20:35" "sqsj": "2016-05-02 12:20:35"
} }
], ],
"creat_app":[ "creat_app": [
{ {
"id": 1, "id": 1,
"yymc": "地市GDP基础数据", "yymc": "地市GDP基础数据",
"yylx": "基础数据服务", "yylx": "基础数据服务",
"yybb": "V1.1.1", "yybb": "V1.1.1",
"yycjsj": "2016-05-02 12:20:35", "yycjsj": "2016-05-02 12:20:35",
"yybscs":12 "yybscs": 12
} }
], ],
"check_app":[ "check_app": [
{ {
"id": 1, "id": 1,
"yymc": "地市GDP基础数据", "yymc": "地市GDP基础数据",
"yylx": "基础数据服务", "yylx": "基础数据服务",
"yybb": "V1.1.1", "yybb": "V1.1.1",
"yyspsj": "2016-05-02 12:20:35", "yyspsj": "2016-05-02 12:20:35",
"spzt":12 "spzt": 12
} }
], ],
"nor_service_list":[ "nor_service_list": [
{ {
"id": 1, "id": 1,
"fwmc": "地市GDP基础数据", "fwmc": "地市GDP基础数据",
...@@ -230,7 +234,7 @@ ...@@ -230,7 +234,7 @@
"bdycs": "12" "bdycs": "12"
} }
], ],
"nor_apply_service":[ "nor_apply_service": [
{ {
"id": 1, "id": 1,
"fwmc": "地市GDP基础数据", "fwmc": "地市GDP基础数据",
...@@ -266,9 +270,8 @@ ...@@ -266,9 +270,8 @@
"sqsj": "2016-05-02", "sqsj": "2016-05-02",
"sqspzt": "待审批" "sqspzt": "待审批"
} }
], ],
"nor_service_sh":[ "nor_service_sh": [
{ {
"id": 1, "id": 1,
"fwmc": "地市GDP基础数据", "fwmc": "地市GDP基础数据",
...@@ -304,10 +307,8 @@ ...@@ -304,10 +307,8 @@
"spsj": "2016-05-02", "spsj": "2016-05-02",
"spzt": "待审批" "spzt": "待审批"
} }
], ],
"nor_cloud":[ "nor_cloud": [
{ {
"id": 1, "id": 1,
"gzqy": "地市GDP基础数据", "gzqy": "地市GDP基础数据",
...@@ -316,7 +317,7 @@ ...@@ -316,7 +317,7 @@
"ncgb": "12", "ncgb": "12",
"zyzlgb": "1024", "zyzlgb": "1024",
"sqzt": "审批通过", "sqzt": "审批通过",
"state":1 "state": 1
}, },
{ {
"id": 1, "id": 1,
...@@ -326,7 +327,7 @@ ...@@ -326,7 +327,7 @@
"ncgb": "12", "ncgb": "12",
"zyzlgb": "1024", "zyzlgb": "1024",
"sqzt": "审批通过", "sqzt": "审批通过",
"state":0 "state": 0
}, },
{ {
"id": 1, "id": 1,
...@@ -336,7 +337,7 @@ ...@@ -336,7 +337,7 @@
"ncgb": "12", "ncgb": "12",
"zyzlgb": "1024", "zyzlgb": "1024",
"sqzt": "审批通过", "sqzt": "审批通过",
"state":0 "state": 0
}, },
{ {
"id": 1, "id": 1,
...@@ -346,7 +347,7 @@ ...@@ -346,7 +347,7 @@
"ncgb": "12", "ncgb": "12",
"zyzlgb": "1024", "zyzlgb": "1024",
"sqzt": "审批通过", "sqzt": "审批通过",
"state":0 "state": 0
}, },
{ {
"id": 1, "id": 1,
...@@ -356,10 +357,10 @@ ...@@ -356,10 +357,10 @@
"ncgb": "12", "ncgb": "12",
"zyzlgb": "1024", "zyzlgb": "1024",
"sqzt": "审批通过", "sqzt": "审批通过",
"state":1 "state": 1
} }
], ],
"nor_cloud_manage":[ "nor_cloud_manage": [
{ {
"id": 1, "id": 1,
"sszz": "地市GDP基础", "sszz": "地市GDP基础",
...@@ -396,22 +397,22 @@ ...@@ -396,22 +397,22 @@
"gzqysl": "10" "gzqysl": "10"
} }
], ],
"min_service_params_arr":[ "min_service_params_arr": [
{ {
"id":1, "id": 1,
"wfwmc":"apaas-mapvideos", "wfwmc": "apaas-mapvideos",
"jkzt":"N/A", "jkzt": "N/A",
"jklj":"http://mapvideo.wodcloud.com/mapvideos/", "jklj": "http://mapvideo.wodcloud.com/mapvideos/",
"wfwms":"地图视频融合应用服务" "wfwms": "地图视频融合应用服务"
} }
], ],
"apply_params_arr":[ "apply_params_arr": [
{ {
"id":1, "id": 1,
"wfwmc":"apaas-mapvideos", "wfwmc": "apaas-mapvideos",
"jkzt":"N/A", "jkzt": "N/A",
"jklj":"http://mapvideo.wodcloud.com/mapvideos/", "jklj": "http://mapvideo.wodcloud.com/mapvideos/",
"wfwms":"地图视频融合应用服务" "wfwms": "地图视频融合应用服务"
} }
], ],
"fwzc_fwcs": [ "fwzc_fwcs": [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment