|
|
@@ -48,6 +48,35 @@
|
|
|
<base-list ref="evaluation_listType_one" :evaluateId="0" category="0" ContractClass="02"></base-list>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
+ <el-tab-pane label="参数配置" name="5" >
|
|
|
+ <el-card class="box-card">
|
|
|
+ <div slot="header">
|
|
|
+ <span style="float: right;">
|
|
|
+ <div style="text-align: right ">
|
|
|
+ <el-button type="primary" size="mini" style="" @click="saveParams">保存</el-button>
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="4">
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form :model="parameterForm" label-width="200px" label-position="left">
|
|
|
+ <el-form-item label="是否开启评价">
|
|
|
+ <el-switch on-text="是" off-text="否" on-color="#13ce66" v-model="parameterForm.isStartEva"></el-switch>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="合同年度评价优秀分数线" prop="yearEvaGood">
|
|
|
+ <el-input-number v-model="parameterForm.yearEvaGood" :min="0" :precision="2" :step="0.1" style="width:100%"></el-input-number>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="合同年度评价合格分数线" prop="yearEvaPass">
|
|
|
+ <el-input-number v-model="parameterForm.yearEvaPass" :min="0" :precision="2" :step="0.1" style="width:100%"></el-input-number>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ </el-tab-pane>
|
|
|
+
|
|
|
</el-tabs>
|
|
|
|
|
|
</el-card>
|
|
|
@@ -134,8 +163,8 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
- import { mapGetters } from 'vuex';
|
|
|
- import api from '@/api/oilcontract/evaluationItems';
|
|
|
+ import { mapGetters } from 'vuex'
|
|
|
+ import api from '@/api/oilcontract/evaluationItems'
|
|
|
import evaluationList from './evaluationlist'
|
|
|
import baseList from './baselist'
|
|
|
|
|
|
@@ -148,30 +177,37 @@
|
|
|
name: 'oilevaluationitems',
|
|
|
components: {
|
|
|
evaluationList,
|
|
|
- baseList,
|
|
|
+ baseList
|
|
|
},
|
|
|
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
- activeName:'1',
|
|
|
- oneList:[],//上级节点
|
|
|
- popover_index:null,
|
|
|
- superiorDisabled:false,
|
|
|
+ parameterForm: {
|
|
|
+ categoryId: 'GFGL_CONTRACT',
|
|
|
+ parameterId: 'paramset',
|
|
|
+ isStartEva: false,
|
|
|
+ yearEvaGood: 80,
|
|
|
+ yearEvaPass: 60
|
|
|
+ },
|
|
|
+ activeName: '1',
|
|
|
+ oneList: [], // 上级节点
|
|
|
+ popover_index: null,
|
|
|
+ superiorDisabled: false,
|
|
|
dialogVisible: false,
|
|
|
- //列表数据
|
|
|
+ // 列表数据
|
|
|
entityList: [],
|
|
|
- //分页参数
|
|
|
+ // 分页参数
|
|
|
size: 10,
|
|
|
currentPage: 1,
|
|
|
currentItemCount: 0,
|
|
|
- //列表排序
|
|
|
+ // 列表排序
|
|
|
Column: {
|
|
|
Order: '',
|
|
|
Prop: ''
|
|
|
},
|
|
|
- //查询时间new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()
|
|
|
+ // 查询时间new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()
|
|
|
CreateOn: [],
|
|
|
- //查询项
|
|
|
+ // 查询项
|
|
|
searchFormReset: {},
|
|
|
searchForm: {
|
|
|
Id: '',
|
|
|
@@ -188,127 +224,126 @@
|
|
|
CreateBy: '',
|
|
|
ModifiedOn: '',
|
|
|
ModifiedUserId: '',
|
|
|
- ModifiedBy: '',
|
|
|
+ ModifiedBy: ''
|
|
|
|
|
|
},
|
|
|
tableColumns: [
|
|
|
|
|
|
{
|
|
|
- prop: "ParentId",
|
|
|
+ prop: 'ParentId',
|
|
|
label: '上级节点ID',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "Type",
|
|
|
+ prop: 'Type',
|
|
|
label: '分类',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "SequenceNo",
|
|
|
+ prop: 'SequenceNo',
|
|
|
label: '序号',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "Content",
|
|
|
+ prop: 'Content',
|
|
|
label: '评价内容',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "NormalScore",
|
|
|
+ prop: 'NormalScore',
|
|
|
label: '标准分值',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "LevelCode",
|
|
|
+ prop: 'LevelCode',
|
|
|
label: '级别',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "Remark",
|
|
|
+ prop: 'Remark',
|
|
|
label: '备注',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
- },
|
|
|
+ }
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
- computed:{
|
|
|
- tableFun:function(){
|
|
|
- return function(name,item){
|
|
|
- if(name == 'Type'){
|
|
|
+ computed: {
|
|
|
+ tableFun: function () {
|
|
|
+ return function (name, item) {
|
|
|
+ if (name == 'Type') {
|
|
|
var items = Number(item)
|
|
|
- switch(items){
|
|
|
+ switch (items) {
|
|
|
case 1:
|
|
|
return '服务商'
|
|
|
- break;
|
|
|
+ break
|
|
|
case 2:
|
|
|
return '供应商'
|
|
|
- break;
|
|
|
+ break
|
|
|
case 3:
|
|
|
return '承包商'
|
|
|
- break;
|
|
|
+ break
|
|
|
default:
|
|
|
- return '--'
|
|
|
+ return '--'
|
|
|
}
|
|
|
- }else if(name == 'LevelCode'){
|
|
|
+ } else if (name == 'LevelCode') {
|
|
|
var items = Number(item)
|
|
|
- switch(items){
|
|
|
+ switch (items) {
|
|
|
case 1:
|
|
|
return '一级'
|
|
|
- break;
|
|
|
+ break
|
|
|
case 2:
|
|
|
return '二级'
|
|
|
- break;
|
|
|
+ break
|
|
|
default:
|
|
|
- return '--'
|
|
|
+ return '--'
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return item
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
- //查询条件初始值备份
|
|
|
+ created () {
|
|
|
+ this.initParams()
|
|
|
+ // 查询条件初始值备份
|
|
|
// Object.assign(this.searchFormReset, this.searchForm);
|
|
|
- //查询列表
|
|
|
+ // 查询列表
|
|
|
// this.initDatas();
|
|
|
// this.evaluationItemsOnelist()
|
|
|
},
|
|
|
methods: {
|
|
|
- searchFormType(e){
|
|
|
+ searchFormType (e) {
|
|
|
console.log(e)
|
|
|
-
|
|
|
},
|
|
|
- onLevelChange(index){
|
|
|
+ onLevelChange (index) {
|
|
|
console.log(index)
|
|
|
- if(index==1){
|
|
|
+ if (index == 1) {
|
|
|
this.superiorDisabled = true
|
|
|
this.searchForm.ParentId = ''
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.superiorDisabled = false
|
|
|
}
|
|
|
},
|
|
|
- initDatas() {
|
|
|
- //分页及列表条件
|
|
|
+ initDatas () {
|
|
|
+ // 分页及列表条件
|
|
|
let params = {
|
|
|
_currentPage: this.currentPage,
|
|
|
_size: this.size,
|
|
|
Order: this.Column.Order,
|
|
|
- Prop: this.Column.Prop,
|
|
|
+ Prop: this.Column.Prop
|
|
|
}
|
|
|
let myCreateOn = []
|
|
|
// 解析时间
|
|
|
@@ -319,9 +354,9 @@
|
|
|
myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
|
|
|
myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
|
|
|
}
|
|
|
- //查询条件
|
|
|
+ // 查询条件
|
|
|
Object.assign(params, this.searchForm)
|
|
|
- //访问接口
|
|
|
+ // 访问接口
|
|
|
api.evaluationItems(myCreateOn.join(','), params, this.$axios).then(res => {
|
|
|
this.entityList = res.data.items
|
|
|
this.currentItemCount = res.data.currentItemCount
|
|
|
@@ -329,24 +364,69 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
+ initParams () {
|
|
|
+ let _this = this
|
|
|
+ const params = {
|
|
|
+ categoryId: 'GFGL_CONTRACT',
|
|
|
+ parameterId: 'paramset'
|
|
|
+ }
|
|
|
+ _this.$axios.get('paramset/param-list', { params })
|
|
|
+ .then(res => {
|
|
|
+ if (res.data && res.data.length > 0) {
|
|
|
+ for (var i = 0; i < res.data.length; i++) {
|
|
|
+ switch (res.data[i].Parametercode) {
|
|
|
+ case 'isStartEva':
|
|
|
+ if (res.data[i].Parametercontent === 'true') {
|
|
|
+ _this.parameterForm.isStartEva = true
|
|
|
+ }
|
|
|
+ break
|
|
|
+ case 'yearEvaGood':
|
|
|
+ _this.parameterForm.yearEvaGood = (res.data[i].Parametercontent)
|
|
|
+ break
|
|
|
+ case 'yearEvaPass':
|
|
|
+ _this.parameterForm.yearEvaPass = (res.data[i].Parametercontent)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ saveParams () {
|
|
|
+ let _this = this
|
|
|
+ _this.$axios.put('paramset/specify-cate-save-params', _this.parameterForm)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ },
|
|
|
// 获取一级节点
|
|
|
- evaluationItemsOnelist() {
|
|
|
- api.evaluationItemsOnelist(0,0,this.$axios).then(res => {
|
|
|
- console.log('一级节点',res)
|
|
|
+ evaluationItemsOnelist () {
|
|
|
+ api.evaluationItemsOnelist(0, 0, this.$axios).then(res => {
|
|
|
+ console.log('一级节点', res)
|
|
|
this.oneList = res.data.items
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- searchCommand(command) {
|
|
|
+ searchCommand (command) {
|
|
|
if (command == 'search') {
|
|
|
this.dialogVisible = true
|
|
|
} else if (command == 'clear') {
|
|
|
this.clearSearch()
|
|
|
}
|
|
|
},
|
|
|
- //列表排序功能
|
|
|
- orderby(column) {
|
|
|
+ // 列表排序功能
|
|
|
+ orderby (column) {
|
|
|
if (column.order == 'ascending') {
|
|
|
this.Column.Order = 'asc'
|
|
|
} else if (column.order == 'descending') {
|
|
|
@@ -355,49 +435,48 @@
|
|
|
this.Column.Prop = column.prop
|
|
|
this.initDatas()
|
|
|
},
|
|
|
- clearSearch() {
|
|
|
- Object.assign(this.searchForm, this.searchFormReset);
|
|
|
- //this.searchForm = this.searchFormReset;
|
|
|
+ clearSearch () {
|
|
|
+ Object.assign(this.searchForm, this.searchFormReset)
|
|
|
+ // this.searchForm = this.searchFormReset;
|
|
|
this.CreateOn = ''
|
|
|
this.initDatas()
|
|
|
},
|
|
|
- handleSearch() {
|
|
|
- this.currentPage = 1;
|
|
|
- this.dialogVisible = false;
|
|
|
- this.initDatas();
|
|
|
+ handleSearch () {
|
|
|
+ this.currentPage = 1
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.initDatas()
|
|
|
},
|
|
|
- handleCurrentChange(value) {
|
|
|
+ handleCurrentChange (value) {
|
|
|
this.currentPage = value
|
|
|
this.initDatas()
|
|
|
},
|
|
|
- handleSizeChange(value) {
|
|
|
+ handleSizeChange (value) {
|
|
|
this.size = value
|
|
|
this.currentPage = 1
|
|
|
this.initDatas()
|
|
|
},
|
|
|
- deleteEntity(row,index) {
|
|
|
+ deleteEntity (row, index) {
|
|
|
this.$refs['popover-' + `${index}`].doClose()
|
|
|
// var elementId = this.$refs.popover.$refs.popper.id
|
|
|
api.deleteEntity(row.Id, this.$axios).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
- this.initDatas();
|
|
|
+ this.initDatas()
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: res.data.message
|
|
|
- });
|
|
|
-
|
|
|
+ })
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
message: res.data.message
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
- jstimehandle(val) {
|
|
|
+ jstimehandle (val) {
|
|
|
if (val === '') {
|
|
|
return '----'
|
|
|
} else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
@@ -410,20 +489,19 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- formatDateTime(date) {
|
|
|
- var y = date.getFullYear();
|
|
|
- var m = date.getMonth() + 1;
|
|
|
- m = m < 10 ? ('0' + m) : m;
|
|
|
- var d = date.getDate();
|
|
|
- d = d < 10 ? ('0' + d) : d;
|
|
|
- var h = date.getHours();
|
|
|
- var minute = date.getMinutes();
|
|
|
- minute = minute < 10 ? ('0' + minute) : minute;
|
|
|
- return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
|
|
|
+ formatDateTime (date) {
|
|
|
+ var y = date.getFullYear()
|
|
|
+ var m = date.getMonth() + 1
|
|
|
+ m = m < 10 ? ('0' + m) : m
|
|
|
+ var d = date.getDate()
|
|
|
+ d = d < 10 ? ('0' + d) : d
|
|
|
+ var h = date.getHours()
|
|
|
+ var minute = date.getMinutes()
|
|
|
+ minute = minute < 10 ? ('0' + minute) : minute
|
|
|
+ return y + '-' + m + '-' + d + ' ' + h + ':' + minute
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style scoped="scoped">
|