fix: BUG修改

This commit is contained in:
kun 2024-04-12 10:36:55 +08:00
parent 375f02960a
commit 6b9d7be619
3 changed files with 76 additions and 65 deletions

View File

@ -83,7 +83,7 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL ='http://101.43.164.214:45001/' //上海张江 // axios.defaults.baseURL ='http://101.43.164.214:45001/' //上海张江
// axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工) // axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工)
// axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地 // axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地
// axios.defaults.baseURL ='http://192.168.34.221:9111/' //郭圣雄本地 axios.defaults.baseURL ='http://192.168.34.221:9111/' //郭圣雄本地
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地 // axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
// axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程 // axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈 // axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
@ -91,7 +91,7 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL ='http://101.43.164.214:11111/' // 百色三标段项目 // axios.defaults.baseURL ='http://101.43.164.214:11111/' // 百色三标段项目
// axios.defaults.baseURL = 'http://125.88.207.86:8088/'//中建四局线上(最新)地址 // axios.defaults.baseURL = 'http://125.88.207.86:8088/'//中建四局线上(最新)地址
// axios.defaults.baseURL = 'http://125.88.207.86:8099/'//中建四局(沙湖)线上(最新)地址 // axios.defaults.baseURL = 'http://125.88.207.86:8099/'//中建四局(沙湖)线上(最新)地址
axios.defaults.baseURL = 'http://jxj.zhgdyun.com:15551/'//测试地址 // axios.defaults.baseURL = 'http://jxj.zhgdyun.com:15551/'//测试地址
} else if (process.env.NODE_ENV == 'debug') { } else if (process.env.NODE_ENV == 'debug') {

View File

@ -61,7 +61,7 @@ export default new Vuex.Store({
"//" + "//" +
window.location.host + window.location.host +
"/upload/image", //正式环境 "/upload/image", //正式环境
// FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境 FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境
// WORKFLOWURL: 'http://jxj.zhgdyun.com:9811/#/workspace/forms',//正式工作流地址 // WORKFLOWURL: 'http://jxj.zhgdyun.com:9811/#/workspace/forms',//正式工作流地址
//--------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------
// BASEURL: baseUrl // BASEURL: baseUrl

View File

@ -35,22 +35,22 @@
v-model="workerName" v-model="workerName"
:placeholder=" :placeholder="
$t('message.projectInfo.placeholder') + $t('message.projectInfo.placeholder') +
$t('message.projectInfo.name') $t('message.projectInfo.name')
" "
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<!-- 查询--> <!-- 查询-->
<el-button type="primary" plain @click="query">{{ <el-button type="primary" plain @click="query">{{
$t('message.alarmWarning.query') $t("message.alarmWarning.query")
}}</el-button> }}</el-button>
<!-- //--> <!-- //-->
<el-button type="warning" plain @click="refresh">{{ <el-button type="warning" plain @click="refresh">{{
$t('message.alarmValueSet.refresh') $t("message.alarmValueSet.refresh")
}}</el-button> }}</el-button>
<!-- 新增--> <!-- 新增-->
<el-button type="primary" @click="add">{{ <el-button type="primary" @click="add">{{
$t('message.videoManage.add') $t("message.videoManage.add")
}}</el-button> }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -87,7 +87,7 @@
@click="configFn(scope.row)" @click="configFn(scope.row)"
> >
<!-- 配置企业 --> <!-- 配置企业 -->
{{ $t('message.projectInfo.configCompany') }} {{ $t("message.projectInfo.configCompany") }}
</el-button> </el-button>
<el-button <el-button
size="mini" size="mini"
@ -96,7 +96,7 @@
@click="configFn2(scope.row, 1)" @click="configFn2(scope.row, 1)"
> >
<!-- 配置闸机 --> <!-- 配置闸机 -->
{{ $t('message.projectInfo.configGate') }} {{ $t("message.projectInfo.configGate") }}
</el-button> </el-button>
<el-button <el-button
size="mini" size="mini"
@ -105,7 +105,7 @@
@click="configFn2(scope.row, 2)" @click="configFn2(scope.row, 2)"
> >
<!-- 配置视频 --> <!-- 配置视频 -->
{{ $t('message.projectInfo.configVideo') }} {{ $t("message.projectInfo.configVideo") }}
</el-button> </el-button>
<div @click="edit(scope.row)" class="operationText"> <div @click="edit(scope.row)" class="operationText">
<img <img
@ -113,7 +113,7 @@
width="15px" width="15px"
height="15px" height="15px"
/> />
<span>{{ $t('message.alarmValueSet.edit') }}</span> <span>{{ $t("message.alarmValueSet.edit") }}</span>
</div> </div>
<div @click="deleteDev(scope.row)" class="operationText"> <div @click="deleteDev(scope.row)" class="operationText">
<img <img
@ -121,7 +121,7 @@
width="15px" width="15px"
height="15px" height="15px"
/> />
<span>{{ $t('message.alarmValueSet.delete') }}</span> <span>{{ $t("message.alarmValueSet.delete") }}</span>
</div> </div>
</div> </div>
</template> </template>
@ -167,7 +167,7 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
style="margin-bottom: 30px;" style="margin-bottom: 30px;"
:label="$t('message.personnelAccess.LabPwd')" :label="$t('message.personnelAccess.LabPwd')"
prop="password" prop="password"
v-if="!addEditForm.showPassword && addEditForm.showPassword != ''" v-if="!addEditForm.showPassword && addEditForm.showPassword != ''"
@ -180,7 +180,7 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
style="margin-bottom: 30px;" style="margin-bottom: 30px;"
:label="$t('message.personnelAccess.LabPwd')" :label="$t('message.personnelAccess.LabPwd')"
prop="showPassword" prop="showPassword"
v-else v-else
@ -192,14 +192,8 @@
:placeholder="$t('message.companyDiagram.PleaseEnter')" :placeholder="$t('message.companyDiagram.PleaseEnter')"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="选择组织" prop="xzProjectOrgId">
label="选择组织" <el-select v-model="selectVal" placeholder="请选择">
prop="xzProjectOrgId"
>
<el-select
v-model="selectVal"
placeholder="请选择"
>
<el-option style="height:auto" :value="[]"> <el-option style="height:auto" :value="[]">
<el-tree <el-tree
:data="treeList" :data="treeList"
@ -267,14 +261,14 @@
@click="Popup.show = false" @click="Popup.show = false"
icon="el-icon-circle-close" icon="el-icon-circle-close"
size="medium" size="medium"
>{{ $t('message.alarmValueSet.cancel') }} >{{ $t("message.alarmValueSet.cancel") }}
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-circle-check" icon="el-icon-circle-check"
@click="submit" @click="submit"
size="medium" size="medium"
>{{ $t('message.alarmValueSet.save') }} >{{ $t("message.alarmValueSet.save") }}
</el-button> </el-button>
</div> </div>
</el-form> </el-form>
@ -296,7 +290,7 @@
@change="handleCheckAllChange" @change="handleCheckAllChange"
> >
<!-- 全选 --> <!-- 全选 -->
{{ $t('message.projectInfo.allChoose') }} {{ $t("message.projectInfo.allChoose") }}
</el-checkbox> </el-checkbox>
<div style="margin: 15px 0"></div> <div style="margin: 15px 0"></div>
<el-checkbox-group <el-checkbox-group
@ -319,14 +313,14 @@
@click="companyDialog = false" @click="companyDialog = false"
icon="el-icon-circle-close" icon="el-icon-circle-close"
size="medium" size="medium"
>{{ $t('message.alarmValueSet.cancel') }} >{{ $t("message.alarmValueSet.cancel") }}
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-circle-check" icon="el-icon-circle-check"
@click="saveCompanyFn" @click="saveCompanyFn"
size="medium" size="medium"
>{{ $t('message.alarmValueSet.save') }} >{{ $t("message.alarmValueSet.save") }}
</el-button> </el-button>
</div> </div>
</div> </div>
@ -350,7 +344,7 @@
@change="handleCheckAllChange" @change="handleCheckAllChange"
> >
<!-- 全选 --> <!-- 全选 -->
{{ $t('message.projectInfo.allChoose') }} {{ $t("message.projectInfo.allChoose") }}
</el-checkbox> </el-checkbox>
<div style="margin: 15px 0"></div> <div style="margin: 15px 0"></div>
<div v-if="configDevType == 2"> <div v-if="configDevType == 2">
@ -391,14 +385,14 @@
@click="configDevDialog = false" @click="configDevDialog = false"
icon="el-icon-circle-close" icon="el-icon-circle-close"
size="medium" size="medium"
>{{ $t('message.alarmValueSet.cancel') }} >{{ $t("message.alarmValueSet.cancel") }}
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-circle-check" icon="el-icon-circle-check"
@click="saveDevConfigDataFn" @click="saveDevConfigDataFn"
size="medium" size="medium"
>{{ $t('message.alarmValueSet.save') }} >{{ $t("message.alarmValueSet.save") }}
</el-button> </el-button>
</div> </div>
</div> </div>
@ -436,7 +430,7 @@ export default {
}, },
data() { data() {
return { return {
defaultExpandArr: [], defaultExpandArr: [],
// //
defaultProps: { defaultProps: {
children: "children", children: "children",
@ -445,7 +439,7 @@ export default {
treeList: [], treeList: [],
selectVal: "", selectVal: "",
selectTreeData: {}, selectTreeData: {},
workerName: '', workerName: "",
addEditForm: { addEditForm: {
account: "", account: "",
password: "", password: "",
@ -470,9 +464,10 @@ export default {
}, },
{ {
pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/, pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/,
message: '密码必须包含至少一个字母、一个数字、一个特殊字符以及长度至少为8位数', message:
trigger: 'blur' "密码必须包含至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
} trigger: "blur",
},
], ],
showPassword: [ showPassword: [
{ {
@ -482,22 +477,30 @@ export default {
}, },
{ {
pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/, pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/,
message: '密码必须包含至少一个字母、一个数字、一个特殊字符以及长度至少为8位数', message:
trigger: 'blur' "密码必须包含至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
} trigger: "blur",
},
],
xzProjectOrgId: [
{
required: true,
message: "请选择",
trigger: "blur",
},
], ],
userId: [ userId: [
{ {
required: true, required: true,
message: this.$t("message.personnelPosition.required"), message: this.$t("message.personnelPosition.required"),
trigger: "blur", trigger: "change",
}, },
], ],
roleId: [ roleId: [
{ {
required: true, required: true,
message: this.$t("message.personnelPosition.required"), message: this.$t("message.personnelPosition.required"),
trigger: "blur", trigger: "change",
}, },
], ],
workerId: [ workerId: [
@ -506,7 +509,7 @@ export default {
message: this.$t("message.personnelPosition.required"), message: this.$t("message.personnelPosition.required"),
trigger: "blur", trigger: "blur",
}, },
] ],
}, },
List: [], List: [],
Popup: { Popup: {
@ -537,7 +540,7 @@ export default {
methods: { methods: {
getTreeList() { getTreeList() {
getTreeGroupApi({ getTreeGroupApi({
projectSn: this.$store.state.projectSn projectSn: this.$store.state.projectSn,
}).then((result) => { }).then((result) => {
if (result.success) { if (result.success) {
this.treeList = result.result; this.treeList = result.result;
@ -550,6 +553,7 @@ export default {
this.selectVal = data.deptName; this.selectVal = data.deptName;
this.selectTreeData = data; this.selectTreeData = data;
this.addEditForm.xzProjectOrgId = data.id; this.addEditForm.xzProjectOrgId = data.id;
// this.$refs.addEditForm.validateField("xzProjectOrgId")
}, },
configFn(item) { configFn(item) {
this.companyDialog = true; this.companyDialog = true;
@ -560,14 +564,14 @@ export default {
console.log(id); console.log(id);
this.editComapnyDataId = res.result.id; this.editComapnyDataId = res.result.id;
if (id.indexOf(",") != -1) { if (id.indexOf(",") != -1) {
let arr = [] let arr = [];
this.enterpriseListData.forEach(item => { this.enterpriseListData.forEach((item) => {
for (let i = 0; i < id.split(",").length; i++) { for (let i = 0; i < id.split(",").length; i++) {
if (item.id == id.split(",")[i]) { if (item.id == id.split(",")[i]) {
arr.push(id.split(",")[i]) arr.push(id.split(",")[i]);
} }
} }
}) });
this.selectCompanyData = arr; this.selectCompanyData = arr;
} else { } else {
this.selectCompanyData = [id]; this.selectCompanyData = [id];
@ -594,26 +598,26 @@ export default {
console.log(res.result.devId); console.log(res.result.devId);
this.editComapnyDataId = res.result.id; this.editComapnyDataId = res.result.id;
if (id.indexOf(",") != -1) { if (id.indexOf(",") != -1) {
let arr = [] let arr = [];
console.log(this.allUfaceDev, this.allVideoDev); console.log(this.allUfaceDev, this.allVideoDev);
if (this.configDevType == 1) { if (this.configDevType == 1) {
this.allUfaceDev.forEach(item => { this.allUfaceDev.forEach((item) => {
for (let i = 0; i < id.split(",").length; i++) { for (let i = 0; i < id.split(",").length; i++) {
if (item.id == id.split(",")[i]) { if (item.id == id.split(",")[i]) {
arr.push(id.split(",")[i]) arr.push(id.split(",")[i]);
} }
} }
}) });
} else { } else {
this.allVideoDev.forEach(item => { this.allVideoDev.forEach((item) => {
for (let i = 0; i < id.split(",").length; i++) { for (let i = 0; i < id.split(",").length; i++) {
if (item.itemId == id.split(",")[i]) { if (item.itemId == id.split(",")[i]) {
arr.push(id.split(",")[i]) arr.push(id.split(",")[i]);
} }
} }
}) });
} }
console.log(arr, id) console.log(arr, id);
this.selectCompanyData = arr; this.selectCompanyData = arr;
// this.selectCompanyData = id.split(","); // this.selectCompanyData = id.split(",");
} else { } else {
@ -659,7 +663,7 @@ export default {
let checkedCount = this.selectCompanyData.length; let checkedCount = this.selectCompanyData.length;
console.log(this.selectCompanyData); console.log(this.selectCompanyData);
this.checkAll = checkedCount === arr.length; this.checkAll = checkedCount === arr.length;
console.log(this.checkAll = checkedCount === arr.length); console.log((this.checkAll = checkedCount === arr.length));
console.log(checkedCount, checkedCount, arr.length); console.log(checkedCount, checkedCount, arr.length);
this.isIndeterminate = checkedCount > 0 && checkedCount < arr.length; this.isIndeterminate = checkedCount > 0 && checkedCount < arr.length;
}, },
@ -739,10 +743,16 @@ export default {
}, },
query() { query() {
console.log("查询的参数", this.queryInfo); console.log("查询的参数", this.queryInfo);
this.getList() this.getList();
}, },
add() { add() {
this.handle("add", true); this.handle("add", true);
this.$nextTick(() => {
this.selectTreeData = {};
this.selectVal = "";
this.defaultExpandArr = [];
this.$refs.groupTree.setCurrentKey("");
})
}, },
edit(obj) { edit(obj) {
console.log("编辑", obj); console.log("编辑", obj);
@ -767,7 +777,8 @@ export default {
this.handle("edit", true); this.handle("edit", true);
this.$nextTick(() => { this.$nextTick(() => {
if (this.addEditForm.xzProjectOrgObj) { if (this.addEditForm.xzProjectOrgObj) {
this.$refs.groupTree.setCurrentKey(this.addEditForm.xzProjectOrgId); this.$refs.groupTree.setCurrentKey(this.addEditForm.xzProjectOrgId);
this.$refs.addEditForm.clearValidate();
} }
}); });
}, },
@ -775,9 +786,9 @@ export default {
console.log("删除", obj); console.log("删除", obj);
this.$confirm( this.$confirm(
this.$t("message.personnelPosition.beaconManage.table.confirmText") + this.$t("message.personnelPosition.beaconManage.table.confirmText") +
"【" + "【" +
obj.workerName + obj.workerName +
"】?", "】?",
this.$t("message.personnelPosition.beaconManage.table.Tips"), this.$t("message.personnelPosition.beaconManage.table.Tips"),
{ {
confirmButtonText: this.$t( confirmButtonText: this.$t(
@ -797,7 +808,7 @@ export default {
} }
}); });
}) })
.catch(() => { }); .catch(() => {});
}, },
submit() { submit() {
this.$refs["addEditForm"].validate((valid) => { this.$refs["addEditForm"].validate((valid) => {
@ -805,7 +816,7 @@ export default {
let params = this.addEditForm; let params = this.addEditForm;
// params.alarmPushWorkerId = this.addEditForm.alarmPushWorkerId.join(','); // params.alarmPushWorkerId = this.addEditForm.alarmPushWorkerId.join(',');
params.sn = this.$store.state.projectSn; params.sn = this.$store.state.projectSn;
if(this.selectVal){ if (this.selectVal) {
params.xzProjectOrgObj = JSON.stringify(this.selectTreeData); params.xzProjectOrgObj = JSON.stringify(this.selectTreeData);
} }
if (this.Popup.type === "add") { if (this.Popup.type === "add") {
@ -833,13 +844,13 @@ export default {
}); });
}, },
refresh() { refresh() {
this.workerName = '' this.workerName = "";
this.getList(); this.getList();
}, },
getList() { getList() {
getProjectChilderSystemUserListApi({ getProjectChilderSystemUserListApi({
projectSn: this.$store.state.projectSn, projectSn: this.$store.state.projectSn,
workerName: this.workerName workerName: this.workerName,
}).then((result) => { }).then((result) => {
if (result.success) { if (result.success) {
this.List = result.result; this.List = result.result;