提交: 配置文件中添加 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实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分 // 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 timeout: 10000
}) })

View File

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

View File

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

View File

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