liaoron 2016-12-23 22:36:07 548次浏览 0条回复 0 0 0
[
    'columns' => [
        [
            'attribute'=>'top_id',
            'format'=>'raw',
            'value'=>Html::a($model->top_cn_name?:'无', '#', [
                'class'=>'kv-author-link'
                ]),
            'type'=>DetailView::INPUT_SELECT2, 
            'widgetOptions'=>[
                'data'=>ArrayHelper::map(Area::find()->where('parent_id=100000')->orderBy('en_area_name')->asArray()->all(), 'id', 'cn_area_name'), 
                'options'=>['placeholder'=>'Select ...'],
                'pluginOptions'=>['allowClear'=>true]
            ],
            //'inputWidth'=>'40%'
        ],
        [
            'attribute'=>'second_id',
            'format'=>'raw',
            'value'=>Html::a($model->second_cn_name?:'无', '#', [
                'class'=>'kv-author-link'
                ]),
            'type'=>DetailView::INPUT_DEPDROP, 	
            'widgetOptions'=>[
                      'type'=>DepDrop::TYPE_SELECT2,
                      'data'=>[$model->second_id => $model->second_cn_name],
                      'options'=>['placeholder'=>'选择 ...'],
                      'select2Options'=>['pluginOptions'=>['allowClear'=>true]],
                      'pluginOptions'=>[
                          'depends'=>['cncompany-top_id'],
                          'url'=>Url::to(['/area/subcategory']),
                          //'params'=>['input-type-1', 'input-type-2']
                      ]
            ],
     
        ],
        

    ],
],
[
    'columns' => [
        [
            'attribute'=>'third_id',
            'format'=>'raw',
            'value'=>Html::a($model->third_cn_name?:'无', '#', [
                'class'=>'kv-author-link'
                ]),
            'type'=>DetailView::INPUT_DEPDROP, 	
            'widgetOptions'=>[
                      'type'=>DepDrop::TYPE_SELECT2,
                      'data'=>[$model->third_id => $model->third_cn_name],
                      'options'=>['placeholder'=>'选择 ...'],
                      'select2Options'=>['pluginOptions'=>['allowClear'=>true]],
                      'pluginOptions'=>[
                          'depends'=>['cncompany-second_id'],
                          'url'=>Url::to(['/area/subcategory']),
                          //'params'=>['input-type-1', 'input-type-2']
                      ]
            ],
            
        ],
        [
            'attribute'=>'fourth_id',
            'format'=>'raw',
            'value'=>Html::a($model->fourth_cn_name?:'无', '#', [
                'class'=>'kv-author-link'
                ]),
            'type'=>DetailView::INPUT_DEPDROP, 	
            'widgetOptions'=>[
                      'type'=>DepDrop::TYPE_SELECT2,
                      'data'=>[$model->fourth_id => $model->fourth_cn_name],
                      'options'=>['placeholder'=>'选择 ...'],
                      'select2Options'=>['pluginOptions'=>['allowClear'=>true]],
                      'pluginOptions'=>[
                          'depends'=>['cncompany-third_id'],
                          'url'=>Url::to(['/area/subcategory']),
                          //'params'=>['input-type-1', 'input-type-2']
                      ]
            ],
            
        ],

    ],
],
    没有找到数据。
您需要登录后才可以回复。登录 | 立即注册