+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 至
+
+
+
+
+
+
+ 查询
+ 重置
+
+
-
-
新增政策
+
+
+ 新增政策
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{scope.row.startDate}}-{{scope.row.endDate}}
-
-
-
-
-
- {{scope.row.expiredFlag==='1'?'已过期':'未过期'}}
-
-
-
-
-
- 详情
- 编辑
- 复制
- 人员名单
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.startDate }}-{{ scope.row.endDate }}
+
+
+
+
+
+ {{
+ scope.row.expiredFlag === "1" ? "已过期" : "未过期"
+ }}
+
+
+
+
+
+ 详情
+ 编辑
+ 复制
+
+ 删除
+
+
+
+
+
+
+
-
-
-
+
+
-
-
+
+
-
@@ -213,18 +282,15 @@ import axios from "axios";
import addPolicy from "./addPolicy";
import personList from "./personList";
-
export default {
components: { addPolicy, personList },
- data () {
-
-
+ data() {
return {
tableLoading: false,
user: {},
- agencyId: '',
-
+ agencyId: "",
+ policyLevelArray: [], //政策级别下拉
tableData: [],
statusArray: [
@@ -238,143 +304,153 @@ export default {
},
],
-
formData: {
- title: '',// 政策标题
- content: '',//政策内容
- expiredFlag: '',//是否过期;1:已过期;0:未过期
-
+ title: "", // 政策标题
+ content: "", //政策内容
+ expiredFlag: "", //是否过期;1:已过期;0:未过期
},
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
- policyId: '',
- serviceProjectName: '',
+ policyId: "",
+ serviceProjectName: "",
showAdd: false,
- formType: 'add',
- addDiaTitle: '新增政策',
+ formType: "add",
+ addDiaTitle: "新增政策",
showPersonList: false,
- ruleList: []
-
-
+ ruleList: [],
};
},
computed: {
- maxTableHeight () {
+ maxTableHeight() {
return this.$store.state.inIframe
? this.clientHeight - 350 + this.iframeHeigh
: this.clientHeight - 350;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
- watch: {
-
- },
- mounted () {
- console.log(this.$store.state)
- this.user = this.$store.state.user
- this.agencyId = this.user.agencyId
-
+ watch: {},
+ mounted() {
+ console.log(this.$store.state);
+ this.user = this.$store.state.user;
+ this.agencyId = this.user.agencyId;
+ this.getDictOptions();
this.getTableData();
},
methods: {
-
- handleSearch (val) {
+ handleSearch(val) {
console.log(this.formData);
this.pageNo = 1;
this.getTableData();
},
- async handleAdd () {
- this.addDiaTitle = '新增政策'
- this.formType = 'add'
+ async handleAdd() {
+ this.addDiaTitle = "新增政策";
+ this.formType = "add";
this.showAdd = true;
},
- async handleDetail (row) {
- this.policyId = row.policyId
- this.addDiaTitle = '政策详情'
- this.formType = 'detail'
- this.showAdd = true
-
+ async handleDetail(row) {
+ this.policyId = row.policyId;
+ this.addDiaTitle = "政策详情";
+ this.formType = "detail";
+ this.showAdd = true;
},
- async handleEdit (row) {
- this.policyId = row.policyId
- this.addDiaTitle = '编辑政策'
- this.formType = 'edit'
+ async handleEdit(row) {
+ this.policyId = row.policyId;
+ this.addDiaTitle = "编辑政策";
+ this.formType = "edit";
this.showAdd = true;
-
},
- async handleCopy (row) {
- this.policyId = row.policyId
- this.addDiaTitle = '新增政策'
- this.formType = 'copy'
+ async handleCopy(row) {
+ this.policyId = row.policyId;
+ this.addDiaTitle = "新增政策";
+ this.formType = "copy";
this.showAdd = true;
-
},
//加载组织数据
- async handlePersonList (row) {
+ // async handlePersonList (row) {
+
+ // this.policyId = row.policyId
+ // await this.loadRuleList()
+ // this.formType = 'personList'
+ // this.showPersonList = true;
+ // },
+ async getDictOptions() {
+ // 政策级别下拉
+ this.$http
+ .post("/sys/dict/data/dictlist", {
+ dictType: "policy_level",
+ })
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ } else {
+ this.policyLevelArray = res.data;
+ }
+ })
+ .catch(() => {
+ return this.$message.error("网络错误");
+ });
- this.policyId = row.policyId
- await this.loadRuleList()
- this.formType = 'personList'
- this.showPersonList = true;
+ // 政策分类下拉(其实是获取的共性服务分类)
+ this.$http
+ .get("/governance/commonServiceType/selectList/0")
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ } else {
+ this.serviceTypesLevel1 = res.data;
+ }
+ })
+ .catch(() => {
+ return this.$message.error("网络错误");
+ });
},
+ async loadRuleList() {
+ const url = "/heart/policy/rulelist/" + this.policyId;
- async loadRuleList () {
-
- const url = "/heart/policy/rulelist/" + this.policyId
+ let params = {};
- let params = {}
-
- const { data, code, msg } = await requestPost(url, params)
+ const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
- this.ruleList = data
-
+ this.ruleList = data;
} else {
- this.$message.error(msg)
+ this.$message.error(msg);
}
-
},
+ handleClose() {
+ this.policyId = "";
+ this.formType = "";
- handleClose () {
- this.policyId = ""
- this.formType = ''
-
- this.showAdd = false
- this.showPersonList = false
-
-
-
+ this.showAdd = false;
+ this.showPersonList = false;
},
- handleOk () {
- this.handleClose()
- this.pageNo = 1
- this.getTableData()
-
+ handleOk() {
+ this.handleClose();
+ this.pageNo = 1;
+ this.getTableData();
},
-
- async handleDel (row) {
-
- this.policyId = row.policyId
+ async handleDel(row) {
+ this.policyId = row.policyId;
this.$confirm("确认删除政策?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning"
+ type: "warning",
})
.then(() => {
- this.delPolicy()
+ this.delPolicy();
})
- .catch(err => {
+ .catch((err) => {
if (err == "cancel") {
// this.$message({
// type: "info",
@@ -382,11 +458,9 @@ export default {
// });
}
});
-
},
- async delPolicy () {
-
+ async delPolicy() {
const url = `/heart/policy/delete/${this.policyId}`;
const { data, code, msg } = await requestPost(url, {});
@@ -399,8 +473,8 @@ export default {
}
},
- async getTableData () {
- this.tableLoading = true
+ async getTableData() {
+ this.tableLoading = true;
const url = "/governance/policy/list";
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/recordList";
const { pageSize, pageNo, formData } = this;
@@ -410,34 +484,32 @@ export default {
...formData,
});
- this.tableLoading = false
+ this.tableLoading = false;
if (code === 0) {
-
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
- return item;
- })
+ return item;
+ })
: [];
- this.tableData.forEach(item => {
- if (item.operationType === '2') {
- item.operationTypeShow = '已转需求'
+ this.tableData.forEach((item) => {
+ if (item.operationType === "2") {
+ item.operationTypeShow = "已转需求";
}
- if (item.operationType === '1') {
- item.operationTypeShow = '已立项'
+ if (item.operationType === "1") {
+ item.operationTypeShow = "已立项";
}
- if (item.operationType === '0') {
- item.operationTypeShow = '已回复'
+ if (item.operationType === "0") {
+ item.operationTypeShow = "已回复";
}
-
});
} else {
this.$message.error(msg);
}
},
- async handleExport () {
+ async handleExport() {
const url = "/governance/icEvent/export";
const { pageSize, pageNo, formData } = this;
axios({
@@ -472,35 +544,30 @@ export default {
});
},
- handleSizeChange (val) {
-
+ handleSizeChange(val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
- handleCurrentChange (val) {
-
+ handleCurrentChange(val) {
this.pageNo = val;
this.getTableData();
},
- resetSearch () {
+ resetSearch() {
this.formData = {
- title: '',// 政策标题
- content: '',//政策内容
- expiredFlag: '',//是否过期;1:已过期;0:未过期
- }
-
+ title: "", // 政策标题
+ content: "", //政策内容
+ expiredFlag: "", //是否过期;1:已过期;0:未过期
+ };
- this.pageNo = 1
- this.getTableData()
+ this.pageNo = 1;
+ this.getTableData();
},
},
};