提交: 配置文件中添加 portApi 属性

This commit is contained in:
23688nl 2022-11-03 11:35:26 +08:00
parent 509576962e
commit 244f5f5b10
4 changed files with 10 additions and 7 deletions

View File

@ -9,7 +9,7 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: process.env.NODE_ENV === "production" ? `${window.dasConfig.protocol}${window.dasConfig.ip}${window.dasConfig.port ? ':'+window.dasConfig.port : ''}` : process.env.VUE_APP_BASE_API,
baseURL: process.env.NODE_ENV === "production" ? `${window.dasConfig.protocol}${window.dasConfig.ip}${window.dasConfig.port ? ':'+window.dasConfig.port : ''} ${window.dasConfig.prodApi ? '/'+window.dasConfig.prodApi : ''}` : process.env.VUE_APP_BASE_API,
// 超时
timeout: 10000
})

View File

@ -75,7 +75,7 @@
...operate,
]"
:isIndex="true"
:tableHeight="tableList.length > 0 ? '470px' : '495px'"
:tableHeight="tableList.length > 0 ? '450px' : '495px'"
:isSelect="true"
rowKey="deviceId"
@tableSelectionChange="handleTableChange"
@ -86,7 +86,7 @@
<span
@click="handleOpening(scope.row)"
:class="
scope.row.switch === 0 || scope.row.switch === undefined
scope.row.switch == 0 || scope.row.switch == undefined
? 'span-disable'
: ''
"
@ -97,7 +97,7 @@
<span
@click="handleSwitchOn(scope.row)"
:class="scope.row.switch === 1 ? 'span-disable' : ''"
:class="scope.row.switch == 1 ? 'span-disable' : ''"
>
<i class="iconfont iconhezha"></i>
合闸
@ -276,7 +276,7 @@ export default {
}
},
handleOpening(row) {
if (row.switch === 1) {
if (row.switch == 1) {
this.handleSendSwitchDirect("false", row.deviceId);
}
},

View File

@ -38,9 +38,9 @@
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getDeviceLogList"></right-toolbar>
</el-row>
</el-row> -->
<el-table
v-loading="loading"

View File

@ -307,6 +307,9 @@ export default {
this.getList();
});
} else {
if ( !this.form.parentId ) {
this.form.parentId = 0;
}
addDept(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;