|
|
@@ -1,52 +1,92 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-dialog title="近三年主要工程业绩" :visible.sync="visible" top="5vh" width="90%">
|
|
|
- <!-- <el-form label-width="90px">
|
|
|
+ <el-table :data="performanceList">
|
|
|
+ <el-table-column label="操作" width="70" align="center" fixed>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="openDialog(scope.row)"></el-button>
|
|
|
+ <el-button size="small" type="text" style="margin-left:3px" icon="el-icon-delete" title="删除"
|
|
|
+ @click="deletedata(scope.row)"></el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="ProjectName" label="设备名称" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column prop="BearContent" label="主要内容" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column prop="OwnerUnit" label="业主单位" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column prop="StartTime" label="起始时间" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ jstimehandle(scope.row.StartTime+'') }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="StopTime" label="结束时间" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ jstimehandle(scope.row.StartTime+'') }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="Tudge" label="有无事故" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-show="scope.row.Tudge=='无事故'" type="primary">无事故</el-tag>
|
|
|
+ <el-tag v-show="scope.row.Tudge=='有事故'" type="danger">有事故</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
+ :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="currentItemCount">
|
|
|
+ </el-pagination>
|
|
|
+
|
|
|
+ <el-dialog :title="Title" :visible.sync="visible" top="5vh">
|
|
|
+ <el-form ref="refPerformance" :model="PerformanceForm" label-width="100px">
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="查询条件">
|
|
|
- <el-input v-model="keyword" placeholder="请输入身份证号或姓名或内部编号" style="width:60%"></el-input>
|
|
|
- <router-link :to="'/biobank/source/addsource/operation'">
|
|
|
- <el-button style="float: right;margin-left:10px;" type="primary">添加新来源</el-button>
|
|
|
- </router-link>
|
|
|
- <el-button style="float: right;" type="primary" class="el-button" @click="seachdata">查 询</el-button>
|
|
|
+ <el-form-item label="设备名称">
|
|
|
+ <el-input v-model="PerformanceForm.ProjectName"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="主要内容">
|
|
|
+ <el-input v-model="PerformanceForm.BearContent"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="业主单位">
|
|
|
+ <el-input v-model="PerformanceForm.OwnerUnit"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="起始时间">
|
|
|
+ <el-date-picker style="width: 100%" v-model="PerformanceForm.StartTime" type="date" placeholder="请选择起始时间">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="结束时间">
|
|
|
+ <el-date-picker style="width: 100%" v-model="PerformanceForm.StopTime" type="date" placeholder="请选择结束时间">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="有无事故">
|
|
|
+ <el-select ref="refplace" v-model="PerformanceForm.Tudge" style="width:100%"
|
|
|
+ placeholder="请选择是否发生过质量、安全、环境事故">
|
|
|
+ <el-option label="无事故" value="无事故"></el-option>
|
|
|
+ <el-option label="有事故" value="有事故"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="备注信息">
|
|
|
+ <el-input v-model="PerformanceForm.Remark" type="textarea" :rows=3 placeholder="请输入备注信息"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- </el-form> -->
|
|
|
- <el-table :data="performanceList" :stripe="true">
|
|
|
- <!-- <el-table-column label="操作" width="80">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button size="small" @click="handleselect(scope.row)" type="text" title="选择">
|
|
|
- <i class="icon icon-checkmark"></i> 选择</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column> -->
|
|
|
- <el-table-column prop="ProjectName" label="设备名称" show-overflow-tooltip>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="BearContent" label="主要内容" show-overflow-tooltip>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="OwnerUnit" label="业主单位" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="StartTime" label="起始时间" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ jstimehandle(scope.row.StartTime+'') }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="StopTime" label="结束时间" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ jstimehandle(scope.row.StartTime+'') }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="Tudge" label="有无事故" show-overflow-tooltip>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="Remark" label="备注" show-overflow-tooltip>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
- :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="currentItemCount">
|
|
|
- </el-pagination>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" style="margin-top:-30px;">
|
|
|
+ <el-button @click="visible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="savedata()">确 定</el-button>
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
@@ -56,10 +96,15 @@
|
|
|
export default {
|
|
|
name: 'PerformanceList',
|
|
|
props: {
|
|
|
+ SupplierCertId: {
|
|
|
+ type: String,
|
|
|
+ default: '0'
|
|
|
+ },
|
|
|
visible: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
- }
|
|
|
+ },
|
|
|
+ performanceForm: {}
|
|
|
},
|
|
|
created() {
|
|
|
this.initData()
|
|
|
@@ -69,35 +114,37 @@
|
|
|
session: 'session'
|
|
|
})
|
|
|
},
|
|
|
- watch: {
|
|
|
- visible(val) {
|
|
|
- this.selfVisible = val
|
|
|
- if (this.visible) {
|
|
|
- this.createoptions
|
|
|
- }
|
|
|
- },
|
|
|
- selfVisible(val) {
|
|
|
- this.$emit('update:visible', val)
|
|
|
- }
|
|
|
- },
|
|
|
data() {
|
|
|
return {
|
|
|
performanceList: [],
|
|
|
+ SupplierCertId: '',
|
|
|
+ Title: '',
|
|
|
+ PerformanceForm: {
|
|
|
+ Id: '',
|
|
|
+ SupplierCertId: '',
|
|
|
+ ProjectName: '',
|
|
|
+ BearContent: '',
|
|
|
+ OwnerUnit: '',
|
|
|
+ StartTime: new Date(),
|
|
|
+ StopTime: new Date(),
|
|
|
+ Tudge: '',
|
|
|
+ Remark: '',
|
|
|
+ },
|
|
|
+ selfVisible: this.visible, // 避免vue双向绑定警告
|
|
|
currentPage: 1, // 分页
|
|
|
size: 10,
|
|
|
currentItemCount: 0,
|
|
|
- selfVisible: this.visible // 避免vue双向绑定警告
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
initData() {
|
|
|
let _this = this
|
|
|
- // request
|
|
|
const params = {
|
|
|
+ SupplierCertId: this.SupplierCertId,
|
|
|
_currentPage: this.currentPage,
|
|
|
_size: this.size,
|
|
|
}
|
|
|
- this.$axios.get('performance/performancellist', {
|
|
|
+ this.$axios.get('performance/performancelist', {
|
|
|
params
|
|
|
})
|
|
|
.then(res => {
|
|
|
@@ -109,6 +156,115 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
+ savedata() {
|
|
|
+ if (this.Title == '新增近三年主要工程业绩') {
|
|
|
+ this.addPerformance()
|
|
|
+ } else if (this.Title == '编辑近三年主要工程业绩') {
|
|
|
+ this.editPerformance()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ addPerformance() {
|
|
|
+ let _this = this
|
|
|
+ _this.PerformanceForm.SupplierCertId = parseInt(_this.PerformanceForm.SupplierCertId)
|
|
|
+ _this.$axios.post('/performance/addperformance/', _this.PerformanceForm)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message,
|
|
|
+ })
|
|
|
+ this.visible = false
|
|
|
+ this.initData()
|
|
|
+ } else {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ editPerformance() {
|
|
|
+ let _this = this
|
|
|
+ _this.PerformanceForm.SupplierCertId = parseInt(_this.PerformanceForm.SupplierCertId)
|
|
|
+ _this.$axios.put('/performance/editperformance/' + _this.PerformanceForm.Id, _this.PerformanceForm)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message,
|
|
|
+ })
|
|
|
+ this.visible = false
|
|
|
+ this.initData()
|
|
|
+ } else {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ deletedata(val){
|
|
|
+ let _this = this;
|
|
|
+ _this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ _this.$axios.delete('performance/performancedelete/' + val.Id, {})
|
|
|
+ .then(function (response) {
|
|
|
+ // response
|
|
|
+ if (response.data.code === 0) {
|
|
|
+ _this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: response.data.message
|
|
|
+ });
|
|
|
+ _this.initData();
|
|
|
+ } else {
|
|
|
+ _this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: response.data.message
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(function (error) {
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ showDialog() {
|
|
|
+ this.Title = '新增近三年主要工程业绩'
|
|
|
+ this.PerformanceForm.Id = 0
|
|
|
+ this.PerformanceForm.SupplierCertId = this.SupplierCertId
|
|
|
+ this.PerformanceForm.ProjectName = ''
|
|
|
+ this.PerformanceForm.BearContent = ''
|
|
|
+ this.PerformanceForm.OwnerUnit = ''
|
|
|
+ this.PerformanceForm.StartTime = new Date()
|
|
|
+ this.PerformanceForm.StopTime = new Date()
|
|
|
+ this.PerformanceForm.Tudge = ''
|
|
|
+ this.PerformanceForm.Remark = ''
|
|
|
+ this.visible = true
|
|
|
+ },
|
|
|
+ openDialog(val) {
|
|
|
+ this.Title = '编辑近三年主要工程业绩'
|
|
|
+ this.PerformanceForm.Id = val.Id
|
|
|
+ this.PerformanceForm.SupplierCertId = val.SupplierCertId
|
|
|
+ this.PerformanceForm.ProjectName = val.ProjectName
|
|
|
+ this.PerformanceForm.BearContent = val.BearContent
|
|
|
+ this.PerformanceForm.OwnerUnit = val.OwnerUnit
|
|
|
+ this.PerformanceForm.StartTime = new Date(val.StartTime)
|
|
|
+ this.PerformanceForm.StopTime = new Date(val.StopTime)
|
|
|
+ this.PerformanceForm.Tudge = val.Tudge
|
|
|
+ this.PerformanceForm.Remark = val.Remark
|
|
|
+ this.visible = true
|
|
|
+ },
|
|
|
seachdata() {
|
|
|
this.initData()
|
|
|
},
|
|
|
@@ -130,13 +286,9 @@
|
|
|
return '永久'
|
|
|
} else {
|
|
|
val = val.replace('T', ' ')
|
|
|
- return val.substring(0, 16)
|
|
|
+ return val.substring(0, 10)
|
|
|
}
|
|
|
},
|
|
|
- // handleselect(val) {
|
|
|
- // this.$emit('close', val)
|
|
|
- // this.selfVisible = false
|
|
|
- // }
|
|
|
}
|
|
|
}
|
|
|
|