Commit 9cef9ac6 by guolu

fix: 兼容scope写法,变成slot-scope

parent ef17f38a
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
"echarts": "^3.6.2", "echarts": "^3.6.2",
"element-ui": "^1.3.7", "element-ui": "^1.3.7",
"vue": "^2.3.3", "vue": "^2.3.3",
"vue-hot-reload-api": "^2.3.4",
"vue-router": "^2.3.1" "vue-router": "^2.3.1"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -17,14 +17,14 @@ ...@@ -17,14 +17,14 @@
<el-table-column prop="FunctionName" label="可查看模块" show-overflow-tooltip align="left"> <el-table-column prop="FunctionName" label="可查看模块" show-overflow-tooltip align="left">
</el-table-column> </el-table-column>
<el-table-column label="操作" width="150" show-overflow-tooltip> <el-table-column label="操作" width="150" show-overflow-tooltip>
<template scope="scope"> <template slot-scope="scope">
<el-button size="small" @click="ShowEditWindow(scope.$index)" :disabled="disableButton(scope.$index)" v-if="UpdateRoleShow">编辑</el-button> <el-button size="small" @click="ShowEditWindow(scope.$index)" :disabled="disableButton(scope.$index)" v-if="UpdateRoleShow">编辑</el-button>
<el-button size="small" type="danger" @click="deleteRole(scope.$index)" :disabled="disableButton(scope.$index)" v-if="DeleteRoleShow">删除</el-button> <el-button size="small" type="danger" @click="deleteRole(scope.$index)" :disabled="disableButton(scope.$index)" v-if="DeleteRoleShow">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-row> </el-row>
<el-dialog title="查看权限" :visible.sync="ShowAddRole"> <el-dialog title="查看权限" :visible.sync="ShowAddRole">
<el-form ref="form" :model="form" label-width="100px" style="margin-left: 20px;margin-top: 20px;"> <el-form ref="form" :model="form" label-width="100px" style="margin-left: 20px;margin-top: 20px;">
<el-form-item label="角色名称 :"> <el-form-item label="角色名称 :">
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<el-table-column prop="Name" label="姓名" show-overflow-tooltip> <el-table-column prop="Name" label="姓名" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column label="操作" show-overflow-tooltip width="320"> <el-table-column label="操作" show-overflow-tooltip width="320">
<template scope="scope"> <template slot-scope="scope">
<el-button size="small" v-on:click="OpenRePower(scope.$index)" :disabled="disableButton(scope.$index)">查看权限</el-button> <el-button size="small" v-on:click="OpenRePower(scope.$index)" :disabled="disableButton(scope.$index)">查看权限</el-button>
<el-button size="small" v-on:click="OpenRePassword(scope.$index)" :disabled="disableButton(scope.$index)" v-if="ResetPwdShow">重置密码</el-button> <el-button size="small" v-on:click="OpenRePassword(scope.$index)" :disabled="disableButton(scope.$index)" v-if="ResetPwdShow">重置密码</el-button>
<el-button size="small" @click="getUserDetail(scope.$index)" :disabled="disableButton(scope.$index)" v-if="UpdateUserShow">修改</el-button> <el-button size="small" @click="getUserDetail(scope.$index)" :disabled="disableButton(scope.$index)" v-if="UpdateUserShow">修改</el-button>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<el-table-column prop="EnableName" label="是否启用" show-overflow-tooltip align="left" width="150"> <el-table-column prop="EnableName" label="是否启用" show-overflow-tooltip align="left" width="150">
</el-table-column> </el-table-column>
<el-table-column label="操作" width="200" show-overflow-tooltip> <el-table-column label="操作" width="200" show-overflow-tooltip>
<template scope="scope"> <template slot-scope="scope">
<el-button size="small" @click="ShowBatLibraryEditWindow(scope.$index)" v-if="UpdateBatLibraryRight">编辑</el-button> <el-button size="small" @click="ShowBatLibraryEditWindow(scope.$index)" v-if="UpdateBatLibraryRight">编辑</el-button>
<!-- <el-button size="small" type="danger" @click="deleteRole(scope.$index)">删除</el-button> --> <!-- <el-button size="small" type="danger" @click="deleteRole(scope.$index)">删除</el-button> -->
<el-button size="small" type="danger" @click="enableCustomBat(scope.$index)" v-if="scope.row.Enabled && EnableBatLibraryRight" >禁用</el-button> <el-button size="small" type="danger" @click="enableCustomBat(scope.$index)" v-if="scope.row.Enabled && EnableBatLibraryRight" >禁用</el-button>
...@@ -44,23 +44,23 @@ ...@@ -44,23 +44,23 @@
<el-table :data="batParam"> <el-table :data="batParam">
<el-table-column label="参数名称" width="150"> <el-table-column label="参数名称" width="150">
<template scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.ParamName"></el-input> <el-input v-model="scope.row.ParamName"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="参数内容" width="200"> <el-table-column label="参数内容" width="200">
<template scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.ParamContent"></el-input> <el-input v-model="scope.row.ParamContent"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column property="Remark" label="参数说明" width="400"> <el-table-column property="Remark" label="参数说明" width="400">
<template scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.Remark"></el-input> <el-input v-model="scope.row.Remark"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template scope="scope"> <template>
<el-button type="primary" @click="AddParam()">添加</el-button> <el-button type="primary" @click="AddParam()">添加</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -68,24 +68,24 @@ ...@@ -68,24 +68,24 @@
<br/> <br/>
<el-table :data="batParams"> <el-table :data="batParams">
<el-table-column label="参数名称" width="150"> <el-table-column label="参数名称" width="150">
<template scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.ParamName"></el-input> <el-input v-model="scope.row.ParamName"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="参数内容" width="200"> <el-table-column label="参数内容" width="200">
<template scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.ParamContent"></el-input> <el-input v-model="scope.row.ParamContent"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column property="Remark" label="参数说明" width="400"> <el-table-column property="Remark" label="参数说明" width="400">
<template scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.Remark"></el-input> <el-input v-model="scope.row.Remark"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :context="_self" label="操作"> <el-table-column :context="_self" label="操作">
<template scope="scope"> <template slot-scope="scope">
<i class="el-icon-circle-cross" @click="delParam(scope.row)" title="删除"></i> <i class="el-icon-circle-cross" @click="delParam(scope.row)" title="删除"></i>
</template> </template>
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
<el-table-column prop="EnableName" label="是否启用" show-overflow-tooltip align="left" width="100"> <el-table-column prop="EnableName" label="是否启用" show-overflow-tooltip align="left" width="100">
</el-table-column> </el-table-column>
<el-table-column label="下载脚本" show-overflow-tooltip align="left" width="100"> <el-table-column label="下载脚本" show-overflow-tooltip align="left" width="100">
<template scope="scope"> <template slot-scope="scope">
<el-button size="small" @click="downLoad(scope.$index)">下载脚本</el-button> <el-button size="small" @click="downLoad(scope.$index)">下载脚本</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="200" show-overflow-tooltip> <el-table-column label="操作" width="200" show-overflow-tooltip>
<template scope="scope"> <template slot-scope="scope">
<el-button size="small" @click="getCustomBatDetail(scope.$index)" v-if="UpdateCustomBatRight">编辑</el-button> <el-button size="small" @click="getCustomBatDetail(scope.$index)" v-if="UpdateCustomBatRight">编辑</el-button>
<el-button size="small" type="danger" @click="enableCustomBat(scope.$index)" v-if="scope.row.Enabled=='True' && EnableCustomBatRight">禁用</el-button> <el-button size="small" type="danger" @click="enableCustomBat(scope.$index)" v-if="scope.row.Enabled=='True' && EnableCustomBatRight">禁用</el-button>
<el-button size="small" type="success" @click="enableCustomBat(scope.$index)" v-if="scope.row.Enabled!='True' && EnableCustomBatRight">启用</el-button> <el-button size="small" type="success" @click="enableCustomBat(scope.$index)" v-if="scope.row.Enabled!='True' && EnableCustomBatRight">启用</el-button>
...@@ -54,13 +54,13 @@ ...@@ -54,13 +54,13 @@
<el-table-column label="脚本说明" width="200" prop="Remark"> <el-table-column label="脚本说明" width="200" prop="Remark">
</el-table-column> </el-table-column>
<el-table-column label="脚本参数" width="400"> <el-table-column label="脚本参数" width="400">
<template scope="scope"> <template slot-scope="scope">
<el-table :data="scope.row.Params"> <el-table :data="scope.row.Params">
<el-table-column label="参数名称" width="150" prop="ParamName"> <el-table-column label="参数名称" width="150" prop="ParamName">
</el-table-column> </el-table-column>
<el-table-column label="参数值" width="200"> <el-table-column label="参数值" width="200">
<template scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.ParamValue"></el-input> <el-input v-model="scope.row.ParamValue"></el-input>
</template> </template>
</el-table-column> </el-table-column>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :context="_self" label="操作"> <el-table-column :context="_self" label="操作">
<template scope="scope"> <template slot-scope="scope">
<i class="el-icon-circle-cross" @click="deleteSelectedBat(scope.$index)" title="删除"></i> <i class="el-icon-circle-cross" @click="deleteSelectedBat(scope.$index)" title="删除"></i>
<i class="el-icon-arrow-down" @click="down(scope.$index)"></i> <i class="el-icon-arrow-down" @click="down(scope.$index)"></i>
<i class="el-icon-arrow-up" @click="up(scope.$index)"></i> <i class="el-icon-arrow-up" @click="up(scope.$index)"></i>
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
</el-table-column> </el-table-column>
<el-table-column label="参数说明" width="400"> <el-table-column label="参数说明" width="400">
<template scope="scope"> <template slot-scope="scope">
<el-table :data="scope.row.Params"> <el-table :data="scope.row.Params">
<el-table-column label="参数名称" width="150" prop="ParamName"> <el-table-column label="参数名称" width="150" prop="ParamName">
</el-table-column> </el-table-column>
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<el-table-column prop="address" label="地区"> <el-table-column prop="address" label="地区">
</el-table-column> </el-table-column>
<el-table-column prop="operation" label="操作"> <el-table-column prop="operation" label="操作">
<template scope="scope"> <template slot-scope="scope">
<el-button type="primary">查看更新详情</el-button> <el-button type="primary">查看更新详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<el-table-column prop="address" label="地区"> <el-table-column prop="address" label="地区">
</el-table-column> </el-table-column>
<el-table-column prop="operation" label="操作"> <el-table-column prop="operation" label="操作">
<template scope="scope"> <template>
<el-button type="primary">查看更新详情</el-button> <el-button type="primary">查看更新详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
<el-table-column prop="address" label="地区"> <el-table-column prop="address" label="地区">
</el-table-column> </el-table-column>
<el-table-column prop="operation" label="操作"> <el-table-column prop="operation" label="操作">
<template scope="scope"> <template>
<el-button type="primary">查看更新详情</el-button> <el-button type="primary">查看更新详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
<el-table-column prop="address" label="地区"> <el-table-column prop="address" label="地区">
</el-table-column> </el-table-column>
<el-table-column prop="operation" label="操作"> <el-table-column prop="operation" label="操作">
<template scope="scope"> <template>
<el-button type="primary">查看更新详情</el-button> <el-button type="primary">查看更新详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<!--<el-table-column prop="HardwareNum" label="硬件序列号" width="120"> <!--<el-table-column prop="HardwareNum" label="硬件序列号" width="120">
</el-table-column>--> </el-table-column>-->
<el-table-column label="操作" min-width="140" show-overflow-tooltip> <el-table-column label="操作" min-width="140" show-overflow-tooltip>
<template scope="scope"> <template slot-scope="scope">
<el-button @click="LookDetailMess(scope.$index)" type="primary" size="small"> <el-button @click="LookDetailMess(scope.$index)" type="primary" size="small">
<i class="el-icon-menu"> 查看详情</i> <i class="el-icon-menu"> 查看详情</i>
</el-button> </el-button>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<el-table-column prop="KeyMapping" label="键位" width="100"> <el-table-column prop="KeyMapping" label="键位" width="100">
</el-table-column> </el-table-column>
<el-table-column label="操作" min-width="120" show-overflow-tooltip> <el-table-column label="操作" min-width="120" show-overflow-tooltip>
<template scope="scope"> <template slot-scope="scope">
<el-button @click="LookDetail(scope.$index)" type="primary" size="small"> <el-button @click="LookDetail(scope.$index)" type="primary" size="small">
<i class="el-icon-menu "> 查看详情</i> <i class="el-icon-menu "> 查看详情</i>
</el-button> </el-button>
......
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
<el-table-column prop="ExecutionStatus" label="执行状态" width="120"> <el-table-column prop="ExecutionStatus" label="执行状态" width="120">
</el-table-column> </el-table-column>
<el-table-column prop="ProDetail" label="查看任务详情" width="120" v-if="viewTaskShow"> <el-table-column prop="ProDetail" label="查看任务详情" width="120" v-if="viewTaskShow">
<template scope="scope"> <template slot-scope="scope">
<el-button type="primary" @click="OpenProDetail(scope.$index)" size="small"> <el-button type="primary" @click="OpenProDetail(scope.$index)" size="small">
查看任务详情 查看任务详情
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" min-width="120" show-overflow-tooltip> <el-table-column label="操作" min-width="120" show-overflow-tooltip>
<template scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="small" :disabled="getStartOrStopButtonEnable(scope.$index)" @click="OpenOrPauseTask(scope.$index)" v-if="openTaskShow"> <el-button type="primary" size="small" :disabled="getStartOrStopButtonEnable(scope.$index)" @click="OpenOrPauseTask(scope.$index)" v-if="openTaskShow">
<img style="width:10px" :src="getStartOrStopButtonSrc(scope.$index)" alt=""> <img style="width:10px" :src="getStartOrStopButtonSrc(scope.$index)" alt="">
</el-button> </el-button>
...@@ -146,7 +146,7 @@ export default { ...@@ -146,7 +146,7 @@ export default {
"id": 15, "id": 15,
"text": "Linux Fork自更新" "text": "Linux Fork自更新"
} }
, { , {
"id": 7, "id": 7,
"text": "POSDB更新" "text": "POSDB更新"
...@@ -451,7 +451,7 @@ export default { ...@@ -451,7 +451,7 @@ export default {
} }
return "未知状态" + status; return "未知状态" + status;
}, },
//分页动作 //分页动作
handleSizeChange(val) { handleSizeChange(val) {
this.PageSize = Number(`${val}`); this.PageSize = Number(`${val}`);
this.PageIndex = 1; this.PageIndex = 1;
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
<el-table-column prop="address" label="地区"> <el-table-column prop="address" label="地区">
</el-table-column> </el-table-column>
<el-table-column prop="operation" label="操作"> <el-table-column prop="operation" label="操作">
<template scope="scope"> <template slot-scope="scope">
<el-button @click="OpenShopDetail(scope.$index)" type="primary">查看</el-button> <el-button @click="OpenShopDetail(scope.$index)" type="primary">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -349,7 +349,7 @@ export default { ...@@ -349,7 +349,7 @@ export default {
} }
}) })
}, },
//分页动作 //分页动作
handleSizeChange(val) { handleSizeChange(val) {
this.PageSize = Number(`${val}`); this.PageSize = Number(`${val}`);
this.PageIndex = 1; this.PageIndex = 1;
...@@ -387,7 +387,7 @@ export default { ...@@ -387,7 +387,7 @@ export default {
this.$refs.ShopDetail.CloseShowDetail(); this.$refs.ShopDetail.CloseShowDetail();
}, },
//重置任务 //重置任务
ResetTask(TaskID) { ResetTask(TaskID) {
var that = this; var that = this;
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<el-row v-if="showTab1"> <el-row v-if="showTab1">
<el-col :span="24" > <el-col :span="24" >
<el-button type="text" size="mini" @click="allselect">{{selectTitle}}</el-button> <el-button type="text" size="mini" @click="allselect">{{selectTitle}}</el-button>
</el-col> </el-col>
<el-col :span="12" style="padding:20px 20px; height:400px; overflow-y:scroll; text-align:left;"> <el-col :span="12" style="padding:20px 20px; height:400px; overflow-y:scroll; text-align:left;">
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="type" label="终端类型 " show-overflow-tooltip> </el-table-column> <el-table-column prop="type" label="终端类型 " show-overflow-tooltip> </el-table-column>
<el-table-column label="操作" width="70"> <el-table-column label="操作" width="70">
<template scope="scope"> <template slot-scope="scope">
<el-button @click.native.prevent="deleteRow(scope.$index, selectStoreListView)" type="text" size="small"> <el-button @click.native.prevent="deleteRow(scope.$index, selectStoreListView)" type="text" size="small">
移除 移除
</el-button> </el-button>
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<!-- <el-upload class="upload-demo" ref="upload" action="https://jsonplaceholder.typicode.com/posts/" :on-preview="handlePreview" :on-remove="handleRemove" :file-list="fileList" :show-file-list="false" :before-upload="beforeFileUpload" :auto-upload="false" :on-change="fileChange"> <!-- <el-upload class="upload-demo" ref="upload" action="https://jsonplaceholder.typicode.com/posts/" :on-preview="handlePreview" :on-remove="handleRemove" :file-list="fileList" :show-file-list="false" :before-upload="beforeFileUpload" :auto-upload="false" :on-change="fileChange">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip"></div> <div slot="tip" class="el-upload__tip"></div>
</el-upload> --> </el-upload> -->
...@@ -201,17 +201,17 @@ export default { ...@@ -201,17 +201,17 @@ export default {
for (var x = 0; x < this.selectStoreListView.length; x++) { for (var x = 0; x < this.selectStoreListView.length; x++) {
if (val[i].posID == this.selectStoreListView[x].posID && val[i].id == this.selectStoreListView[x].id) { if (val[i].posID == this.selectStoreListView[x].posID && val[i].id == this.selectStoreListView[x].id) {
has = true; has = true;
} }
} }
if (!has) { if (!has) {
this.selectStoreListView.push(val[i]); this.selectStoreListView.push(val[i]);
} }
} }
}, },
submitStore() { submitStore() {
this.showShop = false; this.showShop = false;
}, },
...@@ -282,7 +282,7 @@ export default { ...@@ -282,7 +282,7 @@ export default {
// arrIds.push(that.storeListView[i].storeID); // arrIds.push(that.storeListView[i].storeID);
// } // }
that.selectStoreListView=that.storeListView; that.selectStoreListView=that.storeListView;
// that.handleSelectionChange(that.storeListView); // that.handleSelectionChange(that.storeListView);
// that.storeList = arrIds; // that.storeList = arrIds;
that.selectTitle = "取消"; that.selectTitle = "取消";
...@@ -356,7 +356,7 @@ export default { ...@@ -356,7 +356,7 @@ export default {
this.currentPage = val; this.currentPage = val;
this.search(); this.search();
}, },
search(callback) { search(callback) {
var that = this; var that = this;
this.ApiFun.terminal.getTList({ this.ApiFun.terminal.getTList({
data: { data: {
...@@ -428,4 +428,4 @@ export default { ...@@ -428,4 +428,4 @@ export default {
width: 100%; width: 100%;
background: #ffffff; background: #ffffff;
} }
</style> </style>
\ No newline at end of file
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