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].colVal = ''
// this.tableData[index].queryType = '' // this.tableData[index].queryType = ''
} }
console.log(arr, "arr是筛选出来的");
if (row.itemId == "") return; if (row.itemId == "") return;
// optionoptionSourceType // optionoptionSourceType
console.log(arr[0].optionSourceType); console.log(arr[0].optionSourceType);

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

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

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

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

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

@ -281,6 +281,10 @@
ref="mapSearch" ref="mapSearch"
@click="handleSearchMap(item)">查询</el-button> --> @click="handleSearchMap(item)">查询</el-button> -->
<el-select <el-select
v-if="
formType == 'add' ||
(formType == 'edit' && !item.editDisable)
"
v-model="searchAddressKeyword" v-model="searchAddressKeyword"
filterable filterable
class="item-input" class="item-input"
@ -302,15 +306,15 @@
> >
</el-option> </el-option>
</el-select> </el-select>
<div class="item-show" v-else>
{{ fmData[item.keyName] || "--" }}
</div> </div>
</div>
<div id="map" class="div_map"></div> <div id="map" class="div_map"></div>
<el-input <el-input
v-if=" v-if="formType == 'add'||formType=='edit'"
formType == 'add' ||
(formType == 'edit' && !item.editDisable)
"
v-model="fmData[item.keyName]" v-model="fmData[item.keyName]"
class="item-input" class="item-input"
size="small" size="small"
@ -321,14 +325,17 @@
> >
</el-input> </el-input>
<div class="item-show" v-else>
{{ fmData[item.keyName] || "--" }}
</div>
</template> </template>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </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"> <div class="m-operate" v-if="!formBtnFixed">
<el-button <el-button
size="small" size="small"
@ -345,6 +352,7 @@
@click="handleComfirm" @click="handleComfirm"
>{{ editConfig.confirmBtnName || "确定" }}</el-button >{{ editConfig.confirmBtnName || "确定" }}</el-button
> >
<slot <slot
name="operateSup" name="operateSup"
v-bind:id="formId" v-bind:id="formId"
@ -353,14 +361,8 @@
></slot> ></slot>
</div> </div>
<slot
name="bottomSup"
v-bind:id="formId"
v-bind:info="fmData"
v-bind:formType="formType"
></slot>
</div> </div>
<div class="m-operate" v-if="formBtnFixed"> <div class="m-operate" v-if="formBtnFixed">
<el-button <el-button
size="small" size="small"
@ -952,6 +954,7 @@ export default {
.m-operate { .m-operate {
display: flex; display: flex;
margin-top: 10px;
// flex-direction: row-reverse; // flex-direction: row-reverse;
.diy-button--white { .diy-button--white {
margin-left: auto; 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 }"> <template v-slot:editBottomSup="{ id, formType, info }">
<record <record
v-if="formType != 'add' && id"
:formType="formType" :formType="formType"
:id="id" :id="id"
:info="info" :info="info"
@ -119,7 +118,6 @@ export default {
field: "设备名称", field: "设备名称",
keyName: "equipmentName", keyName: "equipmentName",
type: "input", type: "input",
maxlength: 50,
rules: [ rules: [
{ {
required: true, required: true,
@ -132,7 +130,6 @@ export default {
field: "设备编号", field: "设备编号",
keyName: "equipmentNum", keyName: "equipmentNum",
type: "input", type: "input",
maxlength: 50,
rules: [ rules: [
{ {
required: true, required: true,
@ -157,7 +154,6 @@ export default {
{ {
field: "联系电话", field: "联系电话",
keyName: "contactNum", keyName: "contactNum",
maxlength: 50,
type: "input", type: "input",
rules: [ rules: [
{ {

Loading…
Cancel
Save