|
|
@ -1,206 +1,254 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
<el-card shadow="hover" |
|
|
|
|
|
|
|
class="mgb20"> |
|
|
|
|
|
|
|
<div> |
|
|
|
|
|
|
|
<div class="flex-center mgb20"> |
|
|
|
|
|
|
|
<p class="hr_tag"></p> |
|
|
|
|
|
|
|
<span>筛选</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div> |
|
|
|
|
|
|
|
<el-form label-width="80px"> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div class="flex-center mgb20"> |
|
|
|
<el-col :span="4"> |
|
|
|
<p class="hr_tag"></p> |
|
|
|
<el-form-item label="系统归属"> |
|
|
|
<span>筛选</span> |
|
|
|
<el-select v-model="systemAttribution" |
|
|
|
</div> |
|
|
|
clearable |
|
|
|
<div> |
|
|
|
placeholder="请选择系统归属" |
|
|
|
<el-form label-width="80px"> |
|
|
|
@change="initData"> |
|
|
|
<div> |
|
|
|
<el-option v-for="(item,index) in systemBelongList" |
|
|
|
<el-col :span="4"> |
|
|
|
:key="index" |
|
|
|
<el-form-item label="系统归属"> |
|
|
|
:label="item.label" |
|
|
|
<el-select v-model="systemAttribution" clearable placeholder="请选择系统归属" |
|
|
|
:value="item.value"></el-option> |
|
|
|
@change="initData"> |
|
|
|
</el-select> |
|
|
|
<el-option v-for="(item,index) in systemBelongList" :key="index" |
|
|
|
</el-form-item> |
|
|
|
:label="item.label" :value="item.value"></el-option> |
|
|
|
</el-col> |
|
|
|
</el-select> |
|
|
|
<el-col :span="4"> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="系统类型"> |
|
|
|
</el-col> |
|
|
|
<el-select v-model="systemType" |
|
|
|
<el-col :span="4"> |
|
|
|
clearable |
|
|
|
<el-form-item label="系统类型"> |
|
|
|
placeholder="请选择系统类型" |
|
|
|
<el-select v-model="systemType" clearable placeholder="请选择系统类型" |
|
|
|
@change="initData"> |
|
|
|
@change="initData"> |
|
|
|
<el-option v-for="(item,index) in systemTypeList" |
|
|
|
<el-option v-for="(item,index) in systemTypeList" :key="index" |
|
|
|
:key="index" |
|
|
|
:label="item.label" :value="item.value"></el-option> |
|
|
|
:label="item.label" |
|
|
|
</el-select> |
|
|
|
:value="item.value"></el-option> |
|
|
|
</el-form-item> |
|
|
|
</el-select> |
|
|
|
</el-col> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
|
|
|
|
<el-form-item> |
|
|
|
|
|
|
|
<el-input placeholder="请输入系统名称" prefix-icon="el-icon-search" |
|
|
|
|
|
|
|
v-model.trim="systemSearch" clearable></el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
<el-col :span="6"> |
|
|
|
|
|
|
|
<el-form-item> |
|
|
|
|
|
|
|
<el-input placeholder="请输入系统名称" |
|
|
|
|
|
|
|
prefix-icon="el-icon-search" |
|
|
|
|
|
|
|
v-model.trim="systemSearch" |
|
|
|
|
|
|
|
clearable></el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="card"> |
|
|
|
<el-card shadow="hover" |
|
|
|
<div class="flex-center mgb20"> |
|
|
|
class="card"> |
|
|
|
<p class="hr_tag"></p> |
|
|
|
<div class="flex-center mgb20"> |
|
|
|
<span>服务列表</span> |
|
|
|
<p class="hr_tag"></p> |
|
|
|
</div> |
|
|
|
<span>服务列表</span> |
|
|
|
<el-table :data="systemData" class="table" stripe header-align="center"> |
|
|
|
</div> |
|
|
|
<!-- <el-table-column type="selection" width="55" align="center"></el-table-column> --> |
|
|
|
<el-table :data="systemData" |
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"> |
|
|
|
class="table" |
|
|
|
</el-table-column> |
|
|
|
stripe |
|
|
|
<el-table-column prop="systemName" label="系统名称" align="center"></el-table-column> |
|
|
|
header-align="center"> |
|
|
|
<el-table-column prop="type" label="系统类型" align="center"> |
|
|
|
<!-- <el-table-column type="selection" width="55" align="center"></el-table-column> --> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-table-column type="index" |
|
|
|
{{ systemTypeKeys[scope.row.type] }} |
|
|
|
width="100" |
|
|
|
</template> |
|
|
|
label="序号" |
|
|
|
</el-table-column> |
|
|
|
align="center"> |
|
|
|
<el-table-column prop="supplierName" label="供应商" align="center"></el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="belong" label="系统归属" align="center"> |
|
|
|
<el-table-column prop="systemName" |
|
|
|
<template slot-scope="scope"> |
|
|
|
label="系统名称" |
|
|
|
{{ systemBelongKeys[scope.row.belong] }} |
|
|
|
align="center"></el-table-column> |
|
|
|
</template> |
|
|
|
<el-table-column prop="type" |
|
|
|
</el-table-column> |
|
|
|
label="系统类型" |
|
|
|
<el-table-column prop="state" label="系统状态" align="center"> |
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ systemStatusKeys[scope.row.state] }} |
|
|
|
{{ systemTypeKeys[scope.row.type] }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="payamount" label="系统后台" align="center"> |
|
|
|
<el-table-column prop="supplierName" |
|
|
|
<template slot-scope="scope"> |
|
|
|
label="供应商" |
|
|
|
<el-button type="text" @click="toBackstage(scope.row)" v-if="scope.row.systemId !== '11'" v-auth="'/configure:系统后台进入'">进入</el-button> |
|
|
|
align="center"></el-table-column> |
|
|
|
</template> |
|
|
|
<el-table-column prop="belong" |
|
|
|
</el-table-column> |
|
|
|
label="系统归属" |
|
|
|
<el-table-column prop="payamount" label="项目系统" align="center"> |
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="text" @click="getIntoProject(scope.row)" v-auth="'/configure:项目系统进入'">进入</el-button> |
|
|
|
{{ systemBelongKeys[scope.row.belong] }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="payamount" label="判分系统" align="center"> |
|
|
|
<el-table-column prop="state" |
|
|
|
<template slot-scope="scope"> |
|
|
|
label="系统状态" |
|
|
|
<el-button type="text" @click="getIntoJudgement(scope.row)" v-auth="'/configure:判分系统进入'">进入</el-button> |
|
|
|
align="center"> |
|
|
|
</template> |
|
|
|
<template slot-scope="scope"> |
|
|
|
</el-table-column> |
|
|
|
{{ systemStatusKeys[scope.row.state] }} |
|
|
|
</el-table> |
|
|
|
</template> |
|
|
|
<div class="pagination"> |
|
|
|
</el-table-column> |
|
|
|
<el-pagination background @current-change="handleCurrentChange" |
|
|
|
<el-table-column prop="payamount" |
|
|
|
layout="total, prev, pager, next" :total="totals"> |
|
|
|
label="系统后台" |
|
|
|
</el-pagination> |
|
|
|
align="center"> |
|
|
|
</div> |
|
|
|
<template slot-scope="scope"> |
|
|
|
</el-card> |
|
|
|
<el-button type="text" |
|
|
|
</div> |
|
|
|
@click="toBackstage(scope.row)" |
|
|
|
|
|
|
|
v-if="scope.row.systemId !== '11'" |
|
|
|
|
|
|
|
v-auth="'/configure:系统后台进入'">进入</el-button> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="payamount" |
|
|
|
|
|
|
|
label="项目系统" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
<el-button type="text" |
|
|
|
|
|
|
|
@click="getIntoProject(scope.row)" |
|
|
|
|
|
|
|
v-auth="'/configure:项目系统进入'">进入</el-button> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="payamount" |
|
|
|
|
|
|
|
label="判分系统" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
<el-button type="text" |
|
|
|
|
|
|
|
@click="getIntoJudgement(scope.row)" |
|
|
|
|
|
|
|
v-auth="'/configure:判分系统进入'">进入</el-button> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
<div class="pagination"> |
|
|
|
|
|
|
|
<el-pagination background |
|
|
|
|
|
|
|
@current-change="handleCurrentChange" |
|
|
|
|
|
|
|
layout="total, prev, pager, next" |
|
|
|
|
|
|
|
:total="totals"> |
|
|
|
|
|
|
|
</el-pagination> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import Setting from "@/setting"; |
|
|
|
import Setting from "@/setting"; |
|
|
|
|
|
|
|
import Cookie from 'js-cookie' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
userId: this.$store.state.userLoginId, |
|
|
|
userId: this.$store.state.userLoginId, |
|
|
|
token: btoa(sessionStorage.getItem('token')), |
|
|
|
token: btoa(sessionStorage.getItem('token')), |
|
|
|
systemAttribution: "", |
|
|
|
systemAttribution: "", |
|
|
|
systemType: "", |
|
|
|
systemType: "", |
|
|
|
systemSearch: "", |
|
|
|
systemSearch: "", |
|
|
|
searchTimer: null, |
|
|
|
searchTimer: null, |
|
|
|
systemData: [], |
|
|
|
systemData: [], |
|
|
|
totals: 0, |
|
|
|
totals: 0, |
|
|
|
systemBelongList: [ |
|
|
|
systemBelongList: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "外部产品", |
|
|
|
label: "外部产品", |
|
|
|
value: 1 |
|
|
|
value: 1 |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "内部系统", |
|
|
|
|
|
|
|
value: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
systemBelongKeys: { |
|
|
|
|
|
|
|
1: '外部产品', |
|
|
|
|
|
|
|
0: '内部系统' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
systemTypeList: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "编程类", |
|
|
|
|
|
|
|
value: 0 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "流程类", |
|
|
|
|
|
|
|
value: 1 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
systemTypeKeys: { |
|
|
|
|
|
|
|
0: '编程类', |
|
|
|
|
|
|
|
1: '流程类' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
systemStatusKeys: { |
|
|
|
|
|
|
|
0: '运行中', |
|
|
|
|
|
|
|
1: '默认' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
pageNo: +this.$route.query.page || 1, |
|
|
|
|
|
|
|
pageSize: 10 |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
watch: { |
|
|
|
|
|
|
|
systemSearch: function(val) { |
|
|
|
|
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
|
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
|
|
|
|
this.initData(); |
|
|
|
|
|
|
|
}, 500); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
|
|
|
|
this.getData(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
initData() { |
|
|
|
|
|
|
|
this.pageNum = 1; |
|
|
|
|
|
|
|
this.getData(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getData() { |
|
|
|
|
|
|
|
const sid = this.$store.state.dataPer.find(e => e.permissionName === '服务配置') |
|
|
|
|
|
|
|
let data = { |
|
|
|
|
|
|
|
belong: this.systemAttribution, |
|
|
|
|
|
|
|
type: this.systemType, |
|
|
|
|
|
|
|
systemName: this.systemSearch, |
|
|
|
|
|
|
|
pageNum: this.pageNo, |
|
|
|
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
|
|
|
supplierId: sid ? sid.supplierId : '' |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
this.$post(this.api.queryServiceConfig, data).then(res => { |
|
|
|
|
|
|
|
this.systemData = res.serviceList.records; |
|
|
|
|
|
|
|
this.totals = res.serviceList.total; |
|
|
|
|
|
|
|
}).catch(res => { |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleCurrentChange(val) { |
|
|
|
|
|
|
|
this.pageNo = val; |
|
|
|
|
|
|
|
this.$router.push(`configure?page=${val}`) |
|
|
|
|
|
|
|
this.getData(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
edit(row) { |
|
|
|
|
|
|
|
this.$store.commit("configData", { config_id: row.systemId }); |
|
|
|
|
|
|
|
this.$router.push("/addconfigure"); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 进入系统后台 |
|
|
|
|
|
|
|
toBackstage(row) { |
|
|
|
|
|
|
|
this.$router.push(`/backstage?systemId=${row.systemId}&show=1&name=${row.systemName}`) |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
getIntoProject(row) { |
|
|
|
{ |
|
|
|
this.$router.push(`/projectList?systemId=${row.systemId}&show=1&name=${row.systemName}`) |
|
|
|
label: "内部系统", |
|
|
|
}, |
|
|
|
value: 0 |
|
|
|
getIntoJudgement(row) { |
|
|
|
} |
|
|
|
// console.log(`${Setting.jumpPath}#/?systemId=${row.systemId}&token=${this.token}&referrer=${btoa(location.href)}`); |
|
|
|
], |
|
|
|
location.href = `${Setting.jumpPath}#/?systemId=${row.systemId}&token=${this.token}&referrer=${btoa(location.href)}`; |
|
|
|
systemBelongKeys: { |
|
|
|
|
|
|
|
1: '外部产品', |
|
|
|
|
|
|
|
0: '内部系统' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
systemTypeList: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "编程类", |
|
|
|
|
|
|
|
value: 0 |
|
|
|
}, |
|
|
|
}, |
|
|
|
setCookie(name, value) { |
|
|
|
{ |
|
|
|
if (value) { |
|
|
|
label: "流程类", |
|
|
|
var days = 1;//定义一天 |
|
|
|
value: 1 |
|
|
|
var exp = new Date(); |
|
|
|
|
|
|
|
exp.setTime(exp.getTime() + days * 24 * 60 * 60 * 1000); |
|
|
|
|
|
|
|
//写入Cookie,toGMTString将时间转换成字符串 |
|
|
|
|
|
|
|
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString + ";path=/;"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
systemTypeKeys: { |
|
|
|
|
|
|
|
0: '编程类', |
|
|
|
|
|
|
|
1: '流程类' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
systemStatusKeys: { |
|
|
|
|
|
|
|
0: '运行中', |
|
|
|
|
|
|
|
1: '默认' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
pageNo: +this.$route.query.page || 1, |
|
|
|
|
|
|
|
pageSize: 10 |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
watch: { |
|
|
|
|
|
|
|
systemSearch: function (val) { |
|
|
|
|
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
|
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
|
|
|
|
this.initData(); |
|
|
|
|
|
|
|
}, 500); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
mounted () { |
|
|
|
|
|
|
|
this.getData(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
initData () { |
|
|
|
|
|
|
|
this.pageNum = 1; |
|
|
|
|
|
|
|
this.getData(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getData () { |
|
|
|
|
|
|
|
const sid = this.$store.state.dataPer.find(e => e.permissionName === '服务配置') |
|
|
|
|
|
|
|
let data = { |
|
|
|
|
|
|
|
belong: this.systemAttribution, |
|
|
|
|
|
|
|
type: this.systemType, |
|
|
|
|
|
|
|
systemName: this.systemSearch, |
|
|
|
|
|
|
|
pageNum: this.pageNo, |
|
|
|
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
|
|
|
supplierId: sid ? sid.supplierId : '' |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
this.$post(this.api.queryServiceConfig, data).then(res => { |
|
|
|
|
|
|
|
this.systemData = res.serviceList.records; |
|
|
|
|
|
|
|
this.totals = res.serviceList.total; |
|
|
|
|
|
|
|
}).catch(res => { |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleCurrentChange (val) { |
|
|
|
|
|
|
|
this.pageNo = val; |
|
|
|
|
|
|
|
this.$router.push(`configure?page=${val}`) |
|
|
|
|
|
|
|
this.getData(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
edit (row) { |
|
|
|
|
|
|
|
this.$store.commit("configData", { config_id: row.systemId }); |
|
|
|
|
|
|
|
this.$router.push("/addconfigure"); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 进入系统后台 |
|
|
|
|
|
|
|
toBackstage (row) { |
|
|
|
|
|
|
|
if (row.systemId == 19) { |
|
|
|
|
|
|
|
location.href = `${Setting.sandPath}/#/config?token=${sessionStorage.getItem('token')}&referrer=${encodeURIComponent(location.href)}` |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.$router.push(`/backstage?systemId=${row.systemId}&show=1&name=${row.systemName}`) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getIntoProject (row) { |
|
|
|
|
|
|
|
this.$router.push(`/projectList?systemId=${row.systemId}&show=1&name=${row.systemName}`) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getIntoJudgement (row) { |
|
|
|
|
|
|
|
// console.log(`${Setting.jumpPath}#/?systemId=${row.systemId}&token=${this.token}&referrer=${btoa(location.href)}`); |
|
|
|
|
|
|
|
location.href = `${Setting.jumpPath}#/?systemId=${row.systemId}&token=${this.token}&referrer=${btoa(location.href)}`; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
setCookie (name, value) { |
|
|
|
|
|
|
|
if (value) { |
|
|
|
|
|
|
|
var days = 1;//定义一天 |
|
|
|
|
|
|
|
var exp = new Date(); |
|
|
|
|
|
|
|
exp.setTime(exp.getTime() + days * 24 * 60 * 60 * 1000); |
|
|
|
|
|
|
|
//写入Cookie,toGMTString将时间转换成字符串 |
|
|
|
|
|
|
|
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString + ";path=/;"; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|