|  | @@ -0,0 +1,173 @@
 | 
	
		
			
				|  |  | +<template>
 | 
	
		
			
				|  |  | +  <div class="m-container">
 | 
	
		
			
				|  |  | +    <h2>
 | 
	
		
			
				|  |  | +      <div class="squrt"></div>
 | 
	
		
			
				|  |  | +      网管课价格设置
 | 
	
		
			
				|  |  | +    </h2>
 | 
	
		
			
				|  |  | +    <div class="m-core">
 | 
	
		
			
				|  |  | +      <save-form
 | 
	
		
			
				|  |  | +        :inline="true"
 | 
	
		
			
				|  |  | +        :model="searchForm"
 | 
	
		
			
				|  |  | +        @submit="search"
 | 
	
		
			
				|  |  | +        @reset="onReSet"
 | 
	
		
			
				|  |  | +        ref='searchForm'
 | 
	
		
			
				|  |  | +      >
 | 
	
		
			
				|  |  | +        <el-form-item prop="organId">
 | 
	
		
			
				|  |  | +          <el-select
 | 
	
		
			
				|  |  | +            class="multiple"
 | 
	
		
			
				|  |  | +            v-model.trim="searchForm.organId"
 | 
	
		
			
				|  |  | +            filterable
 | 
	
		
			
				|  |  | +            clearable
 | 
	
		
			
				|  |  | +            placeholder="请选择分部"
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +            <el-option
 | 
	
		
			
				|  |  | +              v-for="(item, index) in selects.branchs"
 | 
	
		
			
				|  |  | +              :key="index"
 | 
	
		
			
				|  |  | +              :label="item.name"
 | 
	
		
			
				|  |  | +              :value="item.id"
 | 
	
		
			
				|  |  | +            ></el-option>
 | 
	
		
			
				|  |  | +          </el-select>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item>
 | 
	
		
			
				|  |  | +          <el-button native-type="submit" type="primary">搜索</el-button>
 | 
	
		
			
				|  |  | +          <el-button native-type="reset" type="danger">重置</el-button>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +      </save-form>
 | 
	
		
			
				|  |  | +      <div class="tableWrap">
 | 
	
		
			
				|  |  | +        <el-table
 | 
	
		
			
				|  |  | +          style="width: 100%"
 | 
	
		
			
				|  |  | +          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
 | 
	
		
			
				|  |  | +          :data="tableList"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <el-table-column
 | 
	
		
			
				|  |  | +            align="center"
 | 
	
		
			
				|  |  | +            prop="studentId"
 | 
	
		
			
				|  |  | +            label="分部"
 | 
	
		
			
				|  |  | +          ></el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column
 | 
	
		
			
				|  |  | +            align="center"
 | 
	
		
			
				|  |  | +            prop="studentId"
 | 
	
		
			
				|  |  | +            label="课程时长(分钟)"
 | 
	
		
			
				|  |  | +          ></el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column
 | 
	
		
			
				|  |  | +            align="center"
 | 
	
		
			
				|  |  | +            prop="studentId"
 | 
	
		
			
				|  |  | +            label="课程单价(元)"
 | 
	
		
			
				|  |  | +          ></el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" prop="studentId" label="操作">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">
 | 
	
		
			
				|  |  | +              <div>
 | 
	
		
			
				|  |  | +                <el-button type="text" @click="resetFee(scope.row)"
 | 
	
		
			
				|  |  | +                  >修改</el-button
 | 
	
		
			
				|  |  | +                >
 | 
	
		
			
				|  |  | +              </div>
 | 
	
		
			
				|  |  | +            </template>
 | 
	
		
			
				|  |  | +          </el-table-column>
 | 
	
		
			
				|  |  | +        </el-table>
 | 
	
		
			
				|  |  | +        <pagination
 | 
	
		
			
				|  |  | +          sync
 | 
	
		
			
				|  |  | +          :total.sync="rules.total"
 | 
	
		
			
				|  |  | +          :page.sync="rules.page"
 | 
	
		
			
				|  |  | +          :limit.sync="rules.limit"
 | 
	
		
			
				|  |  | +          :page-sizes="rules.page_size"
 | 
	
		
			
				|  |  | +          @pagination="getList"
 | 
	
		
			
				|  |  | +        />
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +    </div>
 | 
	
		
			
				|  |  | +    <el-dialog
 | 
	
		
			
				|  |  | +      title="修改课程单价"
 | 
	
		
			
				|  |  | +      :visible.sync="dialogVisible"
 | 
	
		
			
				|  |  | +      width="400px"
 | 
	
		
			
				|  |  | +      append-to-body
 | 
	
		
			
				|  |  | +      v-if="dialogVisible"
 | 
	
		
			
				|  |  | +    >
 | 
	
		
			
				|  |  | +      <el-form :model="form" label-width="120px" label-position="right" >
 | 
	
		
			
				|  |  | +        <el-form-item label="分部:">{{ form.organName }}</el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item label="课程时长(分钟):">{{
 | 
	
		
			
				|  |  | +          form.courseTime
 | 
	
		
			
				|  |  | +        }}</el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item
 | 
	
		
			
				|  |  | +          label="课程单价(元):"
 | 
	
		
			
				|  |  | +          prop="courseFee"
 | 
	
		
			
				|  |  | +          :rules="[
 | 
	
		
			
				|  |  | +            { required: true, message: '请输入课程单价', trigger: 'blur' },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              pattern:
 | 
	
		
			
				|  |  | +                /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
 | 
	
		
			
				|  |  | +              message: '请输入正确的金额',
 | 
	
		
			
				|  |  | +              trigger: 'blur',
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +          ]"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <el-input v-model="form.courseFee"></el-input>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +      </el-form>
 | 
	
		
			
				|  |  | +      <div slot="footer">
 | 
	
		
			
				|  |  | +        <el-button @click="dialogVisible = false">取 消</el-button>
 | 
	
		
			
				|  |  | +        <el-button type="primary" @click="submitReset">确认修改</el-button>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +    </el-dialog>
 | 
	
		
			
				|  |  | +  </div>
 | 
	
		
			
				|  |  | +</template>
 | 
	
		
			
				|  |  | +<script>
 | 
	
		
			
				|  |  | +import axios from "axios";
 | 
	
		
			
				|  |  | +import { getToken } from "@/utils/auth";
 | 
	
		
			
				|  |  | +import pagination from "@/components/Pagination/index";
 | 
	
		
			
				|  |  | +import load from "@/utils/loading";
 | 
	
		
			
				|  |  | +export default {
 | 
	
		
			
				|  |  | +  components:{
 | 
	
		
			
				|  |  | +    pagination
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  data() {
 | 
	
		
			
				|  |  | +    return {
 | 
	
		
			
				|  |  | +      searchForm: {
 | 
	
		
			
				|  |  | +        organId: null,
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      form: {
 | 
	
		
			
				|  |  | +        organName: "武汉",
 | 
	
		
			
				|  |  | +        courseTime: "25",
 | 
	
		
			
				|  |  | +        courseFee: "180",
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      tableList: [{}],
 | 
	
		
			
				|  |  | +      organList: [],
 | 
	
		
			
				|  |  | +      activeRow: null,
 | 
	
		
			
				|  |  | +      dialogVisible: false,
 | 
	
		
			
				|  |  | +      rules: {
 | 
	
		
			
				|  |  | +        // 分页规则
 | 
	
		
			
				|  |  | +        limit: 10, // 限制显示条数
 | 
	
		
			
				|  |  | +        page: 1, // 当前页
 | 
	
		
			
				|  |  | +        total: 0, // 总条数
 | 
	
		
			
				|  |  | +        page_size: [10, 20, 40, 50], // 选择限制显示条数
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  created() {},
 | 
	
		
			
				|  |  | +  //生命周期 - 挂载完成(可以访问DOM元素)
 | 
	
		
			
				|  |  | +  mounted() {
 | 
	
		
			
				|  |  | +    // 获取分部
 | 
	
		
			
				|  |  | +    this.$store.dispatch("setBranchs");
 | 
	
		
			
				|  |  | +    this.init();
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  methods: {
 | 
	
		
			
				|  |  | +    init() {},
 | 
	
		
			
				|  |  | +    getList() {},
 | 
	
		
			
				|  |  | +    search() {
 | 
	
		
			
				|  |  | +      this.rules.page = 1;
 | 
	
		
			
				|  |  | +      this.getList();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    onReSet() {
 | 
	
		
			
				|  |  | +      this.$refs.searchForm.resetFields();
 | 
	
		
			
				|  |  | +      this.search()
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    resetFee(row) {
 | 
	
		
			
				|  |  | +      this.activeRow = row;
 | 
	
		
			
				|  |  | +      this.dialogVisible = true;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    submitReset() {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +</script>
 | 
	
		
			
				|  |  | +<style lang="scss" scoped>
 | 
	
		
			
				|  |  | +</style>
 |