|
@@ -128,7 +128,7 @@
|
|
|
@input="handleFarmNameInput"
|
|
@input="handleFarmNameInput"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <Checkbox v-if="paramsType !== 'client'" class="checkbox" icon-size="18px" shape="square" v-model="ruleForm.defaultFarm">是否勾选为默认农场</Checkbox>
|
|
|
|
|
|
|
+ <Checkbox v-if="paramsType !== 'client' && curRole == 0" class="checkbox" icon-size="18px" shape="square" v-model="ruleForm.defaultFarm">是否勾选为默认农场</Checkbox>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="create-btn">
|
|
<div class="create-btn">
|
|
@@ -548,7 +548,7 @@ const submitForm = (formEl) => {
|
|
|
|
|
|
|
|
// 根据来源页面决定跳转目标
|
|
// 根据来源页面决定跳转目标
|
|
|
const fromPage = route.query.from;
|
|
const fromPage = route.query.from;
|
|
|
- if (fromPage) {
|
|
|
|
|
|
|
+ if (fromPage && fromPage !== 'details') {
|
|
|
// 如果是从monitor页面来的
|
|
// 如果是从monitor页面来的
|
|
|
router.replace(`/${fromPage}`);
|
|
router.replace(`/${fromPage}`);
|
|
|
if(fromPage === 'home'){
|
|
if(fromPage === 'home'){
|
|
@@ -559,6 +559,9 @@ const submitForm = (formEl) => {
|
|
|
router.replace(`/home?showSuccess=${showSuccess}`);
|
|
router.replace(`/home?showSuccess=${showSuccess}`);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ } else if (fromPage === "details") {
|
|
|
|
|
+ console.log('details', res.data);
|
|
|
|
|
+ router.go(-1)
|
|
|
} else {
|
|
} else {
|
|
|
router.replace(`/home`);
|
|
router.replace(`/home`);
|
|
|
}
|
|
}
|
|
@@ -582,7 +585,7 @@ const resetForm = (formEl) => {
|
|
|
|
|
|
|
|
// 根据来源页面决定返回目标
|
|
// 根据来源页面决定返回目标
|
|
|
const fromPage = route.query.from;
|
|
const fromPage = route.query.from;
|
|
|
- if (fromPage) {
|
|
|
|
|
|
|
+ if (fromPage && fromPage !== 'details') {
|
|
|
router.replace(`/${fromPage}`);
|
|
router.replace(`/${fromPage}`);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -692,11 +695,12 @@ function backgToHome() {
|
|
|
|
|
|
|
|
// 根据来源页面决定返回目标
|
|
// 根据来源页面决定返回目标
|
|
|
const fromPage = route.query.from;
|
|
const fromPage = route.query.from;
|
|
|
- if (fromPage) {
|
|
|
|
|
|
|
+ if (fromPage && fromPage !== 'details') {
|
|
|
router.replace(`/${fromPage}`);
|
|
router.replace(`/${fromPage}`);
|
|
|
return;
|
|
return;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ router.go(-1)
|
|
|
}
|
|
}
|
|
|
- router.go(-1)
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 处理面积按键输入 - 只允许数字和小数点
|
|
// 处理面积按键输入 - 只允许数字和小数点
|