Browse Source

政策找人删除,编辑,详情,复制,设备bug82

feature
mk 3 years ago
parent
commit
081d244d2c
  1. 1
      src/views/modules/communityService/labelConfig/addForm.vue
  2. 136
      src/views/modules/communityService/policy/addPolicy.vue
  3. 10
      src/views/modules/communityService/policy/policyList.vue
  4. 35
      src/views/modules/cpts/base2/cpts/edit.vue
  5. 1198
      src/views/modules/shequzhili/tuceng/zhonghe/shebei/cpts/record.vue
  6. 4
      src/views/modules/shequzhili/tuceng/zhonghe/shebei/index.vue

1
src/views/modules/communityService/labelConfig/addForm.vue

@ -488,7 +488,6 @@ export default {
// this.tableData[index].colVal = ''
// this.tableData[index].queryType = ''
}
console.log(arr, "arr是筛选出来的");
if (row.itemId == "") return;
// optionoptionSourceType
console.log(arr[0].optionSourceType);

136
src/views/modules/communityService/policy/addPolicy.vue

@ -18,7 +18,7 @@
>
<el-select
class="cell-width-1"
v-model.trim="formData.policyTypeLevel1Id"
v-model.trim="formData.policyCategoryL1"
placeholder="请选择"
clearable
>
@ -31,7 +31,7 @@
>
</el-option>
</el-select>
-
<el-select
class="cell-width-1"
v-model.trim="formData.policyCategoryL2"
@ -215,7 +215,11 @@
style="display: block"
>
<template v-if="formData.resiSearchTagName">
<el-tag @close="handleCloseTag" closable style="margin-right: 10px">
<el-tag
@close="handleCloseTag"
:closable="formType != 'detail'"
style="margin-right: 10px"
>
{{ formData.resiSearchTagName }}
</el-tag>
</template>
@ -233,7 +237,12 @@
</el-switch>
</el-form-item>
</el-form>
<el-form :model="newFormData" :rules="newDataRule" ref="ref_policy_form1">
<el-form
:model="newFormData"
:disabled="formType === 'detail'"
:rules="newDataRule"
ref="ref_policy_form1"
>
<el-form-item
v-if="formData.assignFlag"
label="服务方"
@ -373,7 +382,7 @@
<script>
import { mapGetters } from "vuex";
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import { requestPost, requestGet } from "@/js/dai/request";
import rule from "./rule";
import labelForm from "../labelConfig/addForm.vue";
@ -430,8 +439,8 @@ export default {
},
formData: {
policyTypeLevel1Id: "", // id
policyCategoryL2:"",
policyCategoryL1: "", // id
policyCategoryL2: "",
policyLevel: "", //
startDate: "", //yyyy-MM-dd
endDate: "", //yyyy-MM-dd
@ -499,16 +508,18 @@ export default {
},
components: { rule, labelForm },
async mounted() {
this.startLoading();
this.getServiceTypeDictOptions();
this.getDictOptions();
this.loadScopeTree();
await this.startLoading();
await this.getServiceTypeDictOptions();
await this.getDictOptions();
await this.loadScopeTree();
await this.loadDemandoption();
if (this.formType === "add") {
this.$refs.ref_form.resetFields();
} else {
this.loadFormInfo();
await this.loadFormInfo();
await this.handleChangeServiceTypeLevel1();
await this.handleServiceChange();
}
this.endLoading();
@ -545,22 +556,29 @@ export default {
},
async loadFormInfo() {
const url = "/heart/policy/detail/" + this.policyId;
const url = "/governance/policy/policyDetail/" + this.policyId;
let params = {};
const { data, code, msg } = await requestPost(url, params);
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
this.demandIdArray = [];
data.categoryList.forEach((element) => {
let arr = element.codePath.split(",");
this.demandIdArray.push(arr);
});
// data.categoryList.forEach((element) => {
// let arr = element.codePath.split(",");
// this.demandIdArray.push(arr);
// });
// this.formData.ruleList = data.ruleList
data.policyLevel = "" + data.policyLevel;
this.formData = data;
this.newFormData = data.assignInfo;
if (data.assignInfo) {
for (let i in data.assignInfo.serviceScopeList) {
this.newFormData.serviceScopeList.push(
data.assignInfo.serviceScopeList[i].objectId
);
}
}
if (data.attachmentList) {
this.fileList = data.attachmentList;
}
@ -614,13 +632,11 @@ export default {
this.$message.error(msg);
}
},
async handleServiceChange(type, val) {
console.log(val);
await this.getServiceuserList(val);
async handleServiceChange() {
await this.getServiceuserList();
},
async getServiceuserList(serverOrgType) {
if (!serverOrgType) return false;
async getServiceuserList() {
if (!this.formData.assignInfo) return;
if (this.formData.commonServiceTypeId == "") {
this.$message.error("请先选择需求类别!");
return;
@ -628,9 +644,10 @@ export default {
const url = "/actual/base/serviceitem/listServerOrg";
let params = {
serviceTypeId: this.formData.policyCategoryL2,
serverOrgType: serverOrgType,
serverOrgType: this.formData.assignInfo.serverOrgType,
businessType: "common_service",
};
console.log(this.formData);
let { data, code, msg } = await requestPost(url, params);
if (code == 0) {
this.serviceOptiondList = data;
@ -654,7 +671,7 @@ export default {
console.log("组织类型获取失败!");
});
},
async getDictOptions() {
getDictOptions() {
//
this.$http
.post("/sys/dict/data/dictlist", {
@ -746,8 +763,7 @@ export default {
// this.addFuwu();
// }
// });
this.addFuwu();
this.addFuwu();
},
getLastItem(list, vals, key) {
let LIST = list || [];
@ -766,8 +782,9 @@ export default {
}
},
async operationOption() {
this.sarr = []
this.sarr = [];
// 使
if (!this.newFormData) return;
await this.getLastItem(
this.casOptions,
this.newFormData.serviceScopeList,
@ -798,42 +815,53 @@ export default {
//
await this.operationOption();
// this.formData.attachmentList = [...this.fileList];
this.fileList.forEach(item=>{
this.formData.attachmentList.push({
name:item.attachmentName,
type:item.attachmentType,
url:item.attachmentUrl,
format:item.attachmentFormat,
duration:0,
})
})
// this.fileList.forEach(item=>{
// this.formData.attachmentList.push({
// name:item.attachmentName,
// type:item.attachmentType,
// url:item.attachmentUrl,
// format:item.attachmentFormat,
// duration:0,
// })
// })
this.formData.assignInfo = this.newFormData;
let url = "/governance/policy/addPolicy";
let url = "";
if (this.formType === "add" || this.formType === "copy") {
url = "/governance/policy/addPolicy";
// this.formData.policyId = "";
} else {
url = "/heart/policy/update";
// this.formData.policyId = this.policyId;
url = "/governance/policy/updatePolicy";
this.formData.policyId = this.policyId;
}
//nullnull?
if (this.formType == "copy"&& this.formData.assignFlag == 0) {
this.formData.assignInfo = {
noticeApproches: [],
serverOrgId: "",
serverOrgType: "",
serviceScopeList: [],
serviceTimeEnd: "",
serviceTimeStart: "",
};
this.formData.attachmentList = []
}
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/initiate'
let params = {
...this.formData,
};
delete params.policyTypeLevel1Id
delete params.resiSearchTagName
delete params.policyCategoryL1;
delete params.resiSearchTagName;
console.log(params);
const { data, code, msg } = await requestPost(url, params)
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success('操作成功')
this.resetData()
this.$emit('handleOk')
this.$message.success("操作成功");
this.resetData();
this.$emit("handleOk");
} else {
this.btnDisable = false
this.$message.error(msg)
this.btnDisable = false;
this.$message.error(msg);
}
},
@ -984,11 +1012,11 @@ export default {
//
handleChangeServiceTypeLevel1() {
this.formData.policyCategoryL2 = "";
// this.formData.policyCategoryL2 = "";
this.$http
.get(
"/governance/commonServiceType/selectList/" +
this.formData.policyTypeLevel1Id
this.formData.policyCategoryL1
)
.then(({ data: res }) => {
if (res.code !== 0) {

10
src/views/modules/communityService/policy/policyList.vue

@ -356,19 +356,19 @@ export default {
},
async handleDetail(row) {
this.policyId = row.policyId;
this.policyId = row.id;
this.addDiaTitle = "政策详情";
this.formType = "detail";
this.showAdd = true;
},
async handleEdit(row) {
this.policyId = row.policyId;
this.policyId = row.id;
this.addDiaTitle = "编辑政策";
this.formType = "edit";
this.showAdd = true;
},
async handleCopy(row) {
this.policyId = row.policyId;
this.policyId = row.id;
this.addDiaTitle = "新增政策";
this.formType = "copy";
this.showAdd = true;
@ -425,7 +425,7 @@ export default {
},
async handleDel(row) {
this.policyId = row.policyId;
this.policyId = row.id;
this.$confirm("确认删除政策?", "提示", {
confirmButtonText: "确定",
@ -446,7 +446,7 @@ export default {
},
async delPolicy() {
const url = `/heart/policy/delete/${this.policyId}`;
const url = `/governance/policy/deletePolicy/${this.policyId}`;
const { data, code, msg } = await requestPost(url, {});

35
src/views/modules/cpts/base2/cpts/edit.vue

@ -281,6 +281,10 @@
ref="mapSearch"
@click="handleSearchMap(item)">查询</el-button> -->
<el-select
v-if="
formType == 'add' ||
(formType == 'edit' && !item.editDisable)
"
v-model="searchAddressKeyword"
filterable
class="item-input"
@ -302,15 +306,15 @@
>
</el-option>
</el-select>
<div class="item-show" v-else>
{{ fmData[item.keyName] || "--" }}
</div>
</div>
<div id="map" class="div_map"></div>
<el-input
v-if="
formType == 'add' ||
(formType == 'edit' && !item.editDisable)
"
v-if="formType == 'add'||formType=='edit'"
v-model="fmData[item.keyName]"
class="item-input"
size="small"
@ -321,14 +325,17 @@
>
</el-input>
<div class="item-show" v-else>
{{ fmData[item.keyName] || "--" }}
</div>
</template>
</el-form-item>
</div>
</el-form>
<slot
name="bottomSup"
v-bind:id="formId"
v-bind:info="fmData"
v-bind:formType="formType"
></slot>
<div class="m-operate" v-if="!formBtnFixed">
<el-button
size="small"
@ -345,6 +352,7 @@
@click="handleComfirm"
>{{ editConfig.confirmBtnName || "确定" }}</el-button
>
<slot
name="operateSup"
v-bind:id="formId"
@ -353,14 +361,8 @@
></slot>
</div>
<slot
name="bottomSup"
v-bind:id="formId"
v-bind:info="fmData"
v-bind:formType="formType"
></slot>
</div>
<div class="m-operate" v-if="formBtnFixed">
<el-button
size="small"
@ -952,6 +954,7 @@ export default {
.m-operate {
display: flex;
margin-top: 10px;
// flex-direction: row-reverse;
.diy-button--white {
margin-left: auto;

1198
src/views/modules/shequzhili/tuceng/zhonghe/shebei/cpts/record.vue

File diff suppressed because it is too large

4
src/views/modules/shequzhili/tuceng/zhonghe/shebei/index.vue

@ -24,7 +24,6 @@
>
<template v-slot:editBottomSup="{ id, formType, info }">
<record
v-if="formType != 'add' && id"
:formType="formType"
:id="id"
:info="info"
@ -119,7 +118,6 @@ export default {
field: "设备名称",
keyName: "equipmentName",
type: "input",
maxlength: 50,
rules: [
{
required: true,
@ -132,7 +130,6 @@ export default {
field: "设备编号",
keyName: "equipmentNum",
type: "input",
maxlength: 50,
rules: [
{
required: true,
@ -157,7 +154,6 @@ export default {
{
field: "联系电话",
keyName: "contactNum",
maxlength: 50,
type: "input",
rules: [
{

Loading…
Cancel
Save