Commit ca91c78d authored by 李苏's avatar 李苏 💬

修改字段

parent 78106698
import request from 'common/src/utils/request'
export function QueryBm(query) {
return request({
url: 'jcsj/ubm/query',
method: 'post',
data: query||{}
})
}
export function AddBm(query) {
return request({
url: 'jcsj/ubm/add',
method: 'post',
data: query||{}
})
}
export function DeleteBm(query) {
return request({
url: 'jcsj/ubm/delete',
method: 'post',
data: query||{}
})
}
export function UpdateBm(query) {
return request({
url: 'jcsj/ubm/update',
method: 'post',
data: query||{}
})
}
export function qtBm(query) {
return request({
url: 'jcsj/ubm/record/qt',
method: 'post',
data: query||{}
})
}
......@@ -16,11 +16,16 @@
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="责任人" ref="fzrid" prop="type">
<el-form-item label="负责人" ref="ybfzrid" prop="type">
<personSelector :label="form.username||'暂无'" @selected='selected' ></personSelector>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="预备负责人" ref="fzrid" prop="type">
<personSelector :label="form.ybfzrName||'暂无'" @selected='ybselected' ></personSelector>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="上级部门" ref="pid" prop="type">
<el-select style="width: 100%;" v-model="form.pid" placeholder="">
<el-option v-for="(item,index) in bmList" :key="item.id" :label="item.bmmc" :value="item.id"></el-option>
......@@ -65,6 +70,8 @@
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
ybfzrName:'',
ybfzrid:'',
pid:'',
bz:'',
bmmc:'',
......@@ -74,11 +81,13 @@
rules: {
bmid: [{
required: true,
trigger: 'blur'
trigger: 'blur',
message: '请输入部门编码'
}, ],
bmmc: [{
required: true,
trigger: 'blur'
trigger: 'blur',
message: '请输入部门名称'
}]
}
}
......@@ -86,6 +95,9 @@
methods: {
selected(row){
this.form.fzrid=row.id
},
ybselected(row){
this.form.ybfzrid=row.id
}
}
......
......@@ -33,12 +33,12 @@
/* 引入需要的接口*/
import {
QueryBm,
QueryApptype,
// QueryApptype,
AddBm,
DeleteBm,
UpdateBm,
qtBm
} from "common/src/api/system/dmgSystem.js";
} from "@/api/basicData/organizationalManagement.js";
/* edit页面*/
import Edit from './edit'
import {tableMixin} from 'common'
......@@ -47,19 +47,7 @@
name: 'appVersion',
/* 初始额外赋值*/
async mounted() {
await this.$asRun(
[QueryApptype(),
res => {
var data = res['data']['records'];
let typeMap = []
for (var i in data) {
typeMap[data[i].id] = data[i].name
}
this.systemType = data
this.typeMap = typeMap
}
]
)
this.$refs['TablePager'].pageQuery()
},
data() {
......@@ -68,7 +56,7 @@
/*需要的额外参数 */
typeMap: [],
systemType: [],
baseUrl: 'kzzx/bm',
baseUrl: 'jcsj/ubm',
/* 查询参数*/
queryParams: {},
/* 表格标题对应参数*/
......@@ -87,6 +75,11 @@
label: '负责人',
width: '120'
},
{
prop: 'ybfzrName',
label: '预备负责人',
width: '120'
},
{
prop: 'tyrq',
label: '停用日期',
......
......@@ -50,7 +50,8 @@
this.subjectList=oList.map(item=>{
let newobj=Object.create({})
newobj.id=item.id
newobj.score=item.score||'暂无分值'
newobj.ans=item.ans
newobj.score=item.score||2
newobj.type=type[item.type]
newobj.subject=item.cont||'未设置问题'
newobj.options=Object.create({})
......@@ -100,16 +101,21 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// this.$message({
// type: 'success',
// message: '试卷提交成功!'
// });
/* 计算*/
let sjdf=0
console.log(this.subjectList)
this.$message({
type: 'success',
message: '试卷提交成功!'
});
this.subjectList.forEach(item=>{
/* 单选题*/
sjdf++
})
this.$warning(`您获得了${sjdf}分!`)
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
}
},
......
......@@ -28,93 +28,114 @@
</el-checkbox-group>
</div>
</div>
<!-- 判断题 -->
<!-- 判断题 -->
<div v-if="type=='PDT'" class="options">
<div class="item" :key="index" v-for="(item,index) in options">
<el-radio v-model="value" :label="index"> {{`${index}.${item}`}}</el-radio>
</div>
</div>
<!-- 答案显示-->
<!-- <br>
<span>结果:错误</span>
<br>
<span>本题答案是:A,B,C</span>
<br>
<span>答案解析:钝角</span> -->
</div>
</template>
<script>
export default{
export default {
updated() {
if(this.type=='DXTS'){
this.app.subjectList[this.index-1].value=this.valueList
}else{
this.app.subjectList[this.index-1].value=this.value
if (this.type == 'DXTS') {
let valueList=_.cloneDeep(this.valueList)
this.app.subjectList[this.index - 1].value=valueList.sort((s1, s2)=>{
let a1 = s1.toUpperCase();
let a2 = s2.toUpperCase();
if (a1 < a2) {
return -1;
}
if (a1 > a2) {
return 1;
}
return 0;
}).join(',')
/* 排序*/
} else {
this.app.subjectList[this.index - 1].value = this.value
}
},
mounted() {
this.type=='TKT'&&$(this.$el).find('[name=tktinput]').change(e=>{
this.value=$(this.$el).find('[name=tktinput]').val()||''
this.app.subjectList[this.index-1].value=this.value
this.type == 'TKT' && $(this.$el).find('[name=tktinput]').change(e => {
this.value = $(this.$el).find('[name=tktinput]').val() || ''
this.app.subjectList[this.index - 1].value = this.value
})
},
props:{
app:{
type:Object,
default:()=>{
props: {
app: {
type: Object,
default: () => {
return {}
}
},
index:{
default:1
index: {
default: 1
},
subject:{
type:String,
default:'对于线性表(7,34,55,25,64,46,20,10)进行散列存储时,若选用H(K)=K %9作为散列函数,则散列地址为1的元素有()个。'
subject: {
type: String,
default: '对于线性表(7,34,55,25,64,46,20,10)进行散列存储时,若选用H(K)=K %9作为散列函数,则散列地址为1的元素有()个。'
},
score:{
type:String,
default:'2'
score: {
// type:String,
default: '2'
},
type:{
type:String,
default:'DXT'
type: {
type: String,
default: 'DXT'
},
options:{
type:Object,
default:()=>{
return{
A:'1个',
B:'2个',
C:'3个',
D:'4个'
options: {
type: Object,
default: () => {
return {
A: '1个',
B: '2个',
C: '3个',
D: '4个'
}
}
}
},
data(){
return{
value:'',
valueList:[],
data() {
return {
value: '',
valueList: [],
}
},
methods:{
transTKT(val,fn){
methods: {
transTKT(val, fn) {
let nval
let template=`<input type='text' name='tktinput' class='tktinput'>`
let template = `<input type='text' name='tktinput' class='tktinput'>`
/* 判断有无()*/
val.indexOf('()')==-1?( nval=val+template):( nval=val.replace('()',template))
val.indexOf('()') == -1 ? (nval = val + template) : (nval = val.replace('()', template))
return nval
}
},
filters:{
typeName(val){
let typeArry={
'DXT':'(单选题)',
'DXTS':'(多选题)',
'TKT':'(填空题)',
'PDT':'(判断题)'
}
let nval=typeArry[val]
return nval||'其他'
filters: {
typeName(val) {
let typeArry = {
'DXT': '(单选题)',
'DXTS': '(多选题)',
'TKT': '(填空题)',
'PDT': '(判断题)'
}
let nval = typeArry[val]
return nval || '其他'
},
typeScore(val){
let nval=`(${val}分)`
typeScore(val) {
let nval = `(${val}分)`
return nval
}
}
......@@ -123,42 +144,49 @@
</script>
<style lang="scss" scope>
.el-radio__label{
.el-radio__label {
font-size: 13px;
color:rgb(119, 119, 119);
color: rgb(119, 119, 119);
}
input{
input {
border: none;
outline: none;
}
input:focus{
input:focus {
border: none;
}
.tktinput:focus{
.tktinput:focus {
border: 0px;
border-bottom: 1px solid #eee;
}
.tktinput{
.tktinput {
border: 0px;
border-bottom: 1px solid #eee;
color: #888;
}
.examMain{
.examMain {
margin-top: 30px;
height: 100%;
width: 100%;
font-size: 14px;
overflow: auto;
.options{
.options {
padding: 10px;
width: 100%;
display: flex;
flex-wrap: wrap;
.item{
.item {
padding-left: 20%;
width: 50%;
line-height: 20px;
}
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment