|
@@ -0,0 +1,448 @@
|
|
|
+<template>
|
|
|
+ <div class="partyBuildingK" v-loading="loadingImport">
|
|
|
+ <div class="partyBuildingBtn">
|
|
|
+ <div class="collectSeach">
|
|
|
+ <div class="exceed">
|
|
|
+ <span class="exceedSpan">业务属性:</span>
|
|
|
+ <el-select v-model="sectionStr" placeholder="请选择业务属性">
|
|
|
+ <el-option
|
|
|
+ v-for="item in moduleData"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.sectionName"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <el-button type="primary" style="margin-left: 10px;" @click="getSeachData">搜索</el-button>
|
|
|
+ <el-button style="margin-left: 10px;" @click="resetSeach">重置</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="PeriodBtn">
|
|
|
+ <btns
|
|
|
+ :showImport="false"
|
|
|
+ :showExport="false"
|
|
|
+ :showAdd="$utils.havePurview('achieveK:oneLevel:add')"
|
|
|
+ :showSave="$utils.havePurview('achieveK:oneLevel:save')"
|
|
|
+ :showDelete="$utils.havePurview('achieveK:oneLevel:delete')"
|
|
|
+ :disSave="changeDateSelect.length === 0 || changeDateSelect.length>1"
|
|
|
+ :disDelete="changeDateSelect.length === 0"
|
|
|
+ :disImport="true"
|
|
|
+ :disExport="true"
|
|
|
+ @handleAdd="handleAdd"
|
|
|
+ @handleEdit="handleEdit"
|
|
|
+ @handleDelete="handleDelete"
|
|
|
+ @handleImport="handleImport"
|
|
|
+ @handleExport="handleExport"
|
|
|
+ ></btns>
|
|
|
+ </div>
|
|
|
+ <div class="partyBuildingTableData">
|
|
|
+ <el-table :data="partyBuildingData" style="width: 100%" @select="rowClick" @select-all="rowClick">
|
|
|
+ <el-table-column type="selection" label="操作" align="center"></el-table-column>
|
|
|
+ <el-table-column label="序号" type="index" />
|
|
|
+ <el-table-column label="单位名称" prop="organizationName" width="300" />
|
|
|
+ <el-table-column label="业务属性" prop="sectionName" />
|
|
|
+ <el-table-column label="年度" prop="year" />
|
|
|
+ <el-table-column label="党建系数" prop="multiplier">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{scope.row.multiplier*100}}%</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="备注" prop="remarks" />
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="page.currentPage"
|
|
|
+ :page-size="page.pagesize"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="page.total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ <el-dialog :title="title" v-model="dialogVisible" width="600px" :close-on-click-modal="false">
|
|
|
+ <div class="periodFrom">
|
|
|
+ <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" :validate-on-rule-change="false">
|
|
|
+ <el-form-item label="单位名称" prop="organizationName">
|
|
|
+ <el-select v-model="ruleForm.organizationName" placeholder="请选择单位名称">
|
|
|
+ <el-option
|
|
|
+ v-for="item in companyDatas"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="业务属性" prop="sectionName">
|
|
|
+ <el-select v-model="ruleForm.sectionName" placeholder="请选择业务属性">
|
|
|
+ <el-option
|
|
|
+ v-for="item in moduleData"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.sectionName"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="年份" prop="year">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="ruleForm.year"
|
|
|
+ type="year"
|
|
|
+ value-format="YYYY"
|
|
|
+ placeholder="请选择年份"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="党建系数" prop="multiplier">
|
|
|
+ <el-input-number v-model="ruleForm.multiplier" :precision="2" :step="0.1" :min="0" :max="1" placeholder="请输入党建系数" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="描述" prop="remarks">
|
|
|
+ <el-input v-model="ruleForm.remarks" :rows="5" type="textarea" placeholder="请输入描述"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <span class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="saveevaluaStart('ruleForm')">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ <indicator-item ref="indicatorItem"></indicator-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+// import importDailog from '../importPage/importDailog.vue'
|
|
|
+// import partyBuildingDetail from './partyBuildingKDetail.vue'
|
|
|
+import btns from '../elbuttonS.vue'
|
|
|
+import {apiGetpartybuildingList, apiDeletepartyBuildRemove,apiGetbinsectionList,
|
|
|
+ apiGetorganizationgetTree, apiPostpartybuildSave} from '../../api/api'
|
|
|
+export default {
|
|
|
+ components: { btns },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dialogVisible: false,
|
|
|
+ title: '',
|
|
|
+ isSave: false,
|
|
|
+ changeDateSelect: [],
|
|
|
+ sectionStr: '',
|
|
|
+ partyBuildingData:[],
|
|
|
+ departmentDataAll: [],
|
|
|
+ companyDatas: [],
|
|
|
+ moduleData: [],
|
|
|
+ ruleForm: {
|
|
|
+ organizationName: '',
|
|
|
+ sectionName: '',
|
|
|
+ year: '',
|
|
|
+ multiplier: 0,
|
|
|
+ remarks: ''
|
|
|
+ },
|
|
|
+ rules: {
|
|
|
+ organizationName: [
|
|
|
+ { required: true, message: '请选择单位名称', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ sectionName: [
|
|
|
+ { required: true, message: '请选择业务属性', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ year: [
|
|
|
+ { required: true, message: '请选择年份', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ multiplier: [
|
|
|
+ { required: true, message: '请输入党建系数', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ remarks: [
|
|
|
+ { required: true, message: '请输入描述', trigger: 'blur' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ page:{
|
|
|
+ pagesize: 12,
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0
|
|
|
+ },
|
|
|
+ evalradio: {},
|
|
|
+ loadingImport: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getpartyBuildingData()
|
|
|
+ this.getOrganizetionData()
|
|
|
+ this.getBinSectionS()
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ // 查询人员配置数据
|
|
|
+ getpartyBuildingData(type) {
|
|
|
+ let that = this
|
|
|
+ let params = {
|
|
|
+ pageNum: this.page.currentPage,
|
|
|
+ pageSize: this.page.pagesize
|
|
|
+ }
|
|
|
+ if (type) {
|
|
|
+ params.sectionId = that.sectionStr
|
|
|
+ }
|
|
|
+ apiGetpartybuildingList(params).then(datas =>{
|
|
|
+ if (datas && datas.data) {
|
|
|
+ that.partyBuildingData = datas.data.records
|
|
|
+ that.page.total = datas.data.total
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 查询业务属性
|
|
|
+ getBinSectionS() {
|
|
|
+ let that = this
|
|
|
+ apiGetbinsectionList().then(datas =>{
|
|
|
+ if (datas && datas.data) {
|
|
|
+ that.moduleData = datas.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //查询组织数据
|
|
|
+ getOrganizetionData() {
|
|
|
+ let that = this
|
|
|
+ let params = {
|
|
|
+ id: '23031000',
|
|
|
+ num: 1
|
|
|
+ }
|
|
|
+ apiGetorganizationgetTree(params).then(datas =>{
|
|
|
+ if (datas && datas.data && datas.data[0].children.length>0) {
|
|
|
+ that.companyDatas = datas.data[0].children
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleAdd() {
|
|
|
+ this.dialogVisible = true
|
|
|
+ this.isSave = false
|
|
|
+ this.title = '新增党建考核系数'
|
|
|
+ this.ruleForm = {
|
|
|
+ organizationName: '',
|
|
|
+ sectionName: '',
|
|
|
+ year: '',
|
|
|
+ multiplier: 0,
|
|
|
+ remarks: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleEdit() {
|
|
|
+ this.dialogVisible = true
|
|
|
+ this.isSave = true
|
|
|
+ this.title = '修改党建考核系数'
|
|
|
+ this.evalradio = this.changeDateSelect[0]
|
|
|
+ this.ruleForm = {
|
|
|
+ organizationName: this.evalradio.departId,
|
|
|
+ sectionName: this.evalradio.sectionId,
|
|
|
+ year: this.evalradio.year,
|
|
|
+ multiplier: this.evalradio.multiplier,
|
|
|
+ remarks: this.evalradio.remarks
|
|
|
+ }
|
|
|
+ },
|
|
|
+ saveevaluaStart(formName) {
|
|
|
+ let that = this
|
|
|
+ that.$refs[formName].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ that.saveAndEditpartBuildData()
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ saveAndEditpartBuildData() {
|
|
|
+ let that = this
|
|
|
+ let comName = ''
|
|
|
+ that.companyDatas.forEach(item =>{
|
|
|
+ if (item.id === that.ruleForm.organizationName) {
|
|
|
+ comName = item.name
|
|
|
+ }
|
|
|
+ })
|
|
|
+ let params = {
|
|
|
+ departId: that.ruleForm.organizationName,
|
|
|
+ organizationName: comName,
|
|
|
+ sectionId: that.ruleForm.sectionName,
|
|
|
+ year: that.ruleForm.year,
|
|
|
+ multiplier: that.ruleForm.multiplier,
|
|
|
+ remarks: that.ruleForm.remarks
|
|
|
+ }
|
|
|
+ if (that.isSave) {
|
|
|
+ params.id = that.evalradio.id
|
|
|
+ }
|
|
|
+ apiPostpartybuildSave(params).then(datas =>{
|
|
|
+ if (!datas.success) {
|
|
|
+ that.$message({
|
|
|
+ message: datas.message,
|
|
|
+ type: 'error'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ if (!that.isSave) {
|
|
|
+ that.$message({
|
|
|
+ message: '党建考核系数新增成功',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ that.$message({
|
|
|
+ message: '党建考核系数修改成功',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ that.dialogVisible = false
|
|
|
+ that.changeDateSelect = []
|
|
|
+ that.getpartyBuildingData()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //删除指标数据
|
|
|
+ handleDelete() {
|
|
|
+ this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ let that = this
|
|
|
+ let paramsArr = []
|
|
|
+ that.changeDateSelect.forEach(it =>{
|
|
|
+ paramsArr.push(it.id)
|
|
|
+ })
|
|
|
+ apiDeletepartyBuildRemove(paramsArr.join(',')).then(datas =>{
|
|
|
+ if (datas) {
|
|
|
+ that.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功!'
|
|
|
+ });
|
|
|
+ that.changeDateSelect = []
|
|
|
+ that.getpartyBuildingData()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ rowClick(selection, row) {
|
|
|
+ this.changeDateSelect = selection
|
|
|
+ },
|
|
|
+ getSeachData() {
|
|
|
+ this.page.currentPage = 1
|
|
|
+ this.getpartyBuildingData('seach')
|
|
|
+ },
|
|
|
+ resetSeach() {
|
|
|
+ this.page.currentPage = 1
|
|
|
+ this.sectionStr = ''
|
|
|
+ this.getpartyBuildingData()
|
|
|
+ },
|
|
|
+ successImport(val) {
|
|
|
+ this.loadingImport = false
|
|
|
+ this.getpartyBuildingData()
|
|
|
+ },
|
|
|
+ importLoading(val) {
|
|
|
+ this.loadingImport = true
|
|
|
+ },
|
|
|
+ handleSizeChange(val){
|
|
|
+ this.page.pagesize = val
|
|
|
+ this.getpartyBuildingData()
|
|
|
+ },
|
|
|
+ handleCurrentChange(val){
|
|
|
+ this.page.currentPage =val
|
|
|
+ this.getpartyBuildingData()
|
|
|
+ },
|
|
|
+ handleImport() {
|
|
|
+ this.$refs.importPage.upload.title = "考评指标管理信息导入"
|
|
|
+ this.$refs.importPage.upload.open = true
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less">
|
|
|
+.partyBuildingK{
|
|
|
+ .partyBuildingBtn{
|
|
|
+ .collectSeach{
|
|
|
+ display: flex;
|
|
|
+ padding: 24px 20px;
|
|
|
+ border-bottom: 1px solid#D6DBEA;
|
|
|
+ .exceed{
|
|
|
+ display: flex;
|
|
|
+ .exceedSpan{
|
|
|
+ width: 80px;
|
|
|
+ height: 12px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #8991B0;
|
|
|
+ line-height: 12px;
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ .el-input{
|
|
|
+ margin-right:10px;
|
|
|
+ .el-input__inner{
|
|
|
+ height:30px;
|
|
|
+ }
|
|
|
+ .el-input__suffix{
|
|
|
+ .el-select__caret{
|
|
|
+ line-height:30px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-select{
|
|
|
+ margin-right:10px;
|
|
|
+ .el-input__inner{
|
|
|
+ height:30px;
|
|
|
+ }
|
|
|
+ .el-input__suffix{
|
|
|
+ .el-select__caret{
|
|
|
+ line-height:30px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ span{
|
|
|
+ font-size:14px;
|
|
|
+ }
|
|
|
+ .PeriodBtn{
|
|
|
+ display: flex;
|
|
|
+ justify-content: end;
|
|
|
+ padding: 20px 0;
|
|
|
+ }
|
|
|
+ .el-button{
|
|
|
+ height: 30px;
|
|
|
+ // width:100px;
|
|
|
+ padding: 0 30px ;
|
|
|
+ // padding-top: 8px;
|
|
|
+ span{
|
|
|
+ margin:0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .partyBuildingTableData{
|
|
|
+ .el-table{
|
|
|
+ .el-table__body-wrapper{
|
|
|
+ height: 58vh !important;
|
|
|
+ }
|
|
|
+ .el-input__inner{
|
|
|
+ height: 30px !important;
|
|
|
+ }
|
|
|
+ .el-radio__label{
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .indicitem{
|
|
|
+ color: #409EFF;
|
|
|
+ font-size: 12px;
|
|
|
+ margin-right: 20px;
|
|
|
+ cursor:pointer;
|
|
|
+ &:hover{
|
|
|
+ text-decoration: underline;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-pagination{
|
|
|
+ margin-top: 20px;
|
|
|
+ text-align: end;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-overlay{
|
|
|
+ .el-dialog{
|
|
|
+ .el-dialog__body{
|
|
|
+ padding: 30px 60px 30px 20px !important;
|
|
|
+ .periodFrom{
|
|
|
+ .el-select, .el-input{
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .el-input{
|
|
|
+ height: 30px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|